# Source: tekton-pipeline/templates/tekton-pipelines-controller-deploy.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app.kubernetes.io/component: controller
    app.kubernetes.io/instance: default
    app.kubernetes.io/name: controller
    app.kubernetes.io/part-of: tekton-pipelines
    app.kubernetes.io/version: v0.24.1
    pipeline.tekton.dev/release: v0.24.1
    version: v0.24.1
    gitops.jenkins-x.io/pipeline: 'namespaces'
  name: tekton-pipelines-controller
  namespace: tekton-pipelines
  annotations:
    meta.helm.sh/release-name: 'tekton-pipeline'
    wave.pusher.com/update-on-config-change: 'true'
spec:
  replicas: 1
  selector:
    matchLabels:
      app.kubernetes.io/component: controller
      app.kubernetes.io/instance: default
      app.kubernetes.io/name: controller
      app.kubernetes.io/part-of: tekton-pipelines
  template:
    metadata:
      annotations:
        cluster-autoscaler.kubernetes.io/safe-to-evict: "false"
        fake: value
        prometheus.io/port: "9090"
        prometheus.io/scrape: "true"
      labels:
        app: tekton-pipelines-controller
        app.kubernetes.io/component: controller
        app.kubernetes.io/instance: default
        app.kubernetes.io/name: controller
        app.kubernetes.io/part-of: tekton-pipelines
        app.kubernetes.io/version: v0.24.1
        pipeline.tekton.dev/release: v0.24.1
        version: v0.24.1
    spec:
      affinity:
        nodeAffinity:
          requiredDuringSchedulingIgnoredDuringExecution:
            nodeSelectorTerms:
              - matchExpressions:
                  - key: kubernetes.io/os
                    operator: NotIn
                    values:
                      - windows
      containers:
        - args:
            - -version
            - v0.24.1
            - -kubeconfig-writer-image
            - gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/kubeconfigwriter:v0.24.1@sha256:6acb4d173d0e3400ee486095d93f6a0f46a225ebaa0ad34e3bbee4dfcebad3f8
            - -git-image
            - gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init:v0.24.1@sha256:52358dec303aa1349c2b4f23e6e483b479ba71214ef8e94c369cfe8e25af31fb
            - -entrypoint-image
            - gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/entrypoint:v0.24.1@sha256:b2133bcb5942dc9cc0ece08090924464aa60a2be80e8c53b8949312f5b60c37a
            - -nop-image
            - gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/nop:v0.24.1@sha256:980d1658252873937abed0b8ee5b328883f78771ef721d6f50077de3043ad4e5
            - -imagedigest-exporter-image
            - gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/imagedigestexporter:v0.24.1@sha256:65b26906f18276b4133184bbe5e23b91aac022acf48c24403dd78652490443c1
            - -pr-image
            - gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/pullrequest-init:v0.24.1@sha256:1a634bcb0f9b1cd7430a98041c09939b13c1216838c9cfa65b90801b38b683d8
            - -gsutil-image
            - gcr.io/google.com/cloudsdktool/cloud-sdk@sha256:27b2c22bf259d9bc1a291e99c63791ba0c27a04d2db0a43241ba0f1f20f4067f
            - -shell-image
            - gcr.io/distroless/base@sha256:aa4fd987555ea10e1a4ec8765da8158b5ffdfef1e72da512c7ede509bc9966c4
          env:
            - name: SYSTEM_NAMESPACE
              valueFrom:
                fieldRef:
                  fieldPath: metadata.namespace
            - name: CONFIG_DEFAULTS_NAME
              value: config-defaults
            - name: CONFIG_LOGGING_NAME
              value: config-logging
            - name: CONFIG_OBSERVABILITY_NAME
              value: config-observability
            - name: CONFIG_ARTIFACT_BUCKET_NAME
              value: config-artifact-bucket
            - name: CONFIG_ARTIFACT_PVC_NAME
              value: config-artifact-pvc
            - name: CONFIG_FEATURE_FLAGS_NAME
              value: feature-flags
            - name: CONFIG_LEADERELECTION_NAME
              value: config-leader-election
            - name: SSL_CERT_FILE
              value: /etc/config-registry-cert/cert
            - name: SSL_CERT_DIR
              value: /etc/ssl/certs
            - name: METRICS_DOMAIN
              value: tekton.dev/pipeline
          envFrom:
            - secretRef:
                name: 'jx-boot-job-env-vars'
                optional: true
          image: gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/controller:v0.24.1@sha256:c7578d9f48aa1c0c5f8d3fe6470c3c07dcab31f015038baac580995be4582506
          livenessProbe:
            httpGet:
              path: /health
              port: probes
              scheme: HTTP
            initialDelaySeconds: 5
            periodSeconds: 10
            timeoutSeconds: 5
          name: tekton-pipelines-controller
          ports:
            - containerPort: 8080
              name: probes
          readinessProbe:
            httpGet:
              path: /readiness
              port: probes
              scheme: HTTP
            initialDelaySeconds: 5
            periodSeconds: 10
            timeoutSeconds: 5
          securityContext:
            allowPrivilegeEscalation: false
            capabilities:
              drop:
                - all
            runAsGroup: 65532
            runAsUser: 65532
          volumeMounts:
            - mountPath: /etc/config-logging
              name: config-logging
            - mountPath: /etc/config-registry-cert
              name: config-registry-cert
      serviceAccountName: tekton-pipelines-controller
      volumes:
        - configMap:
            name: config-logging
          name: config-logging
        - configMap:
            name: config-registry-cert
          name: config-registry-cert
