337 lines
9.4 KiB
YAML
337 lines
9.4 KiB
YAML
apiVersion: apps/v1
|
|
kind: StatefulSet
|
|
metadata:
|
|
annotations:
|
|
meta.helm.sh/release-name: jenkins
|
|
meta.helm.sh/release-namespace: infrastructure
|
|
labels:
|
|
app.kubernetes.io/component: jenkins-controller
|
|
app.kubernetes.io/instance: jenkins
|
|
app.kubernetes.io/managed-by: Helm
|
|
app.kubernetes.io/name: jenkins
|
|
helm.sh/chart: jenkins-5.9.18
|
|
name: jenkins
|
|
namespace: infrastructure
|
|
spec:
|
|
persistentVolumeClaimRetentionPolicy:
|
|
whenDeleted: Retain
|
|
whenScaled: Retain
|
|
podManagementPolicy: OrderedReady
|
|
replicas: 1
|
|
revisionHistoryLimit: 10
|
|
selector:
|
|
matchLabels:
|
|
app.kubernetes.io/component: jenkins-controller
|
|
app.kubernetes.io/instance: jenkins
|
|
serviceName: jenkins
|
|
template:
|
|
metadata:
|
|
annotations:
|
|
checksum/config: ad12688985f56d830ccee6722b20739f268bf95f97d84591925bb0a0d9b871f0
|
|
labels:
|
|
app.kubernetes.io/component: jenkins-controller
|
|
app.kubernetes.io/instance: jenkins
|
|
app.kubernetes.io/managed-by: Helm
|
|
app.kubernetes.io/name: jenkins
|
|
helm.sh/chart: jenkins-5.9.18
|
|
spec:
|
|
automountServiceAccountToken: true
|
|
containers:
|
|
- args:
|
|
- --httpPort=8080
|
|
env:
|
|
- name: SECRETS
|
|
value: /run/secrets/additional
|
|
- name: POD_NAME
|
|
valueFrom:
|
|
fieldRef:
|
|
apiVersion: v1
|
|
fieldPath: metadata.name
|
|
- name: JAVA_OPTS
|
|
value: '-Dcasc.reload.token=$(POD_NAME) '
|
|
- name: JENKINS_OPTS
|
|
value: '--webroot=/var/jenkins_cache/war '
|
|
- name: JENKINS_SLAVE_AGENT_PORT
|
|
value: '50000'
|
|
- name: CASC_JENKINS_CONFIG
|
|
value: /var/jenkins_home/casc_configs
|
|
image: docker.io/jenkins/jenkins:2.589-jdk21
|
|
imagePullPolicy: Always
|
|
livenessProbe:
|
|
failureThreshold: 5
|
|
httpGet:
|
|
path: /login
|
|
port: http
|
|
scheme: HTTP
|
|
periodSeconds: 10
|
|
successThreshold: 1
|
|
timeoutSeconds: 5
|
|
name: jenkins
|
|
ports:
|
|
- containerPort: 8080
|
|
name: http
|
|
protocol: TCP
|
|
- containerPort: 50000
|
|
name: agent-listener
|
|
protocol: TCP
|
|
readinessProbe:
|
|
failureThreshold: 3
|
|
httpGet:
|
|
path: /login
|
|
port: http
|
|
scheme: HTTP
|
|
periodSeconds: 10
|
|
successThreshold: 1
|
|
timeoutSeconds: 5
|
|
resources:
|
|
limits:
|
|
cpu: '2'
|
|
memory: 4Gi
|
|
requests:
|
|
cpu: 50m
|
|
memory: 256Mi
|
|
securityContext:
|
|
allowPrivilegeEscalation: false
|
|
readOnlyRootFilesystem: true
|
|
runAsGroup: 1000
|
|
runAsUser: 1000
|
|
startupProbe:
|
|
failureThreshold: 12
|
|
httpGet:
|
|
path: /login
|
|
port: http
|
|
scheme: HTTP
|
|
periodSeconds: 10
|
|
successThreshold: 1
|
|
timeoutSeconds: 5
|
|
terminationMessagePath: /dev/termination-log
|
|
terminationMessagePolicy: File
|
|
volumeMounts:
|
|
- mountPath: /var/jenkins_home
|
|
name: jenkins-home
|
|
- mountPath: /var/jenkins_config
|
|
name: jenkins-config
|
|
readOnly: true
|
|
- mountPath: /usr/share/jenkins/ref/plugins/
|
|
name: plugin-dir
|
|
- mountPath: /var/jenkins_home/casc_configs
|
|
name: sc-config-volume
|
|
- mountPath: /run/secrets/additional
|
|
name: jenkins-secrets
|
|
readOnly: true
|
|
- mountPath: /var/jenkins_cache
|
|
name: jenkins-cache
|
|
- mountPath: /tmp
|
|
name: tmp-volume
|
|
- env:
|
|
- name: POD_NAME
|
|
valueFrom:
|
|
fieldRef:
|
|
apiVersion: v1
|
|
fieldPath: metadata.name
|
|
- name: LABEL
|
|
value: jenkins-jenkins-config
|
|
- name: HEALTH_PORT
|
|
value: '8060'
|
|
- name: FOLDER
|
|
value: /var/jenkins_home/casc_configs
|
|
- name: NAMESPACE
|
|
value: infrastructure
|
|
- name: REQ_URL
|
|
value: http://localhost:8080/reload-configuration-as-code/?casc-reload-token=$(POD_NAME)
|
|
- name: REQ_METHOD
|
|
value: POST
|
|
- name: REQ_RETRY_CONNECT
|
|
value: '10'
|
|
image: docker.io/kiwigrid/k8s-sidecar:2.6.0
|
|
imagePullPolicy: IfNotPresent
|
|
name: config-reload
|
|
resources: {}
|
|
securityContext:
|
|
allowPrivilegeEscalation: false
|
|
readOnlyRootFilesystem: true
|
|
terminationMessagePath: /dev/termination-log
|
|
terminationMessagePolicy: File
|
|
volumeMounts:
|
|
- mountPath: /var/jenkins_home/casc_configs
|
|
name: sc-config-volume
|
|
- mountPath: /var/jenkins_home
|
|
name: jenkins-home
|
|
- mountPath: /tmp
|
|
name: tmp-volume
|
|
dnsPolicy: ClusterFirst
|
|
enableServiceLinks: false
|
|
initContainers:
|
|
- env:
|
|
- name: POD_NAME
|
|
valueFrom:
|
|
fieldRef:
|
|
apiVersion: v1
|
|
fieldPath: metadata.name
|
|
- name: LABEL
|
|
value: jenkins-jenkins-config
|
|
- name: HEALTH_PORT
|
|
value: '8060'
|
|
- name: FOLDER
|
|
value: /var/jenkins_home/casc_configs
|
|
- name: NAMESPACE
|
|
value: infrastructure
|
|
- name: METHOD
|
|
value: LIST
|
|
image: docker.io/kiwigrid/k8s-sidecar:2.6.0
|
|
imagePullPolicy: IfNotPresent
|
|
name: config-reload-init
|
|
resources: {}
|
|
securityContext:
|
|
allowPrivilegeEscalation: false
|
|
readOnlyRootFilesystem: true
|
|
terminationMessagePath: /dev/termination-log
|
|
terminationMessagePolicy: File
|
|
volumeMounts:
|
|
- mountPath: /var/jenkins_home/casc_configs
|
|
name: sc-config-volume
|
|
- mountPath: /var/jenkins_home
|
|
name: jenkins-home
|
|
- mountPath: /tmp
|
|
name: tmp-volume
|
|
- command:
|
|
- sh
|
|
- /var/jenkins_config/apply_config.sh
|
|
image: docker.io/jenkins/jenkins:2.555.1-jdk21
|
|
imagePullPolicy: Always
|
|
name: init
|
|
resources:
|
|
limits:
|
|
cpu: '2'
|
|
memory: 4Gi
|
|
requests:
|
|
cpu: 50m
|
|
memory: 256Mi
|
|
securityContext:
|
|
allowPrivilegeEscalation: false
|
|
readOnlyRootFilesystem: true
|
|
runAsGroup: 1000
|
|
runAsUser: 1000
|
|
terminationMessagePath: /dev/termination-log
|
|
terminationMessagePolicy: File
|
|
volumeMounts:
|
|
- mountPath: /var/jenkins_home
|
|
name: jenkins-home
|
|
- mountPath: /var/jenkins_config
|
|
name: jenkins-config
|
|
- mountPath: /usr/share/jenkins/ref/plugins
|
|
name: plugins
|
|
- mountPath: /var/jenkins_plugins
|
|
name: plugin-dir
|
|
- mountPath: /tmp
|
|
name: tmp-volume
|
|
restartPolicy: Always
|
|
schedulerName: default-scheduler
|
|
securityContext:
|
|
fsGroup: 1000
|
|
fsGroupChangePolicy: OnRootMismatch
|
|
runAsNonRoot: true
|
|
runAsUser: 1000
|
|
serviceAccount: jenkins
|
|
serviceAccountName: jenkins
|
|
terminationGracePeriodSeconds: 30
|
|
volumes:
|
|
- emptyDir: {}
|
|
name: plugins
|
|
- configMap:
|
|
defaultMode: 420
|
|
name: jenkins
|
|
name: jenkins-config
|
|
- emptyDir: {}
|
|
name: plugin-dir
|
|
- name: jenkins-secrets
|
|
projected:
|
|
defaultMode: 420
|
|
sources:
|
|
- secret:
|
|
items:
|
|
- key: jenkins-admin-user
|
|
path: chart-admin-username
|
|
- key: jenkins-admin-password
|
|
path: chart-admin-password
|
|
name: jenkins
|
|
- emptyDir: {}
|
|
name: jenkins-cache
|
|
- name: jenkins-home
|
|
persistentVolumeClaim:
|
|
claimName: jenkins
|
|
- emptyDir: {}
|
|
name: sc-config-volume
|
|
- emptyDir: {}
|
|
name: tmp-volume
|
|
updateStrategy:
|
|
rollingUpdate:
|
|
partition: 0
|
|
type: RollingUpdate
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
annotations:
|
|
meta.helm.sh/release-name: jenkins
|
|
meta.helm.sh/release-namespace: infrastructure
|
|
labels:
|
|
app.kubernetes.io/component: jenkins-controller
|
|
app.kubernetes.io/instance: jenkins
|
|
app.kubernetes.io/managed-by: Helm
|
|
app.kubernetes.io/name: jenkins
|
|
helm.sh/chart: jenkins-5.9.18
|
|
name: jenkins
|
|
namespace: infrastructure
|
|
spec:
|
|
clusterIP: 10.43.106.157
|
|
clusterIPs:
|
|
- 10.43.106.157
|
|
internalTrafficPolicy: Cluster
|
|
ipFamilies:
|
|
- IPv4
|
|
ipFamilyPolicy: SingleStack
|
|
ports:
|
|
- name: http
|
|
port: 101
|
|
protocol: TCP
|
|
targetPort: 8080
|
|
selector:
|
|
app.kubernetes.io/component: jenkins-controller
|
|
app.kubernetes.io/instance: jenkins
|
|
sessionAffinity: None
|
|
type: ClusterIP
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
annotations:
|
|
meta.helm.sh/release-name: jenkins
|
|
meta.helm.sh/release-namespace: infrastructure
|
|
labels:
|
|
app.kubernetes.io/component: jenkins-controller
|
|
app.kubernetes.io/instance: jenkins
|
|
app.kubernetes.io/managed-by: Helm
|
|
app.kubernetes.io/name: jenkins
|
|
helm.sh/chart: jenkins-5.9.18
|
|
name: jenkins-agent
|
|
namespace: infrastructure
|
|
spec:
|
|
clusterIP: 10.43.107.50
|
|
clusterIPs:
|
|
- 10.43.107.50
|
|
internalTrafficPolicy: Cluster
|
|
ipFamilies:
|
|
- IPv4
|
|
ipFamilyPolicy: SingleStack
|
|
ports:
|
|
- name: agent-listener
|
|
port: 50000
|
|
protocol: TCP
|
|
targetPort: 50000
|
|
selector:
|
|
app.kubernetes.io/component: jenkins-controller
|
|
app.kubernetes.io/instance: jenkins
|
|
sessionAffinity: None
|
|
type: ClusterIP
|