apiVersion: apps/v1
kind: Deployment
metadata:
  name: controller
  namespace: openshift-pipelines
  labels:
    samples.knative.dev/release: devel
spec:
  replicas: 1
  selector:
    matchLabels:
      app: controller
  template:
    metadata:
      labels:
        app: controller
        samples.knative.dev/release: devel
    spec:
      serviceAccountName: imagestream-resource-controller
      containers:
        - name: controller
          # This is the Go import path for the binary that is containerized
          # and substituted here.
          image: github.com/openshift/imagestream-resource/cmd/controller
          volumeMounts:
            - name: config-logging
              mountPath: /etc/config-logging
          env:
            - name: OPENSHIFT_IMAGE_REGISTRY
              value: "<openshift-image-registry-url>"
            - name: SYSTEM_NAMESPACE
              valueFrom:
                fieldRef:
                  fieldPath: metadata.namespace
            - name: CONFIG_LOGGING_NAME
              value: config-logging
            - name: CONFIG_OBSERVABILITY_NAME
              value: config-observability
            - name: METRICS_DOMAIN
              value: tekton.dev/samples
      volumes:
        - name: config-logging
          configMap:
            name: config-logging
