Skip to content

Allow StartupProbe to be configured via helm #8011

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions charts/nginx-ingress/templates/controller-daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -86,13 +86,30 @@ spec:
{{- if .Values.controller.readyStatus.enable }}
- name: readiness-port
containerPort: {{ .Values.controller.readyStatus.port }}
{{- end }}
{{- if .Values.controller.startupStatus.enable }}
- name: startup-port
containerPort: {{ .Values.controller.startupStatus.port }}
{{- end }}
{{- if .Values.controller.readyStatus.enable }}
readinessProbe:
httpGet:
path: /nginx-ready
port: readiness-port
periodSeconds: 1
initialDelaySeconds: {{ .Values.controller.readyStatus.initialDelaySeconds }}
{{- end }}
{{- if .Values.controller.startupStatus.enable }}
startupProbe:
httpGet:
path: {{ .Values.controller.startupStatus.path }}
port: startup-port
initialDelaySeconds: {{ .Values.controller.startupStatus.initialDelaySeconds }}
periodSeconds: {{ .Values.controller.startupStatus.periodSeconds }}
timeoutSeconds: {{ .Values.controller.startupStatus.timeoutSeconds }}
successThreshold: {{ .Values.controller.startupStatus.successThreshold }}
failureThreshold: {{ .Values.controller.startupStatus.failureThreshold }}
{{- end }}
{{- if .Values.controller.securityContext }}
securityContext:
{{ toYaml .Values.controller.securityContext | indent 10 }}
Expand Down
17 changes: 17 additions & 0 deletions charts/nginx-ingress/templates/controller-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -93,12 +93,29 @@ spec:
{{- if .Values.controller.readyStatus.enable }}
- name: readiness-port
containerPort: {{ .Values.controller.readyStatus.port }}
{{- end }}
{{- if .Values.controller.startupStatus.enable }}
- name: startup-port
containerPort: {{ .Values.controller.startupStatus.port }}
{{- end }}
{{- if .Values.controller.readyStatus.enable }}
readinessProbe:
httpGet:
path: /nginx-ready
port: readiness-port
periodSeconds: 1
initialDelaySeconds: {{ .Values.controller.readyStatus.initialDelaySeconds }}
{{- end }}
{{- if .Values.controller.startupStatus.enable }}
startupProbe:
httpGet:
path: {{ .Values.controller.startupStatus.path }}
port: startup-port
initialDelaySeconds: {{ .Values.controller.startupStatus.initialDelaySeconds }}
periodSeconds: {{ .Values.controller.startupStatus.periodSeconds }}
timeoutSeconds: {{ .Values.controller.startupStatus.timeoutSeconds }}
successThreshold: {{ .Values.controller.startupStatus.successThreshold }}
failureThreshold: {{ .Values.controller.startupStatus.failureThreshold }}
{{- end }}
resources:
{{ toYaml .Values.controller.resources | indent 10 }}
Expand Down
92 changes: 92 additions & 0 deletions charts/nginx-ingress/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -1758,6 +1758,98 @@
}
]
},
"startupStatus": {
"type": "object",
"default": {},
"title": "The startupStatus",
"required": [],
"properties": {
"enable": {
"type": "boolean",
"default": false,
"title": "Enable the startup probe",
"examples": [
true
]
},
"port": {
"type": "integer",
"default": 0,
"title": "The port for the startup probe",
"examples": [
9999
]
},
"path": {
"type": "string",
"default": "",
"title": "The path for the startup probe",
"examples": [
"/"
]
},
"initialDelaySeconds": {
"type": "integer",
"default": 0,
"title": "Initial delay seconds for the startup probe",
"$ref": "https://raw.githubusercontent.com/nginxinc/kubernetes-json-schema/master/v1.33.1/_definitions.json#/definitions/io.k8s.api.core.v1.Probe/properties/initialDelaySeconds"
},
"periodSeconds": {
"type": "integer",
"default": 0,
"title": "Period seconds for the startup probe",
"$ref": "https://raw.githubusercontent.com/nginxinc/kubernetes-json-schema/master/v1.33.1/_definitions.json#/definitions/io.k8s.api.core.v1.Probe/properties/periodSeconds"
},
"timeoutSeconds": {
"type": "integer",
"default": 0,
"title": "Timeout seconds for the startup probe",
"$ref": "https://raw.githubusercontent.com/nginxinc/kubernetes-json-schema/master/v1.33.1/_definitions.json#/definitions/io.k8s.api.core.v1.Probe/properties/timeoutSeconds"
},
"successThreshold": {
"type": "integer",
"default": 0,
"title": "Success threshold for the startup probe",
"$ref": "https://raw.githubusercontent.com/nginxinc/kubernetes-json-schema/master/v1.33.1/_definitions.json#/definitions/io.k8s.api.core.v1.Probe/properties/successThreshold"
},
"failureThreshold": {
"type": "integer",
"default": 0,
"title": "Failure threshold for the startup probe",
"$ref": "https://raw.githubusercontent.com/nginxinc/kubernetes-json-schema/master/v1.33.1/_definitions.json#/definitions/io.k8s.api.core.v1.Probe/properties/failureThreshold"
}
},
"allOf": [
{
"if": {
"properties": {
"enable": {
"const": true
}
}
},
"then": {
"required": [
"enable",
"port",
"path"
]
}
}
],
"examples": [
{
"enable": true,
"port": 9999,
"path": "/",
"initialDelaySeconds": 5,
"periodSeconds": 1,
"timeoutSeconds": 1,
"successThreshold": 1,
"failureThreshold": 30
}
]
},
"enableLatencyMetrics": {
"type": "boolean",
"default": false,
Expand Down
26 changes: 26 additions & 0 deletions charts/nginx-ingress/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -566,6 +566,32 @@ controller:
## The number of seconds after the Ingress Controller pod has started before readiness probes are initiated.
initialDelaySeconds: 0

startupStatus:

## Enable the startup probe.
enable: false

# ## Set the port where the startup endpoint is exposed.
# port: 9999

# # # path to the startup endpoint.
# path: /

# ## The number of seconds after the Ingress Controller pod has started before startup probes are initiated.
# initialDelaySeconds: 5

# ## The number of seconds between each startup probe.
# periodSeconds: 1

# ## The number of seconds after which the startup probe times out.
# timeoutSeconds: 1

# ## The number of seconds after which the startup probe is considered successful.
# successThreshold: 1

# ## The number of seconds after which the startup probe is considered failed.
# failureThreshold: 30

## Enable collection of latency metrics for upstreams. Requires prometheus.create.
enableLatencyMetrics: false

Expand Down
Loading
Loading