1
0
Fork 0
molgenis-ops-docker-helm/jenkins/v0.1.x/templates/deployment/jenkins-agent-deployment.yaml

39 lines
1.3 KiB
YAML

apiVersion: extensions/v1beta1
kind: Deployment
metadata:
creationTimestamp: null
name: {{ .Values.jenkins.agent.name }}
labels:
app: {{ .Values.jenkins.agent.name }}
environment: {{ .Values.environment }}
spec:
replicas: {{ .Values.replicaCount}}
strategy:
type: {{ .Values.jenkins.strategy.type }}
selector:
matchLabels:
app: {{ .Values.jenkins.agent.selector }}
template:
metadata:
labels:
app: {{ .Values.jenkins.agent.name }}
creationTimestamp: null
spec:
restartPolicy: {{ .Values.agent.restartPolicy }}
containers:
- name: {{ .Values.jenkins.agent.name }}
image: "{{ .Values.jenkins.agent.image.repository }}:{{ .Values.jenkins.agent.image.tag }}"
imagePullPolicy: {{ .Values.jenkins.agent.image.pullPolicy }}
- name: JENKINS_SLAVE_SSH_PUBKEY
value: {{ .Values.jenkins.agent.ssh.public.key }}
ports:
- containerPort: {{ .Values.jenkins.agent.port }}
volumeMounts:
- mountPath: /var/run/docker.sock
name: jenkins-agent-worker-claim
volumes:
- name: jenkins-agent-worker-claim
persistentVolumeClaim:
claimName: jenkins-agent-worker-claim