apiVersion: apps/v1
kind: Deployment
metadata:
  name: tekton-pipelines-controller
  labels:
    app.kubernetes.io/component: tekton-pipelines-controller
    app.kubernetes.io/version: "v0.14.0"
    pipeline.tekton.dev/release: "v0.14.0"
    version: "v0.14.0"
spec:
  replicas: 1
  selector:
    matchLabels:
      app.kubernetes.io/component: tekton-pipelines-controller
  template:
    metadata:
      annotations:
        cluster-autoscaler.kubernetes.io/safe-to-evict: "false"
      labels:
        app.kubernetes.io/component: tekton-pipelines-controller
        app.kubernetes.io/version: "v0.14.0"
        pipeline.tekton.dev/release: "v0.14.0"
        app: tekton-pipelines-controller
        version: "v0.14.0"
    spec:
      serviceAccountName: tekton-pipelines-controller
      containers:
      - name: tekton-pipelines-controller
        image: $(tekton-registry)/$(controller)
        args: [
          "-kubeconfig-writer-image", $(tekton-registry)/$(kubeconfigwriter),
          "-creds-image", $(tekton-registry)/$(creds-init),
          "-git-image", $(tekton-registry)/$(git-init),
          "-entrypoint-image", $(tekton-registry)/$(entrypoint),
          "-imagedigest-exporter-image", $(tekton-registry)/$(imagedigestexporter),
          "-pr-image", $(tekton-registry)/$(pullrequest-init),
          "-build-gcs-fetcher-image", $(tekton-registry)/$(gcs-fetcher),
          "-affinity-assistant-image", $(affinity-registry)/$(affinity),
          "-nop-image", $(nop-registry)/$(nop),
          "-gsutil-image",$(gsutil-registry)/$(gsutil),
          "-shell-image", $(bash-registry)/$(bash)]
        volumeMounts:
        - name: config-logging
          mountPath: /etc/config-logging
        env:
        - name: SYSTEM_NAMESPACE
          valueFrom:
            fieldRef:
              fieldPath: metadata.namespace
        - 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: METRICS_DOMAIN
          value: tekton.dev/pipeline
      volumes:
      - name: config-logging
        configMap:
          name: config-logging
---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: tekton-pipelines-webhook
  labels:
    app.kubernetes.io/component: tekton-pipelines-webhook
    app.kubernetes.io/version: "v0.14.0"
    pipeline.tekton.dev/release: "v0.14.0"
    version: "v0.14.0"
spec:
  replicas: 1
  selector:
    matchLabels:
      app.kubernetes.io/component: tekton-pipelines-webhook
  template:
    metadata:
      annotations:
        cluster-autoscaler.kubernetes.io/safe-to-evict: "false"
      labels:
        app.kubernetes.io/component: tekton-pipelines-webhook
        app.kubernetes.io/version: "v0.14.0"
        pipeline.tekton.dev/release: "v0.14.0"
        app: tekton-pipelines-webhook
        version: "v0.14.0"
    spec:
      serviceAccountName: tekton-pipelines-webhook
      containers:
      - name: webhook
        image: $(tekton-registry)/$(webhook)
        env:
        - name: SYSTEM_NAMESPACE
          valueFrom:
            fieldRef:
              fieldPath: metadata.namespace
        - name: CONFIG_LOGGING_NAME
          value: config-logging
        - name: CONFIG_OBSERVABILITY_NAME
          value: config-observability
        - name: CONFIG_LEADERELECTION_NAME
          value: config-leader-election
        - name: WEBHOOK_SERVICE_NAME
          value: tekton-pipelines-webhook
        - name: WEBHOOK_SECRET_NAME
          value: webhook-certs
        - name: METRICS_DOMAIN
          value: tekton.dev/pipeline
        securityContext:
          allowPrivilegeEscalation: false
        ports:
        - name: metrics
          containerPort: 9090
        - name: profiling
          containerPort: 8008
        - name: https-webhook
          containerPort: 8443
