Skip to content

Commit 7cd3679

Browse files
committed
Add default proxy startupProbe parameters to values.yaml
Signed-off-by: TJ Miller <[email protected]>
1 parent fb3f58c commit 7cd3679

22 files changed

+88
-4
lines changed

charts/linkerd-control-plane/README.md

+1
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,7 @@ Kubernetes: `>=1.21.0-0`
255255
| proxy.resources.memory.limit | string | `""` | Maximum amount of memory that the proxy can use |
256256
| proxy.resources.memory.request | string | `""` | Maximum amount of memory that the proxy requests |
257257
| proxy.shutdownGracePeriod | string | `""` | Grace period for graceful proxy shutdowns. If this timeout elapses before all open connections have completed, the proxy will terminate forcefully, closing any remaining connections. |
258+
| proxy.startupProbe | object | `{"failureThreshold":120,"initialDelaySeconds":0,"periodSeconds":1}` | Native sidecar proxy startup probe parameters. |
258259
| proxy.uid | int | `2102` | User id under which the proxy runs |
259260
| proxy.waitBeforeExitSeconds | int | `0` | If set the injected proxy sidecars in the data plane will stay alive for at least the given period before receiving the SIGTERM signal from Kubernetes but no longer than the pod's `terminationGracePeriodSeconds`. See [Lifecycle hooks](https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks) for more info on container lifecycle hooks. |
260261
| proxyInit.closeWaitTimeoutSecs | int | `0` | |

charts/linkerd-control-plane/values.yaml

+5
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,11 @@ proxy:
195195
# This is an experimental feature. It requires Kubernetes >= 1.29.
196196
# If enabled, .proxy.waitBeforeExitSeconds should not be used.
197197
nativeSidecar: false
198+
# -- Native sidecar proxy startup probe parameters.
199+
startupProbe:
200+
initialDelaySeconds: 0
201+
periodSeconds: 1
202+
failureThreshold: 120
198203

199204
# proxy-init configuration
200205
proxyInit:

charts/partials/templates/_proxy.tpl

+3-3
Original file line numberDiff line numberDiff line change
@@ -176,9 +176,9 @@ startupProbe:
176176
httpGet:
177177
path: /ready
178178
port: {{.Values.proxy.ports.admin}}
179-
initialDelaySeconds: {{.Values.proxy.startupProbeInitialDelaySeconds | default 0}}
180-
periodSeconds: {{.Values.proxy.startupProbePeriodSeconds | default 1}}
181-
failureThreshold: {{.Values.proxy.startupProbeFailureThreshold | default 120}}
179+
initialDelaySeconds: {{.Values.proxy.startupProbe.initialDelaySeconds}}
180+
periodSeconds: {{.Values.proxy.startupProbe.periodSeconds}}
181+
failureThreshold: {{.Values.proxy.startupProbe.failureThreshold}}
182182
{{- end }}
183183
{{- if .Values.proxy.resources }}
184184
{{ include "partials.resources" .Values.proxy.resources }}

cli/cmd/testdata/install_controlplane_tracing_output.golden

+4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cli/cmd/testdata/install_custom_domain.golden

+4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cli/cmd/testdata/install_custom_registry.golden

+4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cli/cmd/testdata/install_default.golden

+4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cli/cmd/testdata/install_default_override_dst_get_nets.golden

+4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cli/cmd/testdata/install_default_token.golden

+4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cli/cmd/testdata/install_ha_output.golden

+4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cli/cmd/testdata/install_ha_with_overrides_output.golden

+4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cli/cmd/testdata/install_heartbeat_disabled_output.golden

+4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cli/cmd/testdata/install_helm_control_plane_output.golden

+4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cli/cmd/testdata/install_helm_control_plane_output_ha.golden

+4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cli/cmd/testdata/install_helm_output_ha_labels.golden

+4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cli/cmd/testdata/install_helm_output_ha_namespace_selector.golden

+4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cli/cmd/testdata/install_no_init_container.golden

+4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cli/cmd/testdata/install_output.golden

+2-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cli/cmd/testdata/install_proxy_ignores.golden

+4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cli/cmd/testdata/install_values_file.golden

+4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/charts/linkerd2/values.go

+8
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ type (
120120
AccessLog string `json:"accessLog"`
121121
ShutdownGracePeriod string `json:"shutdownGracePeriod"`
122122
NativeSidecar bool `json:"nativeSidecar"`
123+
StartupProbe *StartupProbe `json:"startupProbe"`
123124
}
124125

125126
// ProxyInit contains the fields to set the proxy-init container
@@ -227,6 +228,13 @@ type (
227228
EphemeralStorage Constraints `json:"ephemeral-storage"`
228229
}
229230

231+
// StartupProbe represents the initContainer startup probe parameters for the proxy
232+
StartupProbe struct {
233+
InitialDelaySeconds uint `json:"initialDelaySeconds"`
234+
PeriodSeconds uint `json:"periodSeconds"`
235+
FailureThreshold uint `json:"failureThreshold"`
236+
}
237+
230238
// Identity contains the fields to set the identity variables in the proxy
231239
// sidecar container
232240
Identity struct {

pkg/charts/linkerd2/values_test.go

+5
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,11 @@ func TestNewValues(t *testing.T) {
134134
InboundDiscoveryCacheUnusedTimeout: "90s",
135135
DisableOutboundProtocolDetectTimeout: false,
136136
DisableInboundProtocolDetectTimeout: false,
137+
StartupProbe: &StartupProbe{
138+
FailureThreshold: 120,
139+
InitialDelaySeconds: 0,
140+
PeriodSeconds: 1,
141+
},
137142
},
138143
ProxyInit: &ProxyInit{
139144
IptablesMode: "legacy",

0 commit comments

Comments
 (0)