Add values to configure a second Agent.
This commit is contained in:
parent
e5b8625757
commit
7dbb679282
@ -91,60 +91,67 @@ data:
|
|||||||
{{- end }}
|
{{- end }}
|
||||||
<nodeProperties/>
|
<nodeProperties/>
|
||||||
</org.csanchez.jenkins.plugins.kubernetes.PodTemplate>
|
</org.csanchez.jenkins.plugins.kubernetes.PodTemplate>
|
||||||
|
{{- end -}}
|
||||||
|
{{- if .Values.Pod.Enabled }}
|
||||||
<org.csanchez.jenkins.plugins.kubernetes.PodTemplate>
|
<org.csanchez.jenkins.plugins.kubernetes.PodTemplate>
|
||||||
<inheritFrom></inheritFrom>
|
<inheritFrom></inheritFrom>
|
||||||
<name></name>
|
<name>{{ .Values.Pod.Label }}</name>
|
||||||
<namespace></namespace>
|
|
||||||
<privileged>false</privileged>
|
|
||||||
<capOnlyOnAlivePods>false</capOnlyOnAlivePods>
|
|
||||||
<alwaysPullImage>false</alwaysPullImage>
|
|
||||||
<instanceCap>2147483647</instanceCap>
|
<instanceCap>2147483647</instanceCap>
|
||||||
<slaveConnectTimeout>100</slaveConnectTimeout>
|
|
||||||
<idleMinutes>0</idleMinutes>
|
<idleMinutes>0</idleMinutes>
|
||||||
<activeDeadlineSeconds>0</activeDeadlineSeconds>
|
<label>{{ .Values.Pod.Label }}</label>
|
||||||
<label>molgenis-maven</label>
|
<nodeSelector>
|
||||||
<nodeSelector></nodeSelector>
|
{{- $local := dict "first" true }}
|
||||||
<nodeUsageMode>EXCLUSIVE</nodeUsageMode>
|
{{- range $key, $value := .Values.Pod.NodeSelector }}
|
||||||
<customWorkspaceVolumeEnabled>false</customWorkspaceVolumeEnabled>
|
{{- if not $local.first }},{{- end }}
|
||||||
<workspaceVolume class="org.csanchez.jenkins.plugins.kubernetes.volumes.workspace.EmptyDirWorkspaceVolume">
|
{{- $key }}={{ $value }}
|
||||||
<memory>false</memory>
|
{{- $_ := set $local "first" false }}
|
||||||
</workspaceVolume>
|
{{- end }}</nodeSelector>
|
||||||
|
<nodeUsageMode>NORMAL</nodeUsageMode>
|
||||||
<volumes>
|
<volumes>
|
||||||
<org.csanchez.jenkins.plugins.kubernetes.volumes.HostPathVolume>
|
{{- range $index, $volume := .Values.Pod.volumes }}
|
||||||
<mountPath>/var/run/docker.sock</mountPath>
|
<org.csanchez.jenkins.plugins.kubernetes.volumes.{{ $volume.type }}Volume>
|
||||||
<hostPath>/var/run/docker.sock</hostPath>
|
{{- range $key, $value := $volume }}{{- if not (eq $key "type") }}
|
||||||
</org.csanchez.jenkins.plugins.kubernetes.volumes.HostPathVolume>
|
<{{ $key }}>{{ $value }}</{{ $key }}>
|
||||||
|
{{- end }}{{- end }}
|
||||||
|
</org.csanchez.jenkins.plugins.kubernetes.volumes.{{ $volume.type }}Volume>
|
||||||
|
{{- end }}
|
||||||
</volumes>
|
</volumes>
|
||||||
<containers>
|
<containers>
|
||||||
<org.csanchez.jenkins.plugins.kubernetes.ContainerTemplate>
|
<org.csanchez.jenkins.plugins.kubernetes.ContainerTemplate>
|
||||||
<name>maven</name>
|
<name>{{ .Values.Pod.Label }}</name>
|
||||||
<image>webhost12.service.rug.nl/molgenis/molgenis-maven:latest</image>
|
<image>{{ .Values.Pod.Image }}:{{ .Values.Pod.ImageTag }}</image>
|
||||||
|
{{- if .Values.Pod.Privileged }}
|
||||||
|
<privileged>true</privileged>
|
||||||
|
{{- else }}
|
||||||
<privileged>false</privileged>
|
<privileged>false</privileged>
|
||||||
<alwaysPullImage>true</alwaysPullImage>
|
{{- end }}
|
||||||
|
<alwaysPullImage>{{ .Values.Pod.AlwaysPullImage }}</alwaysPullImage>
|
||||||
<workingDir>/home/jenkins</workingDir>
|
<workingDir>/home/jenkins</workingDir>
|
||||||
<command>/bin/sh -c</command>
|
<command>{{ .Values.Pod.Command }}</command>
|
||||||
<args>cat</args>
|
<args>{{ .Values.Pod.Args }}</args>
|
||||||
|
{{- if .Values.Pod.TTY }}
|
||||||
<ttyEnabled>true</ttyEnabled>
|
<ttyEnabled>true</ttyEnabled>
|
||||||
<resourceRequestCpu></resourceRequestCpu>
|
{{- else }}
|
||||||
<resourceRequestMemory></resourceRequestMemory>
|
<ttyEnabled>false</ttyEnabled>
|
||||||
<resourceLimitCpu></resourceLimitCpu>
|
{{- end }}
|
||||||
<resourceLimitMemory></resourceLimitMemory>
|
<resourceRequestCpu>{{.Values.Pod.Cpu}}</resourceRequestCpu>
|
||||||
<envVars/>
|
<resourceRequestMemory>{{.Values.Pod.Memory}}</resourceRequestMemory>
|
||||||
<ports/>
|
<resourceLimitCpu>{{.Values.Pod.Cpu}}</resourceLimitCpu>
|
||||||
<livenessProbe>
|
<resourceLimitMemory>{{.Values.Pod.Memory}}</resourceLimitMemory>
|
||||||
<execArgs></execArgs>
|
|
||||||
<timeoutSeconds>0</timeoutSeconds>
|
|
||||||
<initialDelaySeconds>0</initialDelaySeconds>
|
|
||||||
<failureThreshold>0</failureThreshold>
|
|
||||||
<periodSeconds>0</periodSeconds>
|
|
||||||
<successThreshold>0</successThreshold>
|
|
||||||
</livenessProbe>
|
|
||||||
</org.csanchez.jenkins.plugins.kubernetes.ContainerTemplate>
|
</org.csanchez.jenkins.plugins.kubernetes.ContainerTemplate>
|
||||||
</containers>
|
</containers>
|
||||||
<envVars/>
|
<envVars/>
|
||||||
<annotations/>
|
<annotations/>
|
||||||
|
{{- if .Values.Pod.ImagePullSecret }}
|
||||||
|
<imagePullSecrets>
|
||||||
|
<org.csanchez.jenkins.plugins.kubernetes.PodImagePullSecret>
|
||||||
|
<name>{{ .Values.Pod.ImagePullSecret }}</name>
|
||||||
|
</org.csanchez.jenkins.plugins.kubernetes.PodImagePullSecret>
|
||||||
|
</imagePullSecrets>
|
||||||
|
{{- else }}
|
||||||
<imagePullSecrets/>
|
<imagePullSecrets/>
|
||||||
<yaml></yaml>
|
{{- end }}
|
||||||
|
<nodeProperties/>
|
||||||
</org.csanchez.jenkins.plugins.kubernetes.PodTemplate>
|
</org.csanchez.jenkins.plugins.kubernetes.PodTemplate>
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
</templates>
|
</templates>
|
||||||
|
@ -69,4 +69,33 @@ jenkins:
|
|||||||
# SecretsFilesSecret: jenkins-secrets
|
# SecretsFilesSecret: jenkins-secrets
|
||||||
CustomConfigMap: true
|
CustomConfigMap: true
|
||||||
rbac:
|
rbac:
|
||||||
install: true
|
install: true
|
||||||
|
# A second agent to configure a second pod template
|
||||||
|
Pod:
|
||||||
|
Enabled: true
|
||||||
|
Image: "webhost12.service.rug.nl/molgenis/molgenis-maven"
|
||||||
|
ImageTag: latest
|
||||||
|
# ImagePullSecret: jenkins
|
||||||
|
Label: "molgenis-maven"
|
||||||
|
Privileged: false
|
||||||
|
Cpu: "200m"
|
||||||
|
Memory: "256Mi"
|
||||||
|
# You may want to change this to true while testing a new image
|
||||||
|
AlwaysPullImage: true
|
||||||
|
Command: "/bin/sh -c"
|
||||||
|
Args: "cat"
|
||||||
|
TTY: true
|
||||||
|
# You can define the volumes that you want to mount for this container
|
||||||
|
# Allowed types are: ConfigMap, EmptyDir, HostPath, Nfs, Pod, Secret
|
||||||
|
# Configure the attributes as they appear in the corresponding Java class for that type
|
||||||
|
# https://github.com/jenkinsci/kubernetes-plugin/tree/master/src/main/java/org/csanchez/jenkins/plugins/kubernetes/volumes
|
||||||
|
volumes:
|
||||||
|
- type: "HostPath"
|
||||||
|
mountPath: "/var/run/docker.sock"
|
||||||
|
hostPath: "/var/run/docker.sock"
|
||||||
|
# - type: Secret
|
||||||
|
# secretName: mysecret
|
||||||
|
# mountPath: /var/myapp/mysecret
|
||||||
|
NodeSelector: {}
|
||||||
|
# Key Value selectors. Ex:
|
||||||
|
# jenkins-agent: v1
|
||||||
|
Loading…
Reference in New Issue
Block a user