apiVersion: v1
kind: Namespace
metadata:
  labels:
    control-plane: controller-manager
  name: system
---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: deployment
spec:
  template:
    metadata:
      labels:
        app: notebook-controller
        kustomize.component: notebook-controller
    spec:
      containers:
      - name: manager
        image: public.ecr.aws/j1r0q0g6/notebooks/notebook-controller
        command:
          - /manager
        env:
          - name: USE_ISTIO
            valueFrom:
              configMapKeyRef:
                name: config
                key: USE_ISTIO
          - name: ISTIO_GATEWAY
            valueFrom:
              configMapKeyRef:
                name: config
                key: ISTIO_GATEWAY
          - name: CLUSTER_DOMAIN
            valueFrom:
              configMapKeyRef:
                name: config
                key: CLUSTER_DOMAIN
          - name: ENABLE_CULLING
            valueFrom:
              configMapKeyRef:
                name: config
                key: ENABLE_CULLING
          - name: CULL_IDLE_TIME
            valueFrom:
              configMapKeyRef:
                name: config
                key: CULL_IDLE_TIME
          - name: IDLENESS_CHECK_PERIOD
            valueFrom:
              configMapKeyRef:
                name: config
                key: IDLENESS_CHECK_PERIOD
        imagePullPolicy: IfNotPresent
        livenessProbe:
          httpGet:
            path: /healthz
            port: 8081
          initialDelaySeconds: 5
          periodSeconds: 10
        readinessProbe:
          httpGet:
            path: /readyz
            port: 8081
          initialDelaySeconds: 5
          periodSeconds: 10
      serviceAccountName: service-account
