---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: jenkins
  #namespace: jenkins
spec:
  replicas: 1
  selector:
    matchLabels:
      app: master
  template:
    metadata:
      labels:
        app: master
    spec:
      containers:
        - env:
          - name: JENKINS_OPTS
            value: "--argumentsRealm.passwd.jenkins=CHANGE_ME --argumentsRealm.roles.jenkins=admin"
          - name: JAVA_OPTS
            value: "-Xmx1400m"
          image: URL/paasta_jenkins:latest
          name: master
          ports:
            - containerPort: 8080
          readinessProbe:
            failureThreshold: 5
            httpGet:
              path: /login
              port: 8080
            periodSeconds: 10
            successThreshold: 2
            timeoutSeconds: 5
          volumeMounts:
            - mountPath: /var/run/docker.sock
              name: docker-socket
      imagePullSecrets:
        - name: paasta

      volumes:
        - hostPath:
            path: /var/vcap/sys/run/docker/docker.sock
          name: docker-socket


