Add support for custom probes (#7137)

* Add support for custom probes

* Fix lint issue with comment

* Bump chart version

* Fix lint issue
This commit is contained in:
Brian Harwell 2021-05-18 09:37:31 -04:00 committed by GitHub
parent 93070faaff
commit 293071ae02
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 39 additions and 49 deletions

View file

@ -2,7 +2,7 @@ apiVersion: v2
name: ingress-nginx name: ingress-nginx
# When the version is modified, make sure the artifacthub.io/changes list is updated # When the version is modified, make sure the artifacthub.io/changes list is updated
# Also update CHANGELOG.md # Also update CHANGELOG.md
version: 3.30.0 version: 3.31.0
appVersion: 0.46.0 appVersion: 0.46.0
home: https://github.com/kubernetes/ingress-nginx home: https://github.com/kubernetes/ingress-nginx
description: Ingress controller for Kubernetes using NGINX as a reverse proxy and load balancer description: Ingress controller for Kubernetes using NGINX as a reverse proxy and load balancer

View file

@ -139,26 +139,11 @@ spec:
{{- if .Values.controller.extraEnvs }} {{- if .Values.controller.extraEnvs }}
{{- toYaml .Values.controller.extraEnvs | nindent 12 }} {{- toYaml .Values.controller.extraEnvs | nindent 12 }}
{{- end }} {{- end }}
livenessProbe: {{- if .Values.controller.startupProbe }}
httpGet: startupProbe: {{ toYaml .Values.controller.startupProbe | nindent 12 }}
path: {{ .Values.controller.healthCheckPath }} {{- end }}
port: {{ .Values.controller.livenessProbe.port }} livenessProbe: {{ toYaml .Values.controller.livenessProbe | nindent 12 }}
scheme: HTTP readinessProbe: {{ toYaml .Values.controller.readinessProbe | nindent 12 }}
initialDelaySeconds: {{ .Values.controller.livenessProbe.initialDelaySeconds }}
periodSeconds: {{ .Values.controller.livenessProbe.periodSeconds }}
timeoutSeconds: {{ .Values.controller.livenessProbe.timeoutSeconds }}
successThreshold: {{ .Values.controller.livenessProbe.successThreshold }}
failureThreshold: {{ .Values.controller.livenessProbe.failureThreshold }}
readinessProbe:
httpGet:
path: {{ .Values.controller.healthCheckPath }}
port: {{ .Values.controller.readinessProbe.port }}
scheme: HTTP
initialDelaySeconds: {{ .Values.controller.readinessProbe.initialDelaySeconds }}
periodSeconds: {{ .Values.controller.readinessProbe.periodSeconds }}
timeoutSeconds: {{ .Values.controller.readinessProbe.timeoutSeconds }}
successThreshold: {{ .Values.controller.readinessProbe.successThreshold }}
failureThreshold: {{ .Values.controller.readinessProbe.failureThreshold }}
ports: ports:
{{- range $key, $value := .Values.controller.containerPort }} {{- range $key, $value := .Values.controller.containerPort }}
- name: {{ $key }} - name: {{ $key }}

View file

@ -140,26 +140,11 @@ spec:
{{- if .Values.controller.extraEnvs }} {{- if .Values.controller.extraEnvs }}
{{- toYaml .Values.controller.extraEnvs | nindent 12 }} {{- toYaml .Values.controller.extraEnvs | nindent 12 }}
{{- end }} {{- end }}
livenessProbe: {{- if .Values.controller.startupProbe }}
httpGet: startupProbe: {{ toYaml .Values.controller.startupProbe | nindent 12 }}
path: {{ .Values.controller.healthCheckPath }} {{- end }}
port: {{ .Values.controller.livenessProbe.port }} livenessProbe: {{ toYaml .Values.controller.livenessProbe | nindent 12 }}
scheme: HTTP readinessProbe: {{ toYaml .Values.controller.readinessProbe | nindent 12 }}
initialDelaySeconds: {{ .Values.controller.livenessProbe.initialDelaySeconds }}
periodSeconds: {{ .Values.controller.livenessProbe.periodSeconds }}
timeoutSeconds: {{ .Values.controller.livenessProbe.timeoutSeconds }}
successThreshold: {{ .Values.controller.livenessProbe.successThreshold }}
failureThreshold: {{ .Values.controller.livenessProbe.failureThreshold }}
readinessProbe:
httpGet:
path: {{ .Values.controller.healthCheckPath }}
port: {{ .Values.controller.readinessProbe.port }}
scheme: HTTP
initialDelaySeconds: {{ .Values.controller.readinessProbe.initialDelaySeconds }}
periodSeconds: {{ .Values.controller.readinessProbe.periodSeconds }}
timeoutSeconds: {{ .Values.controller.readinessProbe.timeoutSeconds }}
successThreshold: {{ .Values.controller.readinessProbe.successThreshold }}
failureThreshold: {{ .Values.controller.readinessProbe.failureThreshold }}
ports: ports:
{{- range $key, $value := .Values.controller.containerPort }} {{- range $key, $value := .Values.controller.containerPort }}
- name: {{ $key }} - name: {{ $key }}

View file

@ -251,20 +251,40 @@ controller:
## Liveness and readiness probe values ## Liveness and readiness probe values
## Ref: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes ## Ref: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes
## ##
# startupProbe:
# httpGet:
# # should match container.healthCheckPath
# path: "/healthz"
# port: 10254
# scheme: HTTP
# initialDelaySeconds: 5
# periodSeconds: 5
# timeoutSeconds: 2
# successThreshold: 1
# failureThreshold: 5
livenessProbe: livenessProbe:
httpGet:
# should match container.healthCheckPath
path: "/healthz"
port: 10254
scheme: HTTP
initialDelaySeconds: 10
periodSeconds: 10
timeoutSeconds: 1
successThreshold: 1
failureThreshold: 5 failureThreshold: 5
initialDelaySeconds: 10
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 1
port: 10254
readinessProbe: readinessProbe:
failureThreshold: 3 httpGet:
# should match container.healthCheckPath
path: "/healthz"
port: 10254
scheme: HTTP
initialDelaySeconds: 10 initialDelaySeconds: 10
periodSeconds: 10 periodSeconds: 10
successThreshold: 1
timeoutSeconds: 1 timeoutSeconds: 1
port: 10254 successThreshold: 1
failureThreshold: 3
# Path of the health check endpoint. All requests received on the port defined by # Path of the health check endpoint. All requests received on the port defined by
# the healthz-port parameter are forwarded internally to this path. # the healthz-port parameter are forwarded internally to this path.