apiVersion: apps/v1
kind: Deployment
metadata:
  name: net-contour-controller
  namespace: knative-serving
  labels:
    networking.knative.dev/ingress-provider: contour
spec:
  replicas: 1
  selector:
    matchLabels:
      app: net-contour-controller
  template:
    metadata:
      labels:
        app: net-contour-controller
    spec:
      serviceAccountName: controller
      containers:
      - name: controller
        # This is the Go import path for the binary that is containerized
        # and substituted here.
        image: gcr.io/knative-releases/knative.dev/net-contour/cmd/controller@sha256:63983c389450277f379eb7079761c6ffb3d3f01768fed0a2db28c426d63039f7
        ports:
        - name: metrics
          containerPort: 9090
        - name: profiling
          containerPort: 8008
        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/net-contour
        resources:
          limits:
            cpu: 400m
            memory: 400Mi
          requests:
            cpu: 40m
            memory: 40Mi
        securityContext:
          allowPrivilegeEscalation: false
          capabilities:
            drop:
            - all
          readOnlyRootFilesystem: true
          runAsNonRoot: true
