apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    control-plane: controller-manager
  name: special-resource-controller-manager
  namespace: openshift-special-resource-operator
spec:
  replicas: 1
  selector:
    matchLabels:
      control-plane: controller-manager
  template:
    metadata:
      labels:
        control-plane: controller-manager
    spec:
      containers:
      - args:
        - --secure-listen-address=0.0.0.0:8443
        - --upstream=http://127.0.0.1:8080/
        - --logtostderr=true
        - --v=10
        - --tls-cert-file=/etc/secrets/tls.crt
        - --tls-private-key-file=/etc/secrets/tls.key
        - --tls-cipher-suites=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_RSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256
        image: registry.redhat.io/openshift4/ose-kube-rbac-proxy
        name: kube-rbac-proxy
        ports:
        - containerPort: 8443
          name: https
          protocol: TCP
        resources:
          limits:
            cpu: 500m
            memory: 128Mi
          requests:
            cpu: 250m
            memory: 64Mi
        securityContext:
          readOnlyRootFilesystem: true
        volumeMounts:
        - mountPath: /etc/secrets
          name: special-resource-operator-tls
      - args:
        - --metrics-addr=127.0.0.1:8080
        - --enable-leader-election
        command:
        - /manager
        env:
        - name: OPERATOR_NAMESPACE
          valueFrom:
            fieldRef:
              fieldPath: metadata.namespace
        - name: RELEASE_VERSION
          value: 0.0.1-snapshot
        - name: SSL_CERT_DIR
          value: /etc/pki/tls/certs
        image: quay.io/openshift-psap/special-resource-operator:operator-sdk-version
        imagePullPolicy: Always
        name: manager
        resources:
          limits:
            cpu: 300m
            memory: 500Mi
          requests:
            cpu: 300m
            memory: 500Mi
        securityContext:
          allowPrivilegeEscalation: false
          readOnlyRootFilesystem: true
        volumeMounts:
        - mountPath: /cache
          name: cache-volume
        - mountPath: /home/nonroot/.docker
          name: cred-volume
      securityContext:
        runAsGroup: 499
        runAsNonRoot: true
        runAsUser: 499
      serviceAccountName: special-resource-controller-manager
      terminationGracePeriodSeconds: 10
      volumes:
      - name: special-resource-operator-tls
        secret:
          secretName: special-resource-operator-tls
      - emptyDir: {}
        name: cache-volume
      - emptyDir: {}
        name: cred-volume
