mirror of
https://github.com/thejimnicholson/jenkins.git
synced 2025-12-06 03:30:43 +00:00
72 lines
1.9 KiB
YAML
72 lines
1.9 KiB
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: jenkins
|
|
namespace: jenkins
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
app: jenkins
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: jenkins
|
|
name: jenkins
|
|
app.kubernetes.io/name: jenkins
|
|
spec:
|
|
securityContext:
|
|
fsGroup: 1000
|
|
runAsUser: 0
|
|
nodeSelector:
|
|
nodetype: worker
|
|
# initContainers:
|
|
# - name: jenkins-init
|
|
# image: jenkins/jenkins:2.504.1-lts-jdk21
|
|
# command:
|
|
# - sh
|
|
# - -c
|
|
# - |
|
|
# jenkins-plugin-cli --plugin-file /var/jenkins_home/plugin-config/plugin.txt
|
|
# cp -r -p /usr/share/jenkins/ref/plugins/. /var/jenkins_home/plugins/.
|
|
# env:
|
|
# - name: TZ
|
|
# value: "America/Los_Angeles"
|
|
# volumeMounts:
|
|
# - name: jenkins-vol
|
|
# mountPath: /var/jenkins_home
|
|
# - name: jenkins-plugins-config
|
|
# mountPath: /var/jenkins_home/plugin-config
|
|
containers:
|
|
- name: jenkins
|
|
image: jenkins/jenkins:2.504.1-lts-jdk21
|
|
env:
|
|
- name: TZ
|
|
value: "America/Los_Angeles"
|
|
ports:
|
|
- name: http-port
|
|
containerPort: 8080
|
|
- name: jnlp-port
|
|
containerPort: 50000
|
|
resources:
|
|
limits:
|
|
cpu: "1"
|
|
memory: "1Gi"
|
|
requests:
|
|
cpu: "0.5"
|
|
memory: "512Mi"
|
|
volumeMounts:
|
|
- name: jenkins-vol
|
|
mountPath: /var/jenkins_home
|
|
- name: jenkins-plugins-config
|
|
mountPath: /var/jenkins_home/plugin-config
|
|
volumes:
|
|
- name: jenkins-vol
|
|
persistentVolumeClaim:
|
|
claimName: jenkins-storage-nfs
|
|
- name: jenkins-plugins-config
|
|
configMap:
|
|
name: jenkins-plugins
|
|
strategy:
|
|
type: Recreate
|