Created
December 26, 2022 00:04
-
-
Save naturalett/bfce078a30d331508ab2b746b48df028 to your computer and use it in GitHub Desktop.
k8s-pod-template
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: v1 | |
kind: Pod | |
metadata: | |
labels: | |
product: datascience | |
<% try { %> | |
<% build_label=(build_label) %> | |
<% } catch(Exception e) { %> | |
<% build_label='default' %> | |
<% } %> | |
app: ${build_label} | |
buildnode: 'true' | |
spec: | |
serviceAccountName: jenkins | |
containers: | |
- name: node | |
<% try { %> | |
<% node_version=(node_version) %> | |
<% } catch(Exception e) { %> | |
<% node_version='fermium' %> | |
<% } %> | |
<% try { %> | |
<% node_image_repository=(node_image_repository) %> | |
<% } catch(Exception e) { %> | |
<% node_image_repository='node' %> | |
<% } %> | |
image: ${node_image_repository}:${node_version} | |
imagePullPolicy: IfNotPresent | |
command: | |
- cat | |
tty: true | |
<% try { %> | |
<% items=(image_dependencies) %> | |
<% } catch(Exception e) { %> | |
<% items=[] } %> | |
<% for (item in items) { %> | |
<%= item %> | |
<% } %> | |
volumes: | |
- hostPath: | |
path: /var/run/docker.sock | |
type: '' | |
name: dockersock |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment