# Source: prometheus/charts/kube-state-metrics/templates/deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: prometheus-kube-state-metrics
  namespace: jx-observability
  labels:
    app.kubernetes.io/name: kube-state-metrics
    helm.sh/chart: "kube-state-metrics-2.13.0"
    app.kubernetes.io/instance: "prometheus"
    app.kubernetes.io/managed-by: "Helm"
    app.kubernetes.io/version: "1.9.8"
    gitops.jenkins-x.io/pipeline: 'namespaces'
  annotations:
    meta.helm.sh/release-name: 'prometheus'
    wave.pusher.com/update-on-config-change: 'true'
spec:
  selector:
    matchLabels:
      app.kubernetes.io/name: kube-state-metrics
  replicas: 1
  template:
    metadata:
      labels:
        app.kubernetes.io/name: kube-state-metrics
        app.kubernetes.io/instance: "prometheus"
    spec:
      hostNetwork: false
      serviceAccountName: prometheus-kube-state-metrics
      securityContext:
        fsGroup: 65534
        runAsGroup: 65534
        runAsUser: 65534
      containers:
        - name: kube-state-metrics
          args:
            - --collectors=certificatesigningrequests
            - --collectors=configmaps
            - --collectors=cronjobs
            - --collectors=daemonsets
            - --collectors=deployments
            - --collectors=endpoints
            - --collectors=horizontalpodautoscalers
            - --collectors=ingresses
            - --collectors=jobs
            - --collectors=limitranges
            - --collectors=mutatingwebhookconfigurations
            - --collectors=namespaces
            - --collectors=networkpolicies
            - --collectors=nodes
            - --collectors=persistentvolumeclaims
            - --collectors=persistentvolumes
            - --collectors=poddisruptionbudgets
            - --collectors=pods
            - --collectors=replicasets
            - --collectors=replicationcontrollers
            - --collectors=resourcequotas
            - --collectors=secrets
            - --collectors=services
            - --collectors=statefulsets
            - --collectors=storageclasses
            - --collectors=validatingwebhookconfigurations
            - --collectors=volumeattachments
            - --telemetry-port=8081
          imagePullPolicy: IfNotPresent
          image: "k8s.gcr.io/kube-state-metrics/kube-state-metrics:v1.9.8"
          ports:
            - containerPort: 8080
          livenessProbe:
            httpGet:
              path: /healthz
              port: 8080
            initialDelaySeconds: 5
            timeoutSeconds: 5
          readinessProbe:
            httpGet:
              path: /
              port: 8080
            initialDelaySeconds: 5
            timeoutSeconds: 5
