apiVersion: apps/v1
kind: Deployment
metadata:
  name: kube-state-metrics
  annotations:
    kubeRbacProxy: "quay.io/brancz/kube-rbac-proxy:v0.8.0"
spec:
  replicas: 1
  selector:
    matchLabels:
      app: kube-state-metrics
  template:
    metadata:
      labels:
        app: kube-state-metrics
    spec:
      serviceAccountName: kube-state-metrics
      securityContext:
        runAsUser: 1001
      containers:
        - name: kube-state-metrics
          # v1.9.7
          image: quay.io/coreos/kube-state-metrics:v1.9.7@sha256:2f82f0da199c60a7699c43c63a295c44e673242de0b7ee1b17c2d5a23bec34cb
          imagePullPolicy: IfNotPresent
          args:
            - --host=127.0.0.1
            - --port=8081
            - --telemetry-host=127.0.0.1
            - --telemetry-port=8082
          # ports not exposed because proxied by sidecar container
          # 8081 -> 8443 on kube-rbac-proxy-main
          # 8082 -> 9443 on kube-rbac-proxy-self
          resources:
            requests:
              cpu: 100m
              memory: 150Mi
            limits:
              cpu: 100m
              memory: 150Mi
          # MISSING
          # liveness
          # readiness
        - name: kube-rbac-proxy-main
          # v0.8.0
          image: quay.io/brancz/kube-rbac-proxy:v0.8.0@sha256:f5a13092303d1888a1b05b24a8ec15059561c266dd2b35a0be1e92e4d39ac926
          imagePullPolicy: IfNotPresent
          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/
          ports:
            - name: https-main
              containerPort: 8443
          resources:
            requests:
              cpu: 10m
              memory: 20Mi
            limits:
              cpu: 20m
              memory: 40Mi
          # MISSING
          # liveness
          # readiness
        - name: kube-rbac-proxy-self
          # v0.8.0
          image: quay.io/brancz/kube-rbac-proxy:v0.8.0@sha256:f5a13092303d1888a1b05b24a8ec15059561c266dd2b35a0be1e92e4d39ac926
          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/
          ports:
            - name: https-self
              containerPort: 9443
          resources:
            requests:
              cpu: 10m
              memory: 20Mi
            limits:
              cpu: 20m
              memory: 40Mi
          # MISSING
          # liveness
          # readiness
