---
apiVersion: apps/v1
kind: Deployment

metadata:
  name: keel-operator
  labels:
    app.kubernetes.io/name: keel
    app.kubernetes.io/component: operator

spec:
  replicas: 1
  revisionHistoryLimit: 3

  strategy:
    type: Recreate

  selector:
    matchLabels:
      app.kubernetes.io/name: keel
      app.kubernetes.io/component: operator

  template:
    metadata:
      labels:
        app.kubernetes.io/name: keel
        app.kubernetes.io/component: operator

    spec:
      enableServiceLinks: false
      serviceAccountName: keel-operator

      containers:
        - name: server
          image: keel-operator
          imagePullPolicy: IfNotPresent

          command:
            - /bin/keel

          env:
            - name: NAMESPACE
              valueFrom:
                fieldRef:
                  fieldPath: metadata.namespace

          envFrom:
            - configMapRef:
                name: keel-operator
            - secretRef:
                name: keel-operator

          ports:
            - name: http
              containerPort: 9300
              protocol: TCP

          livenessProbe:
            httpGet:
              path: /healthz
              port: http
            initialDelaySeconds: 30
            timeoutSeconds: 10

          readinessProbe:
            httpGet:
              path: /healthz
              port: 9300
            initialDelaySeconds: 30
            timeoutSeconds: 10

          resources:
            limits:
              cpu: 100m
              memory: 128Mi
            requests:
              cpu: 100m
              memory: 64Mi

...
