Skip to content

Instantly share code, notes, and snippets.

@naturalett
Created December 26, 2022 00:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save naturalett/bfce078a30d331508ab2b746b48df028 to your computer and use it in GitHub Desktop.
Save naturalett/bfce078a30d331508ab2b746b48df028 to your computer and use it in GitHub Desktop.
k8s-pod-template
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