apiVersion: apps/v1
kind: Deployment
metadata:
  name: bindings-controller
  namespace: binding-system
spec:
  replicas: 1
  selector:
    matchLabels:
      app: binding-system
  template:
    metadata:
      labels:
        app: binding-system
        eventing.knative.dev/release: devel
    spec:
      serviceAccountName: controller

      containers:
        - name: binding-system
          terminationMessagePolicy: FallbackToLogsOnError
          image: ko://github.com/projectriff/bindings/cmd/controller

          resources:
            requests:
              cpu: 100m
              memory: 100Mi

          env:
            - 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: projectriff.io/bindings

          securityContext:
            allowPrivilegeEscalation: false

          ports:
            - name: metrics
              containerPort: 9090
            - name: profiling
              containerPort: 8008