aboutsummaryrefslogtreecommitdiffstats
path: root/kud/tests/vnfs/comp-app/collection/app2/helm/prometheus-operator/charts/kube-state-metrics/templates/deployment.yaml
blob: 99656046ce6f2c490241d9b482bfe6bb29caeb95 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
apiVersion: apps/v1
{{- if .Values.autosharding.enabled }}
kind: StatefulSet
{{- else }}
kind: Deployment
{{- end }}
metadata:
  name: {{ template "kube-state-metrics.fullname" . }}
  namespace: {{ template "kube-state-metrics.namespace" . }}
  labels:
    app.kubernetes.io/name: {{ template "kube-state-metrics.name" . }}
    helm.sh/chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
    app.kubernetes.io/instance: "{{ .Release.Name }}"
    app.kubernetes.io/managed-by: "{{ .Release.Service }}"
{{- if .Values.customLabels }}
{{ toYaml .Values.customLabels | indent 4 }}
{{- end }}
spec:
  selector:
    matchLabels:
      app.kubernetes.io/name: {{ template "kube-state-metrics.name" . }}
  replicas: {{ .Values.replicas }}
{{- if .Values.autosharding.enabled }}
  serviceName: {{ template "kube-state-metrics.fullname" . }}
  volumeClaimTemplates: []
{{- end }}
  template:
    metadata:
      labels:
        app.kubernetes.io/name: {{ template "kube-state-metrics.name" . }}
        app.kubernetes.io/instance: "{{ .Release.Name }}"
{{- if .Values.customLabels }}
{{ toYaml .Values.customLabels | indent 8 }}
{{- end }}
{{- if .Values.podAnnotations }}
      annotations:
{{ toYaml .Values.podAnnotations | indent 8 }}
{{- end }}
    spec:
      hostNetwork: {{ .Values.hostNetwork }}
      serviceAccountName: {{ template "kube-state-metrics.serviceAccountName" . }}
      {{- if .Values.securityContext.enabled }}
      securityContext:
        fsGroup: {{ .Values.securityContext.fsGroup }}
        runAsGroup: {{ .Values.securityContext.runAsGroup }}
        runAsUser: {{ .Values.securityContext.runAsUser }}
      {{- end }}
    {{- if .Values.priorityClassName }}
      priorityClassName: {{ .Values.priorityClassName }}
    {{- end }}
      containers:
      - name: {{ .Chart.Name }}
{{- if .Values.autosharding.enabled }}
        env:
        - name: POD_NAME
          valueFrom:
            fieldRef:
              fieldPath: metadata.name
        - name: POD_NAMESPACE
          valueFrom:
            fieldRef:
              fieldPath: metadata.namespace
{{- end }}
        args:
{{  if .Values.collectors.certificatesigningrequests  }}
        - --collectors=certificatesigningrequests
{{  end  }}
{{  if .Values.collectors.configmaps  }}
        - --collectors=configmaps
{{  end  }}
{{  if .Values.collectors.cronjobs  }}
        - --collectors=cronjobs
{{  end  }}
{{ if .Values.collectors.daemonsets  }}
        - --collectors=daemonsets
{{  end  }}
{{  if .Values.collectors.deployments  }}
        - --collectors=deployments
{{  end  }}
{{  if .Values.collectors.endpoints  }}
        - --collectors=endpoints
{{  end  }}
{{  if .Values.collectors.horizontalpodautoscalers  }}
        - --collectors=horizontalpodautoscalers
{{  end  }}
{{  if .Values.collectors.ingresses  }}
        - --collectors=ingresses
{{  end  }}
{{  if .Values.collectors.jobs  }}
        - --collectors=jobs
{{  end  }}
{{  if .Values.collectors.limitranges  }}
        - --collectors=limitranges
{{  end  }}
{{  if .Values.collectors.mutatingwebhookconfigurations  }}
        - --collectors=mutatingwebhookconfigurations
{{  end  }}
{{  if .Values.collectors.namespaces  }}
        - --collectors=namespaces
{{  end  }}
{{  if .Values.collectors.networkpolicies  }}
        - --collectors=networkpolicies
{{  end  }}
{{  if .Values.collectors.nodes  }}
        - --collectors=nodes
{{  end  }}
{{  if .Values.collectors.persistentvolumeclaims  }}
        - --collectors=persistentvolumeclaims
{{  end  }}
{{  if .Values.collectors.persistentvolumes  }}
        - --collectors=persistentvolumes
{{  end  }}
{{  if .Values.collectors.poddisruptionbudgets  }}
        - --collectors=poddisruptionbudgets
{{  end  }}
{{  if .Values.collectors.pods  }}
        - --collectors=pods
{{  end  }}
{{  if .Values.collectors.replicasets  }}
        - --collectors=replicasets
{{  end  }}
{{  if .Values.collectors.replicationcontrollers  }}
        - --collectors=replicationcontrollers
{{  end  }}
{{  if .Values.collectors.resourcequotas  }}
        - --collectors=resourcequotas
{{  end  }}
{{  if .Values.collectors.secrets  }}
        - --collectors=secrets
{{  end  }}
{{  if .Values.collectors.services  }}
        - --collectors=services
{{  end  }}
{{  if .Values.collectors.statefulsets  }}
        - --collectors=statefulsets
{{  end  }}
{{  if .Values.collectors.storageclasses  }}
        - --collectors=storageclasses
{{  end  }}
{{  if .Values.collectors.validatingwebhookconfigurations  }}
        - --collectors=validatingwebhookconfigurations
{{  end  }}
{{  if .Values.collectors.verticalpodautoscalers  }}
        - --collectors=verticalpodautoscalers
{{  end  }}
{{  if .Values.collectors.volumeattachments  }}
        - --collectors=volumeattachments
{{  end  }}
{{ if .Values.namespace }}
        - --namespace={{ .Values.namespace }}
{{ end }}
{{ if .Values.autosharding.enabled }}
        - --pod=$(POD_NAME)
        - --pod-namespace=$(POD_NAMESPACE)
{{ end }}
        imagePullPolicy: {{ .Values.image.pullPolicy }}
        image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
        ports:
        - containerPort: 8080
        livenessProbe:
          httpGet:
            path: /healthz
            port: 8080
          initialDelaySeconds: 5
          timeoutSeconds: 5
        readinessProbe:
          httpGet:
            path: /
            port: 8080
          initialDelaySeconds: 5
          timeoutSeconds: 5
{{- if .Values.resources }}
        resources:
{{ toYaml .Values.resources | indent 10 }}
{{- end }}
{{- if .Values.imagePullSecrets }}
      imagePullSecrets:
{{ toYaml .Values.imagePullSecrets | indent 8 }}
{{- end }}
{{- if .Values.affinity }}
      affinity:
{{ toYaml .Values.affinity | indent 8 }}
{{- end }}
{{- if .Values.nodeSelector }}
      nodeSelector:
{{ toYaml .Values.nodeSelector | indent 8 }}
{{- end }}
{{- if .Values.tolerations }}
      tolerations:
{{ toYaml .Values.tolerations | indent 8 }}
{{- end }}