apiVersion: apps/v1
kind: Deployment
metadata:
  name: ks-devops-apiserver
  namespace: kubesphere-devops-system
  labels:
    app: ks-devops-apiserver
spec:
  selector:
    matchLabels:
      app: ks-devops-apiserver
  replicas: 1
  template:
    metadata:
      labels:
        app: ks-devops-apiserver
    spec:
      containers:
      - image: kubesphere/devops:latest
        imagePullPolicy: Always
        name: devops
        env:
        - name: DEVOPSPHERE_MYSQL_USERNAME
          value: "root"
        - name: DEVOPSPHERE_MYSQL_PASSWORD
          value: "password"
        - name: DEVOPSPHERE_MYSQL_DATABASE
          value: "devops"
        - name: DEVOPSPHERE_JENKINS_ADDRESS
          value: "http://jenkins.kube-devops.svc/"
        - name: DEVOPSPHERE_JENKINS_USER
          value: "admin"
        - name: DEVOPSPHERE_JENKINS_PASSWORD
          value: "password"
        - name: DEVOPSPHERE_MYSQL_HOST
          value: "openpitrix-db.openpitrix-system.svc"
        - name: DEVOPSPHERE_MYSQL_PORT
          value: "3306"
        - name: DEVOPSPHERE_IP
          valueFrom:
            fieldRef:
              fieldPath: status.podIP
        ports:
        - containerPort: 8080
