apiVersion: apps/v1
kind: Deployment
metadata:
  name: tekton-pipelineloop-controller
  namespace: tekton-pipelines
  labels:
    app.kubernetes.io/name: controller
    app.kubernetes.io/component: controller
    app.kubernetes.io/instance: default
    app.kubernetes.io/version: "devel"
    app.kubernetes.io/part-of: tekton-pipeline-loops
    # tekton.dev/release value replaced with inputs.params.versionTag in pipeline/tekton/publish.yaml
    pipeline.tekton.dev/release: "devel"
    # labels below are related to istio and should not be used for resource lookup
    version: "devel"
spec:
  replicas: 1
  selector:
    matchLabels:
      app.kubernetes.io/name: controller
      app.kubernetes.io/component: controller
      app.kubernetes.io/instance: default
      app.kubernetes.io/part-of: tekton-pipeline-loops
  template:
    metadata:
      annotations:
        cluster-autoscaler.kubernetes.io/safe-to-evict: "false"
      labels:
        app.kubernetes.io/name: controller
        app.kubernetes.io/component: controller
        app.kubernetes.io/instance: default
        app.kubernetes.io/version: "devel"
        app.kubernetes.io/part-of: tekton-pipeline-loops
        # tekton.dev/release value replaced with inputs.params.versionTag in pipeline/tekton/publish.yaml
        pipeline.tekton.dev/release: "devel"
        # labels below are related to istio and should not be used for resource lookup
        app: tekton-pipelineloop-controller
        version: "devel"
    spec:
      serviceAccountName: tekton-pipelineloop-controller
      containers:
      - name: tekton-pipelineloop-controller
        image: docker.io/aipipeline/pipelineloop-controller:nightly
        env:
        - name: SYSTEM_NAMESPACE
          valueFrom:
            fieldRef:
              fieldPath: metadata.namespace
        - name: CONFIG_LEADERELECTION_NAME
          value: config-leader-election
        - name: CONFIG_LOGGING_NAME
          value: config-logging
        - name: CONFIG_OBSERVABILITY_NAME
          value: config-observability
        - name: METRICS_DOMAIN
          value: tekton.dev/pipeline
