apiVersion: apps/v1
kind: Deployment
metadata:
  name: functions-controller
  namespace: knative-functions
spec:
  replicas: 1
  selector:
    matchLabels:
      app: functions-controller
  template:
    metadata:
      annotations:
        sidecar.istio.io/inject: "false"
      labels:
        app: functions-controller
    spec:
      serviceAccountName: functions-controller
      containers:
      - name: functions-controller
        image: github.com/lionelvillard/knative-functions-controller/cmd/controller
        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: knative.dev/function
        ports:
          - containerPort: 9090
            name: metrics
        volumeMounts:
        - name: config-logging
          mountPath: /etc/config-logging
      volumes:
        - name: config-logging
          configMap:
            name: config-logging