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

On larger clusters the default timeout of 1s isn't enough.  Use HTK to
expose settings and adjust defaults to be suitable for larger
clusters.

Change-Id: I2336c64d20fe689a5c7f22e8fbd170a27b1a1045
This commit is contained in:
Chris Wedgwood 2020-02-25 17:07:05 +00:00
parent e54f5f778f
commit a23de914ce
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: