apiVersion: apps/v1
kind: Deployment
metadata:
  name: kubedirector
spec:
  replicas: 1
  selector:
    matchLabels:
      name: kubedirector
  template:
    metadata:
      labels:
        name: kubedirector
    spec:
      serviceAccountName: kubedirector
      containers:
        - name: kubedirector
          # Replace this with the built image name
          image: REPLACE_IMAGE
          # A liveness probe is desirable for in-use deployments, but if you
          # are doing iterations of "make redeploy" during development then
          # then you may inadvertently trigger the probe. Uncomment the
          # following block if you want to enable the probe.
          #livenessProbe:
          #  httpGet:
          #    path: /healthz
          #    port: 8443
          #    scheme: HTTPS
          #  initialDelaySeconds: 10
          #  periodSeconds: 10
          #  timeoutSeconds: 10
          #  successThreshold: 1
          #  failureThreshold: 3
          ports:
          - containerPort: 60000
            name: metrics
          imagePullPolicy: Always
          env:
            - name: MY_NAMESPACE
              valueFrom:
                fieldRef:
                  fieldPath: metadata.namespace
            - name: WATCH_NAMESPACE
              valueFrom:
                fieldRef:
                  fieldPath: metadata.namespace
            - name: POD_NAME
              valueFrom:
                fieldRef:
                  fieldPath: metadata.name
            - name: OPERATOR_NAME
              value: "kubedirector"
