Probes with schema
This commit is contained in:
@@ -15,4 +15,4 @@ type: application
|
||||
# This is the chart version. This version number should be incremented each time you make changes
|
||||
# to the chart and its templates, including the app version.
|
||||
# Versions are expected to follow Semantic Versioning (https://semver.org/)
|
||||
version: 0.12.2
|
||||
version: 0.13.0
|
||||
|
||||
@@ -8,6 +8,21 @@
|
||||
"uiSchema": {
|
||||
"#/properties/replicas": {
|
||||
"ui:widget": "range"
|
||||
},
|
||||
"#/properties/probe/properties/settings/properties/initialDelaySeconds": {
|
||||
"ui:widget": "range"
|
||||
},
|
||||
"#/properties/probe/properties/settings/properties/periodSeconds": {
|
||||
"ui:widget": "range"
|
||||
},
|
||||
"#/properties/probe/properties/settings/properties/successThreshold": {
|
||||
"ui:widget": "range"
|
||||
},
|
||||
"#/properties/probe/properties/settings/properties/timeoutSeconds": {
|
||||
"ui:widget": "range"
|
||||
},
|
||||
"#/properties/probe/properties/settings/properties/failureThreshold": {
|
||||
"ui:widget": "range"
|
||||
}
|
||||
},
|
||||
"metaData": {
|
||||
|
||||
@@ -57,14 +57,13 @@ spec:
|
||||
protocol: TCP
|
||||
{{- if .Values.probe.enabled }}
|
||||
readinessProbe:
|
||||
failureThreshold: 3
|
||||
httpGet:
|
||||
path: {{ .Values.probe.path }}
|
||||
port: {{ .Values.containerPort }}
|
||||
scheme: HTTP
|
||||
periodSeconds: 10
|
||||
successThreshold: 1
|
||||
timeoutSeconds: 10
|
||||
{{- with .Values.probe.settings }}
|
||||
{{- toYaml . | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
volumeMounts: &volumeMounts
|
||||
{{- range .Values.volumes }}
|
||||
|
||||
@@ -11,15 +11,35 @@ tests:
|
||||
- equal:
|
||||
path: spec.template.spec.containers[0].readinessProbe
|
||||
value:
|
||||
failureThreshold: 3
|
||||
httpGet:
|
||||
path: "/"
|
||||
port: 80
|
||||
scheme: HTTP
|
||||
initialDelaySeconds: 0
|
||||
periodSeconds: 10
|
||||
successThreshold: 1
|
||||
timeoutSeconds: 10
|
||||
timeoutSeconds: 3
|
||||
failureThreshold: 3
|
||||
- it: Should not set a readinessProbe
|
||||
asserts:
|
||||
- isNull:
|
||||
path: spec.template.spec.containers[0].readinessProbe
|
||||
- it: Should tune readiness probe
|
||||
set:
|
||||
probe:
|
||||
enabled: true
|
||||
settings:
|
||||
periodSeconds: 30
|
||||
asserts:
|
||||
- equal:
|
||||
path: spec.template.spec.containers[0].readinessProbe
|
||||
value:
|
||||
httpGet:
|
||||
path: "/"
|
||||
port: 80
|
||||
scheme: HTTP
|
||||
initialDelaySeconds: 0
|
||||
periodSeconds: 30
|
||||
successThreshold: 1
|
||||
timeoutSeconds: 3
|
||||
failureThreshold: 3
|
||||
|
||||
@@ -352,6 +352,67 @@
|
||||
"examples": [
|
||||
"/"
|
||||
]
|
||||
},
|
||||
"settings": {
|
||||
"$id": "#/properties/probe/properties/settings",
|
||||
"type": "object",
|
||||
"title": "Probe thresholds",
|
||||
"description": "Tune the probe behavior",
|
||||
"examples": [
|
||||
{
|
||||
"failureThreshold": 3,
|
||||
"periodSeconds": 10,
|
||||
"successThreshold": 1,
|
||||
"timeoutSeconds": 10
|
||||
}
|
||||
],
|
||||
"properties": {
|
||||
"initialDelaySeconds": {
|
||||
"$id": "#/properties/probe/properties/settings/properties/initialDelaySeconds",
|
||||
"type": "integer",
|
||||
"title": "Initial Delay Seconds",
|
||||
"description": "Number of seconds after the container has started before the probes is initiated",
|
||||
"default": 0,
|
||||
"minimum": 0,
|
||||
"maximum": 60
|
||||
},
|
||||
"periodSeconds": {
|
||||
"$id": "#/properties/probe/properties/settings/properties/periodSeconds",
|
||||
"type": "integer",
|
||||
"title": "Period",
|
||||
"description": "How often (in seconds) to perform the probe",
|
||||
"default": 10,
|
||||
"minimum": 1,
|
||||
"maximum": 60
|
||||
},
|
||||
"successThreshold": {
|
||||
"$id": "#/properties/probe/properties/settings/properties/successThreshold",
|
||||
"type": "integer",
|
||||
"title": "Success Threshold",
|
||||
"description": "Minimum consecutive successes for the probe to be considered successful after having failed",
|
||||
"default": 1,
|
||||
"minimum": 1,
|
||||
"maximum": 15
|
||||
},
|
||||
"timeoutSeconds": {
|
||||
"$id": "#/properties/probe/properties/settings/properties/timeoutSeconds",
|
||||
"type": "integer",
|
||||
"title": "Timeout",
|
||||
"description": "Number of seconds after which the probe times out",
|
||||
"default": 3,
|
||||
"minimum": 1,
|
||||
"maximum": 30
|
||||
},
|
||||
"failureThreshold": {
|
||||
"$id": "#/properties/probe/properties/settings/properties/failureThreshold",
|
||||
"type": "integer",
|
||||
"title": "Failure Threshold",
|
||||
"description": "When a probe fails, Kubernetes will tries this many times before giving up. Giving up the pod will be marked Unready and won't get any traffic",
|
||||
"default": 3,
|
||||
"minimum": 1,
|
||||
"maximum": 15
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@@ -34,6 +34,12 @@ affinity: {}
|
||||
probe:
|
||||
enabled: false
|
||||
path: "/"
|
||||
settings:
|
||||
initialDelaySeconds: 0
|
||||
periodSeconds: 10
|
||||
successThreshold: 1
|
||||
timeoutSeconds: 3
|
||||
failureThreshold: 3
|
||||
|
||||
secret:
|
||||
enabled: false
|
||||
|
||||
Reference in New Issue
Block a user