Merge "prometheus-kube-state-metrics; expose readiness probe via HTK"

This commit is contained in:
Zuul 2020-03-04 20:55:04 +00:00 committed by Gerrit Code Review
commit c8983256af
2 changed files with 16 additions and 6 deletions

View File

@ -14,6 +14,12 @@ See the License for the specific language governing permissions and
limitations under the License.
*/}}
{{- define "kubeMetricsReadinessProbe" }}
httpGet:
path: /metrics
port: {{ tuple "kube_state_metrics" "internal" "http" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
{{- end }}
{{- if .Values.manifests.deployment }}
{{- $envAll := . }}
@ -125,12 +131,7 @@ spec:
ports:
- name: metrics
containerPort: {{ tuple "kube_state_metrics" "internal" "http" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
readinessProbe:
httpGet:
path: /metrics
port: {{ tuple "kube_state_metrics" "internal" "http" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
initialDelaySeconds: 20
periodSeconds: 10
{{ dict "envAll" . "component" "server" "container" "kube_metrics" "type" "readiness" "probeTemplate" (include "kubeMetricsReadinessProbe" . | fromYaml) | include "helm-toolkit.snippets.kubernetes_probe" | indent 10 -}}
volumeMounts:
- name: pod-tmp
mountPath: /tmp

View File

@ -37,6 +37,15 @@ labels:
node_selector_value: enabled
pod:
probes:
server:
kube_metrics:
readiness:
enabled: true
params:
initialDelaySeconds: 30
periodSeconds: 60
timeoutSeconds: 10
security_context:
exporter:
pod: