Added configuration to deploy Jenkins in Kubernetes
This commit is contained in:
57
deployment.yaml
Normal file
57
deployment.yaml
Normal file
@ -0,0 +1,57 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: deployment-jenkins
|
||||
namespace: jenkins
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: server-jenkins
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: server-jenkins
|
||||
spec:
|
||||
securityContext:
|
||||
fsGroup: 1000
|
||||
runAsUser: 1000
|
||||
serviceAccountName: admin-jenkins
|
||||
containers:
|
||||
- name: deployment-jenkins
|
||||
image: jenkins/jenkins:lts
|
||||
resources:
|
||||
limits:
|
||||
memory: "2Gi"
|
||||
cpu: "1000m"
|
||||
requests:
|
||||
memory: "500Mi"
|
||||
cpu: "500m"
|
||||
ports:
|
||||
- name: httpport
|
||||
containerPort: 8080
|
||||
- name: jnlpport
|
||||
containerPort: 50000
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: "/login"
|
||||
port: 8080
|
||||
initialDelaySeconds: 90
|
||||
periodSeconds: 10
|
||||
timeoutSeconds: 5
|
||||
failureThreshold: 5
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: "/login"
|
||||
port: 8080
|
||||
initialDelaySeconds: 60
|
||||
periodSeconds: 10
|
||||
timeoutSeconds: 5
|
||||
failureThreshold: 3
|
||||
volumeMounts:
|
||||
- name: data-jenkins
|
||||
mountPath: /var/jenkins_home
|
||||
volumes:
|
||||
- name: data-jenkins
|
||||
persistentVolumeClaim:
|
||||
claimName: pvc-jenkins
|
Reference in New Issue
Block a user