apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    service: auto-deploy
  name: auto-deploy-server
  namespace: auto-deploy
spec:
  replicas: 1
  selector:
    matchLabels:
      app: auto-deploy
      service: auto-deploy
  template:
    metadata:
      labels:
        app: auto-deploy
        service: auto-deploy
    spec:
      containers:
      - command:
        - python
        - -m
        - kubeflow.testing.auto_deploy.server
        - serve
        - --template-folder=/app/templates
        - --deployments-dir=/cache/deployments
        - --port=80
        env:
        - name: FLASK_DEBUG
          value: "true"
        image: gcr.io/kubeflow-ci/auto_deploy@sha256:7b30a7ad4aabcfede8dc9130b99265e213481037ab6a408178319328ba5d37a2
        name: server
        resources:
          requests:
            cpu: 2
            memory: 8Gi
        volumeMounts:
        - mountPath: /app/config
          name: config
        - mountPath: /cache
          name: cache
        workingDir: /app
      - command:
        - python
        - -m
        - kubeflow.testing.auto_deploy.reconciler
        - run
        - --config-path=/app/config/deployments.yaml
        - --job-template-path=/app/config/deploy-kubeflow.yaml
        - --local-dir=/cache/auto_deploy_src
        - --deployments-dir=/cache/deployments
        env:
        - name: JOB_NAMESPACE
          valueFrom:
            fieldRef:
              fieldPath: metadata.namespace
        image: gcr.io/kubeflow-ci/auto_deploy@sha256:7b30a7ad4aabcfede8dc9130b99265e213481037ab6a408178319328ba5d37a2
        name: reconciler
        resources:
          requests:
            cpu: 2
            memory: 8Gi
        volumeMounts:
        - mountPath: /app/config
          name: config
        - mountPath: /cache
          name: cache
        workingDir: /app
      - command:
        - python
        - -m
        - kubeflow.testing.auto_deploy.blueprint_reconciler
        - run
        - --pipelines-dir=/app/config/
        - --local-dir=/cache/blueprints_auto_deploy_src
        - --deployments-dir=/cache/deployments
        - --management-context=kf-ci-deployment-management
        - --tekton-context=kf-auto-deploy
        env:
        - name: JOB_NAMESPACE
          valueFrom:
            fieldRef:
              fieldPath: metadata.namespace
        - name: KUBECONFIG
          value: /cache/kubeconfig
        image: gcr.io/kubeflow-ci/auto_deploy@sha256:7b30a7ad4aabcfede8dc9130b99265e213481037ab6a408178319328ba5d37a2
        name: blueprints-reconciler
        resources:
          requests:
            cpu: 2
            memory: 8Gi
        volumeMounts:
        - mountPath: /app/config
          name: config
        - mountPath: /cache
          name: cache
        workingDir: /app
      initContainers:
      - command:
        - python
        - -m
        - kubeflow.testing.create_context
        - create
        - --project=kubeflow-ci
        - --cluster=kf-ci-management
        - --location=us-central1
        - --namespace=kubeflow-ci-management
        - --name=kf-ci-deployment-management
        env:
        - name: KUBECONFIG
          value: /cache/kubeconfig
        image: gcr.io/kubeflow-ci/auto_deploy@sha256:7b30a7ad4aabcfede8dc9130b99265e213481037ab6a408178319328ba5d37a2
        name: management-context
        volumeMounts:
        - mountPath: /cache
          name: cache
      - command:
        - python
        - -m
        - kubeflow.testing.create_context
        - create
        - --project=kubeflow-ci
        - --cluster=kf-ci-v1
        - --location=us-east1-d
        - --namespace=auto-deploy
        - --name=kf-auto-deploy
        env:
        - name: KUBECONFIG
          value: /cache/kubeconfig
        image: gcr.io/kubeflow-ci/auto_deploy@sha256:7b30a7ad4aabcfede8dc9130b99265e213481037ab6a408178319328ba5d37a2
        name: tekton-context
        volumeMounts:
        - mountPath: /cache
          name: cache
      serviceAccount: default-editor
      volumes:
      - configMap:
          name: auto-deploy-config-h45bmmttmt
        name: config
      - emptyDir: {}
        name: cache
