Skip to content
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

[v9] helm: Backports #11728

Merged
merged 10 commits into from
Apr 11, 2022
22 changes: 22 additions & 0 deletions docs/pages/kubernetes-access/helm/reference/teleport-cluster.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -1491,3 +1491,25 @@ Kubernetes PriorityClass to set for pod.
</TabItem>
</Tabs>

## `probeTimeoutSeconds`

| Type | Default value | Can be used in `custom` mode? |
| - | - | - |
| `integer` | `1` | ✅ |

[Kubernetes reference](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/)

Kubernetes timeouts for the liveness and readiness probes.

<Tabs>
<TabItem label="values.yaml">
```yaml
probeTimeoutSeconds: 5
```
</TabItem>
<TabItem label="--set">
```code
$ --set probeTimeoutSeconds=5
```
</TabItem>
</Tabs>
Original file line number Diff line number Diff line change
Expand Up @@ -1332,3 +1332,26 @@ Kubernetes Tolerations to set for pod assignment.
```
</TabItem>
</Tabs>

## `probeTimeoutSeconds`

| Type | Default value |
| - | - |
| `integer` | `1` |

[Kubernetes reference](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/)

Kubernetes timeouts for the liveness and readiness probes.

<Tabs>
<TabItem label="values.yaml">
```yaml
probeTimeoutSeconds: 5
```
</TabItem>
<TabItem label="--set">
```code
$ --set probeTimeoutSeconds=5
```
</TabItem>
</Tabs>
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
clusterName: helm-lint
# These are just sample values to test the chart.
# They are not intended to be guidelines or suggestions for running teleport.
probeTimeoutSeconds: 5
6 changes: 6 additions & 0 deletions examples/chart/teleport-cluster/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ spec:
{{- else }}
replicas: 1
{{- end }}
{{- if eq .Values.chartMode "standalone" }}
strategy:
type: Recreate
{{- end }}
selector:
matchLabels:
app: {{ .Release.Name }}
Expand Down Expand Up @@ -129,13 +133,15 @@ spec:
initialDelaySeconds: 5 # wait 5s for agent to start
periodSeconds: 5 # poll health every 5s
failureThreshold: 6 # consider agent unhealthy after 30s (6 * 5s)
timeoutSeconds: {{ .Values.probeTimeoutSeconds }}
readinessProbe:
httpGet:
path: /readyz
port: diag
initialDelaySeconds: 5 # wait 5s for agent to register
periodSeconds: 5 # poll health every 5s
failureThreshold: 12 # consider agent unhealthy after 60s (12 * 5s)
timeoutSeconds: {{ .Values.probeTimeoutSeconds }}
{{- if .Values.postStart.command }}
lifecycle:
postStart:
Expand Down
8 changes: 7 additions & 1 deletion examples/chart/teleport-cluster/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
"imagePullPolicy",
"initContainers",
"resources",
"tolerations"
"tolerations",
"probeTimeoutSeconds"
],
"properties": {
"clusterName": {
Expand Down Expand Up @@ -495,6 +496,11 @@
"$id": "#/properties/priorityClassName",
"type": "string",
"default": ""
},
"probeTimeoutSeconds": {
"$id": "#/properties/probeTimeoutSeconds",
"type": "integer",
"default": 1
}
}
}
4 changes: 4 additions & 0 deletions examples/chart/teleport-cluster/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -270,3 +270,7 @@ priorityClassName: ""
# Tolerations for pod assignment
# https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/
tolerations: []

# Timeouts for the readiness and liveness probes
# https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/
probeTimeoutSeconds: 1
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
authToken: auth-token
proxyAddr: proxy.example.com:3080
roles: kube
kubeClusterName: test-kube-cluster-name
# These are just sample values to test the chart.
# They are not intended to be guidelines or suggestions for running teleport.
probeTimeoutSeconds: 5
2 changes: 2 additions & 0 deletions examples/chart/teleport-kube-agent/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -148,13 +148,15 @@ spec:
initialDelaySeconds: 5 # wait 5s for agent to start
periodSeconds: 5 # poll health every 5s
failureThreshold: 6 # consider agent unhealthy after 30s (6 * 5s)
timeoutSeconds: {{ .Values.probeTimeoutSeconds }}
readinessProbe:
httpGet:
path: /readyz
port: diag
initialDelaySeconds: 5 # wait 5s for agent to register
periodSeconds: 5 # poll health every 5s
failureThreshold: 12 # consider agent unhealthy after 60s (12 * 5s)
timeoutSeconds: {{ .Values.probeTimeoutSeconds }}
{{- if .Values.resources }}
resources:
{{- toYaml .Values.resources | nindent 10 }}
Expand Down
2 changes: 2 additions & 0 deletions examples/chart/teleport-kube-agent/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -144,13 +144,15 @@ spec:
initialDelaySeconds: 5 # wait 5s for agent to start
periodSeconds: 5 # poll health every 5s
failureThreshold: 6 # consider agent unhealthy after 30s (6 * 5s)
timeoutSeconds: {{ .Values.probeTimeoutSeconds }}
readinessProbe:
httpGet:
path: /readyz
port: diag
initialDelaySeconds: 5 # wait 5s for agent to register
periodSeconds: 5 # poll health every 5s
failureThreshold: 12 # consider agent unhealthy after 60s (12 * 5s)
timeoutSeconds: {{ .Values.probeTimeoutSeconds }}
{{- if .Values.resources }}
resources:
{{- toYaml .Values.resources | nindent 10 }}
Expand Down
8 changes: 7 additions & 1 deletion examples/chart/teleport-kube-agent/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@
"imagePullPolicy",
"initContainers",
"resources",
"tolerations"
"tolerations",
"probeTimeoutSeconds"
],
"properties": {
"authToken": {
Expand Down Expand Up @@ -328,6 +329,11 @@
"$id": "#/properties/tolerations",
"type": "array",
"default": []
},
"probeTimeoutSeconds": {
"$id": "#/properties/probeTimeoutSeconds",
"type": "integer",
"default": 1
}
}
}
4 changes: 4 additions & 0 deletions examples/chart/teleport-kube-agent/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -217,3 +217,7 @@ resources: {}
# Tolerations for pod assignment
# https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/
tolerations: []

# Timeouts for the readiness and liveness probes
# https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/
probeTimeoutSeconds: 1