kubernetes-handbook/manifests/openebs/jenkins.yml

52 lines
953 B
YAML
Raw Normal View History

2018-01-05 16:34:39 +08:00
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: jenkins-claim
annotations:
volume.beta.kubernetes.io/storage-class: openebs-standard
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 5G
---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: jenkins
spec:
replicas: 1
template:
metadata:
labels:
app: jenkins-app
spec:
securityContext:
fsGroup: 1000
containers:
- name: jenkins
imagePullPolicy: IfNotPresent
2018-05-04 19:53:39 +08:00
image: harbor-001.jimmysong.io/library/jenkins:lts
2018-01-05 16:34:39 +08:00
ports:
- containerPort: 8080
volumeMounts:
- mountPath: /var/jenkins_home
name: jenkins-home
volumes:
- name: jenkins-home
persistentVolumeClaim:
claimName: jenkins-claim
---
apiVersion: v1
kind: Service
metadata:
name: jenkins-svc
spec:
ports:
- port: 80
targetPort: 8080
selector:
app: jenkins-app
type: NodePort