apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app.kubernetes.io/component: exporter
    app.kubernetes.io/managed-by: cluster-monitoring-operator
    app.kubernetes.io/name: openshift-state-metrics
    app.kubernetes.io/part-of: openshift-monitoring
  name: openshift-state-metrics
  namespace: openshift-monitoring
spec:
  replicas: 1
  selector:
    matchLabels:
      app.kubernetes.io/component: exporter
      app.kubernetes.io/name: openshift-state-metrics
  template:
    metadata:
      annotations:
        target.workload.openshift.io/management: '{"effect": "PreferredDuringScheduling"}'
      labels:
        app.kubernetes.io/component: exporter
        app.kubernetes.io/managed-by: cluster-monitoring-operator
        app.kubernetes.io/name: openshift-state-metrics
        app.kubernetes.io/part-of: openshift-monitoring
    spec:
      containers:
      - args:
        - --logtostderr
        - --secure-listen-address=:8443
        - --tls-cipher-suites=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305,TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305
        - --upstream=http://127.0.0.1:8081/
        - --tls-cert-file=/etc/tls/private/tls.crt
        - --tls-private-key-file=/etc/tls/private/tls.key
        - --config-file=/etc/kube-rbac-policy/config.yaml
        image: quay.io/brancz/kube-rbac-proxy:v0.11.0
        name: kube-rbac-proxy-main
        ports:
        - containerPort: 8443
          name: https-main
        resources:
          requests:
            cpu: 1m
            memory: 20Mi
        volumeMounts:
        - mountPath: /etc/tls/private
          name: openshift-state-metrics-tls
          readOnly: false
        - mountPath: /etc/kube-rbac-policy
          name: openshift-state-metrics-kube-rbac-proxy-config
          readOnly: true
      - args:
        - --logtostderr
        - --secure-listen-address=:9443
        - --tls-cipher-suites=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305,TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305
        - --upstream=http://127.0.0.1:8082/
        - --tls-cert-file=/etc/tls/private/tls.crt
        - --tls-private-key-file=/etc/tls/private/tls.key
        - --config-file=/etc/kube-rbac-policy/config.yaml
        image: quay.io/brancz/kube-rbac-proxy:v0.11.0
        name: kube-rbac-proxy-self
        ports:
        - containerPort: 9443
          name: https-self
        resources:
          requests:
            cpu: 1m
            memory: 20Mi
        volumeMounts:
        - mountPath: /etc/tls/private
          name: openshift-state-metrics-tls
          readOnly: false
        - mountPath: /etc/kube-rbac-policy
          name: openshift-state-metrics-kube-rbac-proxy-config
          readOnly: true
      - args:
        - --host=127.0.0.1
        - --port=8081
        - --telemetry-host=127.0.0.1
        - --telemetry-port=8082
        image: quay.io/openshift/origin-openshift-state-metrics:latest
        name: openshift-state-metrics
        resources:
          requests:
            cpu: 1m
            memory: 32Mi
      nodeSelector:
        kubernetes.io/os: linux
      priorityClassName: system-cluster-critical
      serviceAccountName: openshift-state-metrics
      volumes:
      - name: openshift-state-metrics-tls
        secret:
          secretName: openshift-state-metrics-tls
      - name: openshift-state-metrics-kube-rbac-proxy-config
        secret:
          secretName: openshift-state-metrics-kube-rbac-proxy-config
