apiVersion: apps/v1
kind: Deployment
metadata:
    name: jenkins-deployment
spec:
    selector:
      matchLabels:
        app: jenkins
    replicas: 1
    template:
        metadata:
            labels:
                app: jenkins
        spec:
            containers:
            - name: jenkins
              image: eaingaran/jenkinswithdocker:v5
              ports:
              - name: http-port
                containerPort: 8080
              - name: jnlp-port
                containerPort: 50000
              volumeMounts:
              - name: jenkins-home
                mountPath: /var/jenkins_home
            volumes:
            - name: jenkins-home
              hostPath:
                path: /home/centos/data
                type: Directory
