37 lines
812 B
YAML
37 lines
812 B
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
namespace: jenkins
|
|
name: jenkins
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
app: jenkins
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: jenkins
|
|
spec:
|
|
restartPolicy: Always
|
|
terminationGracePeriodSeconds: 10
|
|
containers:
|
|
- name: jenkins
|
|
image: jenkins/jenkins:latest-jdk21
|
|
resources:
|
|
requests:
|
|
cpu: 500m
|
|
memory: 1Gi
|
|
limits:
|
|
cpu: 2000m
|
|
memory: 4Gi
|
|
volumeMounts:
|
|
- name: jenkins-volume
|
|
mountPath: /var/jenkins_home
|
|
ports:
|
|
- containerPort: 8080
|
|
volumes:
|
|
- name: jenkins-volume
|
|
persistentVolumeClaim:
|
|
claimName: jenkins-pvc
|