From cb86d669ea7a1cba1a17e5f968d419db24d2044a Mon Sep 17 00:00:00 2001 From: Oliver Gould Date: Mon, 17 Mar 2025 11:54:20 -0700 Subject: [PATCH] feat(inject): replace proxy.cores with proxy.runtime.workers (#13767) The proxy.cores helm value is overly restrictive: it enforces a hard upper limit. In some scenarios, a fixed limit is not practical: for example, when the proxy is meshing an application that configures no limits. This change replaces the proxy.cores value with a new proxy.runtime.workers structure, with members: - `minimum`: configures the minimum number of worker threads a proxy may use. - `maximumCPURatio`: optionally allows the proxy to use a larger number of CPUs, relative to the number of available CPUs on the node. So with a minimum of 2 and a ratio of 0.1, a proxy would run 2 worker threads (the minimum) running on an 8 core node, but allocate 10 worker threads on a 96 core node. When the `config.linkerd.io/proxy-cpu-limit` is used, that will continue to set the maximum number of worker threads to a fixed value. When it is not set, however, the minimum worker pool size is derived from the `config.linkerd.io/proxy-cpu-request`. An additional `config.linkerd.io/proxy-cpu-ratio-limit` annotation is introduced to allow workload-level configuration. --- charts/linkerd-control-plane/values.yaml | 33 +- charts/partials/templates/_proxy.tpl | 26 +- cli/cmd/doc.go | 20 +- cli/cmd/options.go | 23 +- .../expected/injected_nginx.yaml | 4 + .../expected/injected_nginx_redis.yaml | 8 + .../expected/injected_redis.yaml | 4 + cli/cmd/testdata/inject_contour.golden.yml | 4 + ...ject_emojivoto_already_injected.golden.yml | 16 + .../inject_emojivoto_deployment.golden.yml | 4 + ...emojivoto_deployment_access_log.golden.yml | 4 + ...omountServiceAccountToken_false.golden.yml | 4 + ...ojivoto_deployment_capabilities.golden.yml | 4 + ...oto_deployment_config_overrides.golden.yml | 4 + ...voto_deployment_controller_name.golden.yml | 8 + ...ject_emojivoto_deployment_debug.golden.yml | 4 + ...voto_deployment_empty_resources.golden.yml | 4 + ...to_deployment_hostNetwork_false.golden.yml | 4 + ...ivoto_deployment_native_sidecar.golden.yml | 4 + ...to_deployment_no_init_container.golden.yml | 4 + ...ojivoto_deployment_opaque_ports.golden.yml | 4 + ...emojivoto_deployment_overridden.golden.yml | 4 + ...ect_emojivoto_deployment_params.golden.yml | 4 + ...ojivoto_deployment_proxyignores.golden.yml | 4 + ...inject_emojivoto_deployment_udp.golden.yml | 4 + .../testdata/inject_emojivoto_list.golden.yml | 8 + ..._emojivoto_list_empty_resources.golden.yml | 8 + .../testdata/inject_emojivoto_pod.golden.yml | 4 + .../inject_emojivoto_pod_ingress.golden.yml | 4 + ...ject_emojivoto_pod_proxyignores.golden.yml | 4 + ...ect_emojivoto_pod_with_requests.golden.yml | 4 + .../inject_emojivoto_statefulset.golden.yml | 4 + .../inject_gettest_deployment.good.golden.yml | 8 + .../inject_tap_deployment_debug.golden.yml | 4 + ...install_controlplane_tracing_output.golden | 24 + cli/cmd/testdata/install_custom_domain.golden | 24 + .../testdata/install_custom_registry.golden | 24 + cli/cmd/testdata/install_default.golden | 24 + ...stall_default_override_dst_get_nets.golden | 24 + cli/cmd/testdata/install_default_token.golden | 24 + cli/cmd/testdata/install_gid_output.golden | 24 + cli/cmd/testdata/install_ha_output.golden | 24 + .../install_ha_with_overrides_output.golden | 24 + .../install_heartbeat_disabled_output.golden | 24 + .../install_helm_control_plane_output.golden | 24 + ...nstall_helm_control_plane_output_ha.golden | 24 + ...lm_control_plane_output_ha_with_gid.golden | 24 + .../install_helm_output_ha_labels.golden | 24 + ...l_helm_output_ha_namespace_selector.golden | 24 + .../testdata/install_no_init_container.golden | 24 + cli/cmd/testdata/install_output.golden | 11 + cli/cmd/testdata/install_proxy_ignores.golden | 24 + cli/cmd/testdata/install_values_file.golden | 24 + .../fake/data/pod-cpu-ratio.json | 433 ++++++++++++++++++ .../data/pod-inject-enabled-cpu-ratio.yaml | 18 + .../fake/data/pod-log-level.json | 8 + .../fake/data/pod-with-debug.patch.json | 8 + .../data/pod-with-ns-annotations.patch.json | 8 + .../proxy-injector/fake/data/pod.patch.json | 8 + controller/proxy-injector/webhook_test.go | 32 +- pkg/charts/linkerd2/values.go | 20 +- pkg/charts/linkerd2/values_test.go | 5 + pkg/inject/inject.go | 24 +- pkg/inject/inject_test.go | 4 +- pkg/k8s/labels.go | 4 + 65 files changed, 1235 insertions(+), 34 deletions(-) create mode 100644 controller/proxy-injector/fake/data/pod-cpu-ratio.json create mode 100644 controller/proxy-injector/fake/data/pod-inject-enabled-cpu-ratio.yaml diff --git a/charts/linkerd-control-plane/values.yaml b/charts/linkerd-control-plane/values.yaml index d7d9f9881..59c29765d 100644 --- a/charts/linkerd-control-plane/values.yaml +++ b/charts/linkerd-control-plane/values.yaml @@ -174,26 +174,51 @@ proxy: inbound: 4143 # -- Outbound port for the proxy container outbound: 4140 - # -- The `cpu.limit` and `cores` should be kept in sync. The value of `cores` - # must be an integer and should typically be set by rounding up from the - # limit. E.g. if cpu.limit is '1500m', cores should be 2. - cores: 0 + + # -- Deprecated: use runtime.workers.minimum + cores: + + runtime: + # -- Worker threadpool configuration. The minimum will be automatically + # derived from workload proxy CPU requests, when they are configured by + # annotation. A cluster-level maximum may be configured here (and a + # workload-level annotation is supported as well). + workers: + # -- Maximum number of worker threads that the proxy can use, by ratio of + # the number of available CPUs. A value of 1.0 allocates a worker thread + # for all available CPUs. A value of 0.1 allocates a worker thread for + # 10% of the available CPUs. + maximumCPURatio: + + # -- Configures a lower bound on the number of worker threads that the + # proxy can use. When maximumCPURatio is not set, this value + # is used. + minimum: 1 + resources: + # -- CPU configuration, when specified globally in Helm values, should be + # kept in sync with the above runtime.workers.minimum configuration. The + # minimum should reflect _at least_ the CPU request. When a limit is set, + # the minimum should match the limit (and the maximumCPURatio should be + # unset). cpu: # -- Maximum amount of CPU units that the proxy can use limit: "" # -- Amount of CPU units that the proxy requests request: "" + memory: # -- Maximum amount of memory that the proxy can use limit: "" # -- Maximum amount of memory that the proxy requests request: "" + ephemeral-storage: # -- Maximum amount of ephemeral storage that the proxy can use limit: "" # -- Amount of ephemeral storage that the proxy requests request: "" + # -- User id under which the proxy runs uid: 2102 # -- (int) Optional customisation of the group id under which the proxy runs (the group ID will be omitted if lower than 0) diff --git a/charts/partials/templates/_proxy.tpl b/charts/partials/templates/_proxy.tpl index 53cedb397..6ed06668b 100644 --- a/charts/partials/templates/_proxy.tpl +++ b/charts/partials/templates/_proxy.tpl @@ -25,10 +25,30 @@ env: fieldPath: spec.nodeName - name: _pod_containerName value: &containerName linkerd-proxy -{{- if .Values.proxy.cores }} +{{/* Configure CPU cores usage */}} +{{/* 1. Fixed configuration (DEPRECATED) */}} +{{ if .Values.proxy.cores -}} - name: LINKERD2_PROXY_CORES - value: {{.Values.proxy.cores | quote}} -{{- end }} + value: {{ .Values.proxy.cores | quote }} +- name: LINKERD2_PROXY_CORES_MIN + value: {{ .Values.proxy.cores | quote }} +{{ else -}} +{{/* 2. Variable configuration */}} +{{ with (.Values.proxy.runtime).workers -}} +- name: LINKERD2_PROXY_CORES + value: {{ .minimum | default 1 | quote }} +- name: LINKERD2_PROXY_CORES_MIN + value: {{ .minimum | default 1 | quote }} +{{ if .maximum -}} +- name: LINKERD2_PROXY_CORES_MAX + value: {{ .maximum | quote }} +{{ end -}} +{{ if .maximumCPURatio -}} +- name: LINKERD2_PROXY_CORES_MAX_RATIO + value: {{ .maximumCPURatio | quote }} +{{ end -}} +{{ end -}} +{{ end -}} {{ if .Values.proxy.requireIdentityOnInboundPorts -}} - name: LINKERD2_PROXY_INBOUND_PORTS_REQUIRE_IDENTITY value: {{.Values.proxy.requireIdentityOnInboundPorts | quote}} diff --git a/cli/cmd/doc.go b/cli/cmd/doc.go index 272454b81..22a1a3796 100644 --- a/cli/cmd/doc.go +++ b/cli/cmd/doc.go @@ -184,22 +184,26 @@ func generateAnnotationsDocs() []annotationDoc { Name: k8s.ProxyCPURequestAnnotation, Description: "Amount of CPU units that the proxy sidecar requests", }, - { - Name: k8s.ProxyMemoryRequestAnnotation, - Description: "Amount of Memory that the proxy sidecar requests", - }, - { - Name: k8s.ProxyEphemeralStorageRequestAnnotation, - Description: "Used to override the requestEphemeralStorage config", - }, { Name: k8s.ProxyCPULimitAnnotation, Description: "Maximum amount of CPU units that the proxy sidecar can use", }, + { + Name: k8s.ProxyCPURatioLimitAnnotation, + Description: "Maximum ratio of proxy worker threads to total available CPUs on the node", + }, + { + Name: k8s.ProxyMemoryRequestAnnotation, + Description: "Amount of Memory that the proxy sidecar requests", + }, { Name: k8s.ProxyMemoryLimitAnnotation, Description: "Maximum amount of Memory that the proxy sidecar can use", }, + { + Name: k8s.ProxyEphemeralStorageRequestAnnotation, + Description: "Used to override the requestEphemeralStorage config", + }, { Name: k8s.ProxyEphemeralStorageLimitAnnotation, Description: "Used to override the limitEphemeralStorage config", diff --git a/cli/cmd/options.go b/cli/cmd/options.go index b3079906a..f02da45e3 100644 --- a/cli/cmd/options.go +++ b/cli/cmd/options.go @@ -344,16 +344,19 @@ func makeProxyFlags(defaults *l5dcharts.Values) ([]flag.Flag, *pflag.FlagSet) { flag.NewStringFlag(proxyFlags, "proxy-cpu-request", defaults.Proxy.Resources.CPU.Request, "Amount of CPU units that the proxy sidecar requests", func(values *l5dcharts.Values, value string) error { + q, err := k8sResource.ParseQuantity(value) + if err != nil { + return err + } + c, err := inject.ToWholeCPUCores(q) + if err != nil { + return err + } + values.Proxy.Runtime.Workers.Minimum = c values.Proxy.Resources.CPU.Request = value return nil }), - flag.NewStringFlag(proxyFlags, "proxy-memory-request", defaults.Proxy.Resources.Memory.Request, "Amount of Memory that the proxy sidecar requests", - func(values *l5dcharts.Values, value string) error { - values.Proxy.Resources.Memory.Request = value - return nil - }), - flag.NewStringFlag(proxyFlags, "proxy-cpu-limit", defaults.Proxy.Resources.CPU.Limit, "Maximum amount of CPU units that the proxy sidecar can use", func(values *l5dcharts.Values, value string) error { q, err := k8sResource.ParseQuantity(value) @@ -364,11 +367,17 @@ func makeProxyFlags(defaults *l5dcharts.Values) ([]flag.Flag, *pflag.FlagSet) { if err != nil { return err } - values.Proxy.Cores = c + values.Proxy.Runtime.Workers.Maximum = c values.Proxy.Resources.CPU.Limit = value return nil }), + flag.NewStringFlag(proxyFlags, "proxy-memory-request", defaults.Proxy.Resources.Memory.Request, "Amount of Memory that the proxy sidecar requests", + func(values *l5dcharts.Values, value string) error { + values.Proxy.Resources.Memory.Request = value + return nil + }), + flag.NewStringFlag(proxyFlags, "proxy-memory-limit", defaults.Proxy.Resources.Memory.Limit, "Maximum amount of Memory that the proxy sidecar can use", func(values *l5dcharts.Values, value string) error { values.Proxy.Resources.Memory.Limit = value diff --git a/cli/cmd/testdata/inject-filepath/expected/injected_nginx.yaml b/cli/cmd/testdata/inject-filepath/expected/injected_nginx.yaml index 86ca0c60f..3af60c568 100644 --- a/cli/cmd/testdata/inject-filepath/expected/injected_nginx.yaml +++ b/cli/cmd/testdata/inject-filepath/expected/injected_nginx.yaml @@ -38,6 +38,10 @@ spec: fieldPath: spec.nodeName - name: _pod_containerName value: linkerd-proxy + - name: LINKERD2_PROXY_CORES + value: "1" + - name: LINKERD2_PROXY_CORES_MIN + value: "1" - name: LINKERD2_PROXY_SHUTDOWN_ENDPOINT_ENABLED value: "false" - name: LINKERD2_PROXY_LOG diff --git a/cli/cmd/testdata/inject-filepath/expected/injected_nginx_redis.yaml b/cli/cmd/testdata/inject-filepath/expected/injected_nginx_redis.yaml index 382df6aee..6192ebf48 100644 --- a/cli/cmd/testdata/inject-filepath/expected/injected_nginx_redis.yaml +++ b/cli/cmd/testdata/inject-filepath/expected/injected_nginx_redis.yaml @@ -38,6 +38,10 @@ spec: fieldPath: spec.nodeName - name: _pod_containerName value: linkerd-proxy + - name: LINKERD2_PROXY_CORES + value: "1" + - name: LINKERD2_PROXY_CORES_MIN + value: "1" - name: LINKERD2_PROXY_SHUTDOWN_ENDPOINT_ENABLED value: "false" - name: LINKERD2_PROXY_LOG @@ -278,6 +282,10 @@ spec: fieldPath: spec.nodeName - name: _pod_containerName value: linkerd-proxy + - name: LINKERD2_PROXY_CORES + value: "1" + - name: LINKERD2_PROXY_CORES_MIN + value: "1" - name: LINKERD2_PROXY_SHUTDOWN_ENDPOINT_ENABLED value: "false" - name: LINKERD2_PROXY_LOG diff --git a/cli/cmd/testdata/inject-filepath/expected/injected_redis.yaml b/cli/cmd/testdata/inject-filepath/expected/injected_redis.yaml index 9a1a0830d..912ff4eb8 100644 --- a/cli/cmd/testdata/inject-filepath/expected/injected_redis.yaml +++ b/cli/cmd/testdata/inject-filepath/expected/injected_redis.yaml @@ -38,6 +38,10 @@ spec: fieldPath: spec.nodeName - name: _pod_containerName value: linkerd-proxy + - name: LINKERD2_PROXY_CORES + value: "1" + - name: LINKERD2_PROXY_CORES_MIN + value: "1" - name: LINKERD2_PROXY_SHUTDOWN_ENDPOINT_ENABLED value: "false" - name: LINKERD2_PROXY_LOG diff --git a/cli/cmd/testdata/inject_contour.golden.yml b/cli/cmd/testdata/inject_contour.golden.yml index e384fc7f2..3a227eec3 100644 --- a/cli/cmd/testdata/inject_contour.golden.yml +++ b/cli/cmd/testdata/inject_contour.golden.yml @@ -46,6 +46,10 @@ spec: fieldPath: spec.nodeName - name: _pod_containerName value: linkerd-proxy + - name: LINKERD2_PROXY_CORES + value: "1" + - name: LINKERD2_PROXY_CORES_MIN + value: "1" - name: LINKERD2_PROXY_SHUTDOWN_ENDPOINT_ENABLED value: "false" - name: LINKERD2_PROXY_LOG diff --git a/cli/cmd/testdata/inject_emojivoto_already_injected.golden.yml b/cli/cmd/testdata/inject_emojivoto_already_injected.golden.yml index c1584b459..0f1cd6a13 100644 --- a/cli/cmd/testdata/inject_emojivoto_already_injected.golden.yml +++ b/cli/cmd/testdata/inject_emojivoto_already_injected.golden.yml @@ -40,6 +40,10 @@ spec: fieldPath: spec.nodeName - name: _pod_containerName value: linkerd-proxy + - name: LINKERD2_PROXY_CORES + value: "1" + - name: LINKERD2_PROXY_CORES_MIN + value: "1" - name: LINKERD2_PROXY_SHUTDOWN_ENDPOINT_ENABLED value: "false" - name: LINKERD2_PROXY_LOG @@ -291,6 +295,10 @@ spec: fieldPath: spec.nodeName - name: _pod_containerName value: linkerd-proxy + - name: LINKERD2_PROXY_CORES + value: "1" + - name: LINKERD2_PROXY_CORES_MIN + value: "1" - name: LINKERD2_PROXY_SHUTDOWN_ENDPOINT_ENABLED value: "false" - name: LINKERD2_PROXY_LOG @@ -542,6 +550,10 @@ spec: fieldPath: spec.nodeName - name: _pod_containerName value: linkerd-proxy + - name: LINKERD2_PROXY_CORES + value: "1" + - name: LINKERD2_PROXY_CORES_MIN + value: "1" - name: LINKERD2_PROXY_SHUTDOWN_ENDPOINT_ENABLED value: "false" - name: LINKERD2_PROXY_LOG @@ -793,6 +805,10 @@ spec: fieldPath: spec.nodeName - name: _pod_containerName value: linkerd-proxy + - name: LINKERD2_PROXY_CORES + value: "1" + - name: LINKERD2_PROXY_CORES_MIN + value: "1" - name: LINKERD2_PROXY_SHUTDOWN_ENDPOINT_ENABLED value: "false" - name: LINKERD2_PROXY_LOG diff --git a/cli/cmd/testdata/inject_emojivoto_deployment.golden.yml b/cli/cmd/testdata/inject_emojivoto_deployment.golden.yml index 7cdc21ac3..de4c15c1b 100644 --- a/cli/cmd/testdata/inject_emojivoto_deployment.golden.yml +++ b/cli/cmd/testdata/inject_emojivoto_deployment.golden.yml @@ -40,6 +40,10 @@ spec: fieldPath: spec.nodeName - name: _pod_containerName value: linkerd-proxy + - name: LINKERD2_PROXY_CORES + value: "1" + - name: LINKERD2_PROXY_CORES_MIN + value: "1" - name: LINKERD2_PROXY_SHUTDOWN_ENDPOINT_ENABLED value: "false" - name: LINKERD2_PROXY_LOG diff --git a/cli/cmd/testdata/inject_emojivoto_deployment_access_log.golden.yml b/cli/cmd/testdata/inject_emojivoto_deployment_access_log.golden.yml index 209803024..6c67c9884 100644 --- a/cli/cmd/testdata/inject_emojivoto_deployment_access_log.golden.yml +++ b/cli/cmd/testdata/inject_emojivoto_deployment_access_log.golden.yml @@ -41,6 +41,10 @@ spec: fieldPath: spec.nodeName - name: _pod_containerName value: linkerd-proxy + - name: LINKERD2_PROXY_CORES + value: "1" + - name: LINKERD2_PROXY_CORES_MIN + value: "1" - name: LINKERD2_PROXY_SHUTDOWN_ENDPOINT_ENABLED value: "false" - name: LINKERD2_PROXY_LOG diff --git a/cli/cmd/testdata/inject_emojivoto_deployment_automountServiceAccountToken_false.golden.yml b/cli/cmd/testdata/inject_emojivoto_deployment_automountServiceAccountToken_false.golden.yml index d6e638546..45570fd9a 100644 --- a/cli/cmd/testdata/inject_emojivoto_deployment_automountServiceAccountToken_false.golden.yml +++ b/cli/cmd/testdata/inject_emojivoto_deployment_automountServiceAccountToken_false.golden.yml @@ -41,6 +41,10 @@ spec: fieldPath: spec.nodeName - name: _pod_containerName value: linkerd-proxy + - name: LINKERD2_PROXY_CORES + value: "1" + - name: LINKERD2_PROXY_CORES_MIN + value: "1" - name: LINKERD2_PROXY_SHUTDOWN_ENDPOINT_ENABLED value: "false" - name: LINKERD2_PROXY_LOG diff --git a/cli/cmd/testdata/inject_emojivoto_deployment_capabilities.golden.yml b/cli/cmd/testdata/inject_emojivoto_deployment_capabilities.golden.yml index 89e13aa4d..1e462a21c 100644 --- a/cli/cmd/testdata/inject_emojivoto_deployment_capabilities.golden.yml +++ b/cli/cmd/testdata/inject_emojivoto_deployment_capabilities.golden.yml @@ -40,6 +40,10 @@ spec: fieldPath: spec.nodeName - name: _pod_containerName value: linkerd-proxy + - name: LINKERD2_PROXY_CORES + value: "1" + - name: LINKERD2_PROXY_CORES_MIN + value: "1" - name: LINKERD2_PROXY_SHUTDOWN_ENDPOINT_ENABLED value: "false" - name: LINKERD2_PROXY_LOG diff --git a/cli/cmd/testdata/inject_emojivoto_deployment_config_overrides.golden.yml b/cli/cmd/testdata/inject_emojivoto_deployment_config_overrides.golden.yml index a234ee31f..3259583a8 100644 --- a/cli/cmd/testdata/inject_emojivoto_deployment_config_overrides.golden.yml +++ b/cli/cmd/testdata/inject_emojivoto_deployment_config_overrides.golden.yml @@ -50,6 +50,10 @@ spec: value: linkerd-proxy - name: LINKERD2_PROXY_CORES value: "1" + - name: LINKERD2_PROXY_CORES_MIN + value: "1" + - name: LINKERD2_PROXY_CORES_MAX + value: "1" - name: LINKERD2_PROXY_SHUTDOWN_ENDPOINT_ENABLED value: "false" - name: LINKERD2_PROXY_LOG diff --git a/cli/cmd/testdata/inject_emojivoto_deployment_controller_name.golden.yml b/cli/cmd/testdata/inject_emojivoto_deployment_controller_name.golden.yml index 3aa7be17a..a81b5e5f8 100644 --- a/cli/cmd/testdata/inject_emojivoto_deployment_controller_name.golden.yml +++ b/cli/cmd/testdata/inject_emojivoto_deployment_controller_name.golden.yml @@ -40,6 +40,10 @@ spec: fieldPath: spec.nodeName - name: _pod_containerName value: linkerd-proxy + - name: LINKERD2_PROXY_CORES + value: "1" + - name: LINKERD2_PROXY_CORES_MIN + value: "1" - name: LINKERD2_PROXY_SHUTDOWN_ENDPOINT_ENABLED value: "false" - name: LINKERD2_PROXY_LOG @@ -291,6 +295,10 @@ spec: fieldPath: spec.nodeName - name: _pod_containerName value: linkerd-proxy + - name: LINKERD2_PROXY_CORES + value: "1" + - name: LINKERD2_PROXY_CORES_MIN + value: "1" - name: LINKERD2_PROXY_SHUTDOWN_ENDPOINT_ENABLED value: "false" - name: LINKERD2_PROXY_LOG diff --git a/cli/cmd/testdata/inject_emojivoto_deployment_debug.golden.yml b/cli/cmd/testdata/inject_emojivoto_deployment_debug.golden.yml index 5bd0beb5c..daf8b7338 100644 --- a/cli/cmd/testdata/inject_emojivoto_deployment_debug.golden.yml +++ b/cli/cmd/testdata/inject_emojivoto_deployment_debug.golden.yml @@ -41,6 +41,10 @@ spec: fieldPath: spec.nodeName - name: _pod_containerName value: linkerd-proxy + - name: LINKERD2_PROXY_CORES + value: "1" + - name: LINKERD2_PROXY_CORES_MIN + value: "1" - name: LINKERD2_PROXY_SHUTDOWN_ENDPOINT_ENABLED value: "false" - name: LINKERD2_PROXY_LOG diff --git a/cli/cmd/testdata/inject_emojivoto_deployment_empty_resources.golden.yml b/cli/cmd/testdata/inject_emojivoto_deployment_empty_resources.golden.yml index fc1088069..e03c8db2c 100644 --- a/cli/cmd/testdata/inject_emojivoto_deployment_empty_resources.golden.yml +++ b/cli/cmd/testdata/inject_emojivoto_deployment_empty_resources.golden.yml @@ -40,6 +40,10 @@ spec: fieldPath: spec.nodeName - name: _pod_containerName value: linkerd-proxy + - name: LINKERD2_PROXY_CORES + value: "1" + - name: LINKERD2_PROXY_CORES_MIN + value: "1" - name: LINKERD2_PROXY_SHUTDOWN_ENDPOINT_ENABLED value: "false" - name: LINKERD2_PROXY_LOG diff --git a/cli/cmd/testdata/inject_emojivoto_deployment_hostNetwork_false.golden.yml b/cli/cmd/testdata/inject_emojivoto_deployment_hostNetwork_false.golden.yml index 147c7bf69..22c7b88ce 100644 --- a/cli/cmd/testdata/inject_emojivoto_deployment_hostNetwork_false.golden.yml +++ b/cli/cmd/testdata/inject_emojivoto_deployment_hostNetwork_false.golden.yml @@ -40,6 +40,10 @@ spec: fieldPath: spec.nodeName - name: _pod_containerName value: linkerd-proxy + - name: LINKERD2_PROXY_CORES + value: "1" + - name: LINKERD2_PROXY_CORES_MIN + value: "1" - name: LINKERD2_PROXY_SHUTDOWN_ENDPOINT_ENABLED value: "false" - name: LINKERD2_PROXY_LOG diff --git a/cli/cmd/testdata/inject_emojivoto_deployment_native_sidecar.golden.yml b/cli/cmd/testdata/inject_emojivoto_deployment_native_sidecar.golden.yml index b3492dee2..30c6d7371 100644 --- a/cli/cmd/testdata/inject_emojivoto_deployment_native_sidecar.golden.yml +++ b/cli/cmd/testdata/inject_emojivoto_deployment_native_sidecar.golden.yml @@ -88,6 +88,10 @@ spec: fieldPath: spec.nodeName - name: _pod_containerName value: linkerd-proxy + - name: LINKERD2_PROXY_CORES + value: "1" + - name: LINKERD2_PROXY_CORES_MIN + value: "1" - name: LINKERD2_PROXY_SHUTDOWN_ENDPOINT_ENABLED value: "false" - name: LINKERD2_PROXY_LOG diff --git a/cli/cmd/testdata/inject_emojivoto_deployment_no_init_container.golden.yml b/cli/cmd/testdata/inject_emojivoto_deployment_no_init_container.golden.yml index 319ae2264..8e0fb805e 100644 --- a/cli/cmd/testdata/inject_emojivoto_deployment_no_init_container.golden.yml +++ b/cli/cmd/testdata/inject_emojivoto_deployment_no_init_container.golden.yml @@ -40,6 +40,10 @@ spec: fieldPath: spec.nodeName - name: _pod_containerName value: linkerd-proxy + - name: LINKERD2_PROXY_CORES + value: "1" + - name: LINKERD2_PROXY_CORES_MIN + value: "1" - name: LINKERD2_PROXY_SHUTDOWN_ENDPOINT_ENABLED value: "false" - name: LINKERD2_PROXY_LOG diff --git a/cli/cmd/testdata/inject_emojivoto_deployment_opaque_ports.golden.yml b/cli/cmd/testdata/inject_emojivoto_deployment_opaque_ports.golden.yml index 762e65abc..55f8269e7 100644 --- a/cli/cmd/testdata/inject_emojivoto_deployment_opaque_ports.golden.yml +++ b/cli/cmd/testdata/inject_emojivoto_deployment_opaque_ports.golden.yml @@ -41,6 +41,10 @@ spec: fieldPath: spec.nodeName - name: _pod_containerName value: linkerd-proxy + - name: LINKERD2_PROXY_CORES + value: "1" + - name: LINKERD2_PROXY_CORES_MIN + value: "1" - name: LINKERD2_PROXY_SHUTDOWN_ENDPOINT_ENABLED value: "false" - name: LINKERD2_PROXY_LOG diff --git a/cli/cmd/testdata/inject_emojivoto_deployment_overridden.golden.yml b/cli/cmd/testdata/inject_emojivoto_deployment_overridden.golden.yml index f752ffd2c..d1010b064 100644 --- a/cli/cmd/testdata/inject_emojivoto_deployment_overridden.golden.yml +++ b/cli/cmd/testdata/inject_emojivoto_deployment_overridden.golden.yml @@ -41,6 +41,10 @@ spec: fieldPath: spec.nodeName - name: _pod_containerName value: linkerd-proxy + - name: LINKERD2_PROXY_CORES + value: "1" + - name: LINKERD2_PROXY_CORES_MIN + value: "1" - name: LINKERD2_PROXY_SHUTDOWN_ENDPOINT_ENABLED value: "false" - name: LINKERD2_PROXY_LOG diff --git a/cli/cmd/testdata/inject_emojivoto_deployment_params.golden.yml b/cli/cmd/testdata/inject_emojivoto_deployment_params.golden.yml index 95b074f51..9bd352337 100644 --- a/cli/cmd/testdata/inject_emojivoto_deployment_params.golden.yml +++ b/cli/cmd/testdata/inject_emojivoto_deployment_params.golden.yml @@ -40,6 +40,10 @@ spec: fieldPath: spec.nodeName - name: _pod_containerName value: linkerd-proxy + - name: LINKERD2_PROXY_CORES + value: "1" + - name: LINKERD2_PROXY_CORES_MIN + value: "1" - name: LINKERD2_PROXY_SHUTDOWN_ENDPOINT_ENABLED value: "false" - name: LINKERD2_PROXY_LOG diff --git a/cli/cmd/testdata/inject_emojivoto_deployment_proxyignores.golden.yml b/cli/cmd/testdata/inject_emojivoto_deployment_proxyignores.golden.yml index d5d953331..4b266f17c 100644 --- a/cli/cmd/testdata/inject_emojivoto_deployment_proxyignores.golden.yml +++ b/cli/cmd/testdata/inject_emojivoto_deployment_proxyignores.golden.yml @@ -42,6 +42,10 @@ spec: fieldPath: spec.nodeName - name: _pod_containerName value: linkerd-proxy + - name: LINKERD2_PROXY_CORES + value: "1" + - name: LINKERD2_PROXY_CORES_MIN + value: "1" - name: LINKERD2_PROXY_SHUTDOWN_ENDPOINT_ENABLED value: "false" - name: LINKERD2_PROXY_LOG diff --git a/cli/cmd/testdata/inject_emojivoto_deployment_udp.golden.yml b/cli/cmd/testdata/inject_emojivoto_deployment_udp.golden.yml index 98f0e5291..2de167db6 100644 --- a/cli/cmd/testdata/inject_emojivoto_deployment_udp.golden.yml +++ b/cli/cmd/testdata/inject_emojivoto_deployment_udp.golden.yml @@ -40,6 +40,10 @@ spec: fieldPath: spec.nodeName - name: _pod_containerName value: linkerd-proxy + - name: LINKERD2_PROXY_CORES + value: "1" + - name: LINKERD2_PROXY_CORES_MIN + value: "1" - name: LINKERD2_PROXY_SHUTDOWN_ENDPOINT_ENABLED value: "false" - name: LINKERD2_PROXY_LOG diff --git a/cli/cmd/testdata/inject_emojivoto_list.golden.yml b/cli/cmd/testdata/inject_emojivoto_list.golden.yml index c401a8944..233579f51 100644 --- a/cli/cmd/testdata/inject_emojivoto_list.golden.yml +++ b/cli/cmd/testdata/inject_emojivoto_list.golden.yml @@ -42,6 +42,10 @@ items: fieldPath: spec.nodeName - name: _pod_containerName value: linkerd-proxy + - name: LINKERD2_PROXY_CORES + value: "1" + - name: LINKERD2_PROXY_CORES_MIN + value: "1" - name: LINKERD2_PROXY_SHUTDOWN_ENDPOINT_ENABLED value: "false" - name: LINKERD2_PROXY_LOG @@ -292,6 +296,10 @@ items: fieldPath: spec.nodeName - name: _pod_containerName value: linkerd-proxy + - name: LINKERD2_PROXY_CORES + value: "1" + - name: LINKERD2_PROXY_CORES_MIN + value: "1" - name: LINKERD2_PROXY_SHUTDOWN_ENDPOINT_ENABLED value: "false" - name: LINKERD2_PROXY_LOG diff --git a/cli/cmd/testdata/inject_emojivoto_list_empty_resources.golden.yml b/cli/cmd/testdata/inject_emojivoto_list_empty_resources.golden.yml index 9d4d85ee0..69bf9a0eb 100644 --- a/cli/cmd/testdata/inject_emojivoto_list_empty_resources.golden.yml +++ b/cli/cmd/testdata/inject_emojivoto_list_empty_resources.golden.yml @@ -42,6 +42,10 @@ items: fieldPath: spec.nodeName - name: _pod_containerName value: linkerd-proxy + - name: LINKERD2_PROXY_CORES + value: "1" + - name: LINKERD2_PROXY_CORES_MIN + value: "1" - name: LINKERD2_PROXY_SHUTDOWN_ENDPOINT_ENABLED value: "false" - name: LINKERD2_PROXY_LOG @@ -292,6 +296,10 @@ items: fieldPath: spec.nodeName - name: _pod_containerName value: linkerd-proxy + - name: LINKERD2_PROXY_CORES + value: "1" + - name: LINKERD2_PROXY_CORES_MIN + value: "1" - name: LINKERD2_PROXY_SHUTDOWN_ENDPOINT_ENABLED value: "false" - name: LINKERD2_PROXY_LOG diff --git a/cli/cmd/testdata/inject_emojivoto_pod.golden.yml b/cli/cmd/testdata/inject_emojivoto_pod.golden.yml index 9e2362504..429b540bd 100644 --- a/cli/cmd/testdata/inject_emojivoto_pod.golden.yml +++ b/cli/cmd/testdata/inject_emojivoto_pod.golden.yml @@ -32,6 +32,10 @@ spec: fieldPath: spec.nodeName - name: _pod_containerName value: linkerd-proxy + - name: LINKERD2_PROXY_CORES + value: "1" + - name: LINKERD2_PROXY_CORES_MIN + value: "1" - name: LINKERD2_PROXY_SHUTDOWN_ENDPOINT_ENABLED value: "false" - name: LINKERD2_PROXY_LOG diff --git a/cli/cmd/testdata/inject_emojivoto_pod_ingress.golden.yml b/cli/cmd/testdata/inject_emojivoto_pod_ingress.golden.yml index fc5e45b07..3173c1b4f 100644 --- a/cli/cmd/testdata/inject_emojivoto_pod_ingress.golden.yml +++ b/cli/cmd/testdata/inject_emojivoto_pod_ingress.golden.yml @@ -33,6 +33,10 @@ spec: fieldPath: spec.nodeName - name: _pod_containerName value: linkerd-proxy + - name: LINKERD2_PROXY_CORES + value: "1" + - name: LINKERD2_PROXY_CORES_MIN + value: "1" - name: LINKERD2_PROXY_SHUTDOWN_ENDPOINT_ENABLED value: "false" - name: LINKERD2_PROXY_LOG diff --git a/cli/cmd/testdata/inject_emojivoto_pod_proxyignores.golden.yml b/cli/cmd/testdata/inject_emojivoto_pod_proxyignores.golden.yml index 9ee8224ba..6af9e98bc 100644 --- a/cli/cmd/testdata/inject_emojivoto_pod_proxyignores.golden.yml +++ b/cli/cmd/testdata/inject_emojivoto_pod_proxyignores.golden.yml @@ -34,6 +34,10 @@ spec: fieldPath: spec.nodeName - name: _pod_containerName value: linkerd-proxy + - name: LINKERD2_PROXY_CORES + value: "1" + - name: LINKERD2_PROXY_CORES_MIN + value: "1" - name: LINKERD2_PROXY_SHUTDOWN_ENDPOINT_ENABLED value: "false" - name: LINKERD2_PROXY_LOG diff --git a/cli/cmd/testdata/inject_emojivoto_pod_with_requests.golden.yml b/cli/cmd/testdata/inject_emojivoto_pod_with_requests.golden.yml index b0b55d9d6..77f81d0ef 100644 --- a/cli/cmd/testdata/inject_emojivoto_pod_with_requests.golden.yml +++ b/cli/cmd/testdata/inject_emojivoto_pod_with_requests.golden.yml @@ -36,6 +36,10 @@ spec: fieldPath: spec.nodeName - name: _pod_containerName value: linkerd-proxy + - name: LINKERD2_PROXY_CORES + value: "1" + - name: LINKERD2_PROXY_CORES_MIN + value: "1" - name: LINKERD2_PROXY_SHUTDOWN_ENDPOINT_ENABLED value: "false" - name: LINKERD2_PROXY_LOG diff --git a/cli/cmd/testdata/inject_emojivoto_statefulset.golden.yml b/cli/cmd/testdata/inject_emojivoto_statefulset.golden.yml index ba7563baa..65cc4019c 100644 --- a/cli/cmd/testdata/inject_emojivoto_statefulset.golden.yml +++ b/cli/cmd/testdata/inject_emojivoto_statefulset.golden.yml @@ -41,6 +41,10 @@ spec: fieldPath: spec.nodeName - name: _pod_containerName value: linkerd-proxy + - name: LINKERD2_PROXY_CORES + value: "1" + - name: LINKERD2_PROXY_CORES_MIN + value: "1" - name: LINKERD2_PROXY_SHUTDOWN_ENDPOINT_ENABLED value: "false" - name: LINKERD2_PROXY_LOG diff --git a/cli/cmd/testdata/inject_gettest_deployment.good.golden.yml b/cli/cmd/testdata/inject_gettest_deployment.good.golden.yml index 23a22a41d..2786c6f19 100644 --- a/cli/cmd/testdata/inject_gettest_deployment.good.golden.yml +++ b/cli/cmd/testdata/inject_gettest_deployment.good.golden.yml @@ -36,6 +36,10 @@ spec: fieldPath: spec.nodeName - name: _pod_containerName value: linkerd-proxy + - name: LINKERD2_PROXY_CORES + value: "1" + - name: LINKERD2_PROXY_CORES_MIN + value: "1" - name: LINKERD2_PROXY_SHUTDOWN_ENDPOINT_ENABLED value: "false" - name: LINKERD2_PROXY_LOG @@ -289,6 +293,10 @@ spec: fieldPath: spec.nodeName - name: _pod_containerName value: linkerd-proxy + - name: LINKERD2_PROXY_CORES + value: "1" + - name: LINKERD2_PROXY_CORES_MIN + value: "1" - name: LINKERD2_PROXY_SHUTDOWN_ENDPOINT_ENABLED value: "false" - name: LINKERD2_PROXY_LOG diff --git a/cli/cmd/testdata/inject_tap_deployment_debug.golden.yml b/cli/cmd/testdata/inject_tap_deployment_debug.golden.yml index 94c1436c7..4e8d94a24 100644 --- a/cli/cmd/testdata/inject_tap_deployment_debug.golden.yml +++ b/cli/cmd/testdata/inject_tap_deployment_debug.golden.yml @@ -57,6 +57,10 @@ spec: fieldPath: spec.nodeName - name: _pod_containerName value: linkerd-proxy + - name: LINKERD2_PROXY_CORES + value: "1" + - name: LINKERD2_PROXY_CORES_MIN + value: "1" - name: LINKERD2_PROXY_SHUTDOWN_ENDPOINT_ENABLED value: "false" - name: LINKERD2_PROXY_LOG diff --git a/cli/cmd/testdata/install_controlplane_tracing_output.golden b/cli/cmd/testdata/install_controlplane_tracing_output.golden index 3f0e5d1a1..f01b790d0 100644 --- a/cli/cmd/testdata/install_controlplane_tracing_output.golden +++ b/cli/cmd/testdata/install_controlplane_tracing_output.golden @@ -737,6 +737,9 @@ data: memory: limit: "" request: "" + runtime: + workers: + minimum: 1 saMountPath: null shutdownGracePeriod: "" startupProbe: @@ -1012,6 +1015,13 @@ spec: fieldPath: spec.nodeName - name: _pod_containerName value: &containerName linkerd-proxy + + + + - name: LINKERD2_PROXY_CORES + value: "1" + - name: LINKERD2_PROXY_CORES_MIN + value: "1" - name: LINKERD2_PROXY_INBOUND_PORTS_REQUIRE_TLS value: "8080" - name: LINKERD2_PROXY_SHUTDOWN_ENDPOINT_ENABLED @@ -1389,6 +1399,13 @@ spec: fieldPath: spec.nodeName - name: _pod_containerName value: &containerName linkerd-proxy + + + + - name: LINKERD2_PROXY_CORES + value: "1" + - name: LINKERD2_PROXY_CORES_MIN + value: "1" - name: LINKERD2_PROXY_SHUTDOWN_ENDPOINT_ENABLED value: "false" - name: LINKERD2_PROXY_LOG @@ -1904,6 +1921,13 @@ spec: fieldPath: spec.nodeName - name: _pod_containerName value: &containerName linkerd-proxy + + + + - name: LINKERD2_PROXY_CORES + value: "1" + - name: LINKERD2_PROXY_CORES_MIN + value: "1" - name: LINKERD2_PROXY_SHUTDOWN_ENDPOINT_ENABLED value: "false" - name: LINKERD2_PROXY_LOG diff --git a/cli/cmd/testdata/install_custom_domain.golden b/cli/cmd/testdata/install_custom_domain.golden index 0026dbb64..b848b379c 100644 --- a/cli/cmd/testdata/install_custom_domain.golden +++ b/cli/cmd/testdata/install_custom_domain.golden @@ -737,6 +737,9 @@ data: memory: limit: "" request: "" + runtime: + workers: + minimum: 1 saMountPath: null shutdownGracePeriod: "" startupProbe: @@ -1011,6 +1014,13 @@ spec: fieldPath: spec.nodeName - name: _pod_containerName value: &containerName linkerd-proxy + + + + - name: LINKERD2_PROXY_CORES + value: "1" + - name: LINKERD2_PROXY_CORES_MIN + value: "1" - name: LINKERD2_PROXY_INBOUND_PORTS_REQUIRE_TLS value: "8080" - name: LINKERD2_PROXY_SHUTDOWN_ENDPOINT_ENABLED @@ -1388,6 +1398,13 @@ spec: fieldPath: spec.nodeName - name: _pod_containerName value: &containerName linkerd-proxy + + + + - name: LINKERD2_PROXY_CORES + value: "1" + - name: LINKERD2_PROXY_CORES_MIN + value: "1" - name: LINKERD2_PROXY_SHUTDOWN_ENDPOINT_ENABLED value: "false" - name: LINKERD2_PROXY_LOG @@ -1902,6 +1919,13 @@ spec: fieldPath: spec.nodeName - name: _pod_containerName value: &containerName linkerd-proxy + + + + - name: LINKERD2_PROXY_CORES + value: "1" + - name: LINKERD2_PROXY_CORES_MIN + value: "1" - name: LINKERD2_PROXY_SHUTDOWN_ENDPOINT_ENABLED value: "false" - name: LINKERD2_PROXY_LOG diff --git a/cli/cmd/testdata/install_custom_registry.golden b/cli/cmd/testdata/install_custom_registry.golden index 5ddea4e7b..a6caa0825 100644 --- a/cli/cmd/testdata/install_custom_registry.golden +++ b/cli/cmd/testdata/install_custom_registry.golden @@ -737,6 +737,9 @@ data: memory: limit: "" request: "" + runtime: + workers: + minimum: 1 saMountPath: null shutdownGracePeriod: "" startupProbe: @@ -1011,6 +1014,13 @@ spec: fieldPath: spec.nodeName - name: _pod_containerName value: &containerName linkerd-proxy + + + + - name: LINKERD2_PROXY_CORES + value: "1" + - name: LINKERD2_PROXY_CORES_MIN + value: "1" - name: LINKERD2_PROXY_INBOUND_PORTS_REQUIRE_TLS value: "8080" - name: LINKERD2_PROXY_SHUTDOWN_ENDPOINT_ENABLED @@ -1388,6 +1398,13 @@ spec: fieldPath: spec.nodeName - name: _pod_containerName value: &containerName linkerd-proxy + + + + - name: LINKERD2_PROXY_CORES + value: "1" + - name: LINKERD2_PROXY_CORES_MIN + value: "1" - name: LINKERD2_PROXY_SHUTDOWN_ENDPOINT_ENABLED value: "false" - name: LINKERD2_PROXY_LOG @@ -1902,6 +1919,13 @@ spec: fieldPath: spec.nodeName - name: _pod_containerName value: &containerName linkerd-proxy + + + + - name: LINKERD2_PROXY_CORES + value: "1" + - name: LINKERD2_PROXY_CORES_MIN + value: "1" - name: LINKERD2_PROXY_SHUTDOWN_ENDPOINT_ENABLED value: "false" - name: LINKERD2_PROXY_LOG diff --git a/cli/cmd/testdata/install_default.golden b/cli/cmd/testdata/install_default.golden index 0026dbb64..b848b379c 100644 --- a/cli/cmd/testdata/install_default.golden +++ b/cli/cmd/testdata/install_default.golden @@ -737,6 +737,9 @@ data: memory: limit: "" request: "" + runtime: + workers: + minimum: 1 saMountPath: null shutdownGracePeriod: "" startupProbe: @@ -1011,6 +1014,13 @@ spec: fieldPath: spec.nodeName - name: _pod_containerName value: &containerName linkerd-proxy + + + + - name: LINKERD2_PROXY_CORES + value: "1" + - name: LINKERD2_PROXY_CORES_MIN + value: "1" - name: LINKERD2_PROXY_INBOUND_PORTS_REQUIRE_TLS value: "8080" - name: LINKERD2_PROXY_SHUTDOWN_ENDPOINT_ENABLED @@ -1388,6 +1398,13 @@ spec: fieldPath: spec.nodeName - name: _pod_containerName value: &containerName linkerd-proxy + + + + - name: LINKERD2_PROXY_CORES + value: "1" + - name: LINKERD2_PROXY_CORES_MIN + value: "1" - name: LINKERD2_PROXY_SHUTDOWN_ENDPOINT_ENABLED value: "false" - name: LINKERD2_PROXY_LOG @@ -1902,6 +1919,13 @@ spec: fieldPath: spec.nodeName - name: _pod_containerName value: &containerName linkerd-proxy + + + + - name: LINKERD2_PROXY_CORES + value: "1" + - name: LINKERD2_PROXY_CORES_MIN + value: "1" - name: LINKERD2_PROXY_SHUTDOWN_ENDPOINT_ENABLED value: "false" - name: LINKERD2_PROXY_LOG diff --git a/cli/cmd/testdata/install_default_override_dst_get_nets.golden b/cli/cmd/testdata/install_default_override_dst_get_nets.golden index 549852d88..d655ec1ac 100644 --- a/cli/cmd/testdata/install_default_override_dst_get_nets.golden +++ b/cli/cmd/testdata/install_default_override_dst_get_nets.golden @@ -737,6 +737,9 @@ data: memory: limit: "" request: "" + runtime: + workers: + minimum: 1 saMountPath: null shutdownGracePeriod: "" startupProbe: @@ -1011,6 +1014,13 @@ spec: fieldPath: spec.nodeName - name: _pod_containerName value: &containerName linkerd-proxy + + + + - name: LINKERD2_PROXY_CORES + value: "1" + - name: LINKERD2_PROXY_CORES_MIN + value: "1" - name: LINKERD2_PROXY_INBOUND_PORTS_REQUIRE_TLS value: "8080" - name: LINKERD2_PROXY_SHUTDOWN_ENDPOINT_ENABLED @@ -1388,6 +1398,13 @@ spec: fieldPath: spec.nodeName - name: _pod_containerName value: &containerName linkerd-proxy + + + + - name: LINKERD2_PROXY_CORES + value: "1" + - name: LINKERD2_PROXY_CORES_MIN + value: "1" - name: LINKERD2_PROXY_SHUTDOWN_ENDPOINT_ENABLED value: "false" - name: LINKERD2_PROXY_LOG @@ -1902,6 +1919,13 @@ spec: fieldPath: spec.nodeName - name: _pod_containerName value: &containerName linkerd-proxy + + + + - name: LINKERD2_PROXY_CORES + value: "1" + - name: LINKERD2_PROXY_CORES_MIN + value: "1" - name: LINKERD2_PROXY_SHUTDOWN_ENDPOINT_ENABLED value: "false" - name: LINKERD2_PROXY_LOG diff --git a/cli/cmd/testdata/install_default_token.golden b/cli/cmd/testdata/install_default_token.golden index e179855f3..6643a4f72 100644 --- a/cli/cmd/testdata/install_default_token.golden +++ b/cli/cmd/testdata/install_default_token.golden @@ -737,6 +737,9 @@ data: memory: limit: "" request: "" + runtime: + workers: + minimum: 1 saMountPath: null shutdownGracePeriod: "" startupProbe: @@ -1011,6 +1014,13 @@ spec: fieldPath: spec.nodeName - name: _pod_containerName value: &containerName linkerd-proxy + + + + - name: LINKERD2_PROXY_CORES + value: "1" + - name: LINKERD2_PROXY_CORES_MIN + value: "1" - name: LINKERD2_PROXY_INBOUND_PORTS_REQUIRE_TLS value: "8080" - name: LINKERD2_PROXY_SHUTDOWN_ENDPOINT_ENABLED @@ -1379,6 +1389,13 @@ spec: fieldPath: spec.nodeName - name: _pod_containerName value: &containerName linkerd-proxy + + + + - name: LINKERD2_PROXY_CORES + value: "1" + - name: LINKERD2_PROXY_CORES_MIN + value: "1" - name: LINKERD2_PROXY_SHUTDOWN_ENDPOINT_ENABLED value: "false" - name: LINKERD2_PROXY_LOG @@ -1884,6 +1901,13 @@ spec: fieldPath: spec.nodeName - name: _pod_containerName value: &containerName linkerd-proxy + + + + - name: LINKERD2_PROXY_CORES + value: "1" + - name: LINKERD2_PROXY_CORES_MIN + value: "1" - name: LINKERD2_PROXY_SHUTDOWN_ENDPOINT_ENABLED value: "false" - name: LINKERD2_PROXY_LOG diff --git a/cli/cmd/testdata/install_gid_output.golden b/cli/cmd/testdata/install_gid_output.golden index 342c6e1eb..05beab2b7 100755 --- a/cli/cmd/testdata/install_gid_output.golden +++ b/cli/cmd/testdata/install_gid_output.golden @@ -737,6 +737,9 @@ data: memory: limit: "" request: "" + runtime: + workers: + minimum: 1 saMountPath: null shutdownGracePeriod: "" startupProbe: @@ -1012,6 +1015,13 @@ spec: fieldPath: spec.nodeName - name: _pod_containerName value: &containerName linkerd-proxy + + + + - name: LINKERD2_PROXY_CORES + value: "1" + - name: LINKERD2_PROXY_CORES_MIN + value: "1" - name: LINKERD2_PROXY_INBOUND_PORTS_REQUIRE_TLS value: "8080" - name: LINKERD2_PROXY_SHUTDOWN_ENDPOINT_ENABLED @@ -1392,6 +1402,13 @@ spec: fieldPath: spec.nodeName - name: _pod_containerName value: &containerName linkerd-proxy + + + + - name: LINKERD2_PROXY_CORES + value: "1" + - name: LINKERD2_PROXY_CORES_MIN + value: "1" - name: LINKERD2_PROXY_SHUTDOWN_ENDPOINT_ENABLED value: "false" - name: LINKERD2_PROXY_LOG @@ -1913,6 +1930,13 @@ spec: fieldPath: spec.nodeName - name: _pod_containerName value: &containerName linkerd-proxy + + + + - name: LINKERD2_PROXY_CORES + value: "1" + - name: LINKERD2_PROXY_CORES_MIN + value: "1" - name: LINKERD2_PROXY_SHUTDOWN_ENDPOINT_ENABLED value: "false" - name: LINKERD2_PROXY_LOG diff --git a/cli/cmd/testdata/install_ha_output.golden b/cli/cmd/testdata/install_ha_output.golden index 71455fe4c..c037f9b94 100644 --- a/cli/cmd/testdata/install_ha_output.golden +++ b/cli/cmd/testdata/install_ha_output.golden @@ -764,6 +764,9 @@ data: memory: limit: 250Mi request: 20Mi + runtime: + workers: + minimum: 1 saMountPath: null shutdownGracePeriod: "" startupProbe: @@ -1088,6 +1091,13 @@ spec: fieldPath: spec.nodeName - name: _pod_containerName value: &containerName linkerd-proxy + + + + - name: LINKERD2_PROXY_CORES + value: "1" + - name: LINKERD2_PROXY_CORES_MIN + value: "1" - name: LINKERD2_PROXY_INBOUND_PORTS_REQUIRE_TLS value: "8080" - name: LINKERD2_PROXY_SHUTDOWN_ENDPOINT_ENABLED @@ -1510,6 +1520,13 @@ spec: fieldPath: spec.nodeName - name: _pod_containerName value: &containerName linkerd-proxy + + + + - name: LINKERD2_PROXY_CORES + value: "1" + - name: LINKERD2_PROXY_CORES_MIN + value: "1" - name: LINKERD2_PROXY_SHUTDOWN_ENDPOINT_ENABLED value: "false" - name: LINKERD2_PROXY_LOG @@ -2065,6 +2082,13 @@ spec: fieldPath: spec.nodeName - name: _pod_containerName value: &containerName linkerd-proxy + + + + - name: LINKERD2_PROXY_CORES + value: "1" + - name: LINKERD2_PROXY_CORES_MIN + value: "1" - name: LINKERD2_PROXY_SHUTDOWN_ENDPOINT_ENABLED value: "false" - name: LINKERD2_PROXY_LOG diff --git a/cli/cmd/testdata/install_ha_with_overrides_output.golden b/cli/cmd/testdata/install_ha_with_overrides_output.golden index 2f1d9fbe7..78b0fa427 100644 --- a/cli/cmd/testdata/install_ha_with_overrides_output.golden +++ b/cli/cmd/testdata/install_ha_with_overrides_output.golden @@ -764,6 +764,9 @@ data: memory: limit: 250Mi request: 300Mi + runtime: + workers: + minimum: 1 saMountPath: null shutdownGracePeriod: "" startupProbe: @@ -1088,6 +1091,13 @@ spec: fieldPath: spec.nodeName - name: _pod_containerName value: &containerName linkerd-proxy + + + + - name: LINKERD2_PROXY_CORES + value: "1" + - name: LINKERD2_PROXY_CORES_MIN + value: "1" - name: LINKERD2_PROXY_INBOUND_PORTS_REQUIRE_TLS value: "8080" - name: LINKERD2_PROXY_SHUTDOWN_ENDPOINT_ENABLED @@ -1510,6 +1520,13 @@ spec: fieldPath: spec.nodeName - name: _pod_containerName value: &containerName linkerd-proxy + + + + - name: LINKERD2_PROXY_CORES + value: "1" + - name: LINKERD2_PROXY_CORES_MIN + value: "1" - name: LINKERD2_PROXY_SHUTDOWN_ENDPOINT_ENABLED value: "false" - name: LINKERD2_PROXY_LOG @@ -2065,6 +2082,13 @@ spec: fieldPath: spec.nodeName - name: _pod_containerName value: &containerName linkerd-proxy + + + + - name: LINKERD2_PROXY_CORES + value: "1" + - name: LINKERD2_PROXY_CORES_MIN + value: "1" - name: LINKERD2_PROXY_SHUTDOWN_ENDPOINT_ENABLED value: "false" - name: LINKERD2_PROXY_LOG diff --git a/cli/cmd/testdata/install_heartbeat_disabled_output.golden b/cli/cmd/testdata/install_heartbeat_disabled_output.golden index ab9972e27..014c42f1d 100644 --- a/cli/cmd/testdata/install_heartbeat_disabled_output.golden +++ b/cli/cmd/testdata/install_heartbeat_disabled_output.golden @@ -668,6 +668,9 @@ data: memory: limit: "" request: "" + runtime: + workers: + minimum: 1 saMountPath: null shutdownGracePeriod: "" startupProbe: @@ -942,6 +945,13 @@ spec: fieldPath: spec.nodeName - name: _pod_containerName value: &containerName linkerd-proxy + + + + - name: LINKERD2_PROXY_CORES + value: "1" + - name: LINKERD2_PROXY_CORES_MIN + value: "1" - name: LINKERD2_PROXY_INBOUND_PORTS_REQUIRE_TLS value: "8080" - name: LINKERD2_PROXY_SHUTDOWN_ENDPOINT_ENABLED @@ -1319,6 +1329,13 @@ spec: fieldPath: spec.nodeName - name: _pod_containerName value: &containerName linkerd-proxy + + + + - name: LINKERD2_PROXY_CORES + value: "1" + - name: LINKERD2_PROXY_CORES_MIN + value: "1" - name: LINKERD2_PROXY_SHUTDOWN_ENDPOINT_ENABLED value: "false" - name: LINKERD2_PROXY_LOG @@ -1749,6 +1766,13 @@ spec: fieldPath: spec.nodeName - name: _pod_containerName value: &containerName linkerd-proxy + + + + - name: LINKERD2_PROXY_CORES + value: "1" + - name: LINKERD2_PROXY_CORES_MIN + value: "1" - name: LINKERD2_PROXY_SHUTDOWN_ENDPOINT_ENABLED value: "false" - name: LINKERD2_PROXY_LOG diff --git a/cli/cmd/testdata/install_helm_control_plane_output.golden b/cli/cmd/testdata/install_helm_control_plane_output.golden index 42f8ec026..c01f34d4b 100644 --- a/cli/cmd/testdata/install_helm_control_plane_output.golden +++ b/cli/cmd/testdata/install_helm_control_plane_output.golden @@ -714,6 +714,9 @@ data: memory: limit: "" request: "" + runtime: + workers: + minimum: 1 saMountPath: null shutdownGracePeriod: "" startupProbe: @@ -984,6 +987,13 @@ spec: fieldPath: spec.nodeName - name: _pod_containerName value: &containerName linkerd-proxy + + + + - name: LINKERD2_PROXY_CORES + value: "1" + - name: LINKERD2_PROXY_CORES_MIN + value: "1" - name: LINKERD2_PROXY_INBOUND_PORTS_REQUIRE_TLS value: "8080" - name: LINKERD2_PROXY_SHUTDOWN_ENDPOINT_ENABLED @@ -1363,6 +1373,13 @@ spec: fieldPath: spec.nodeName - name: _pod_containerName value: &containerName linkerd-proxy + + + + - name: LINKERD2_PROXY_CORES + value: "1" + - name: LINKERD2_PROXY_CORES_MIN + value: "1" - name: LINKERD2_PROXY_SHUTDOWN_ENDPOINT_ENABLED value: "false" - name: LINKERD2_PROXY_LOG @@ -1881,6 +1898,13 @@ spec: fieldPath: spec.nodeName - name: _pod_containerName value: &containerName linkerd-proxy + + + + - name: LINKERD2_PROXY_CORES + value: "1" + - name: LINKERD2_PROXY_CORES_MIN + value: "1" - name: LINKERD2_PROXY_SHUTDOWN_ENDPOINT_ENABLED value: "false" - name: LINKERD2_PROXY_LOG diff --git a/cli/cmd/testdata/install_helm_control_plane_output_ha.golden b/cli/cmd/testdata/install_helm_control_plane_output_ha.golden index 8150fc05e..208fca195 100644 --- a/cli/cmd/testdata/install_helm_control_plane_output_ha.golden +++ b/cli/cmd/testdata/install_helm_control_plane_output_ha.golden @@ -741,6 +741,9 @@ data: memory: limit: 250Mi request: 20Mi + runtime: + workers: + minimum: 1 saMountPath: null shutdownGracePeriod: "" startupProbe: @@ -1061,6 +1064,13 @@ spec: fieldPath: spec.nodeName - name: _pod_containerName value: &containerName linkerd-proxy + + + + - name: LINKERD2_PROXY_CORES + value: "1" + - name: LINKERD2_PROXY_CORES_MIN + value: "1" - name: LINKERD2_PROXY_INBOUND_PORTS_REQUIRE_TLS value: "8080" - name: LINKERD2_PROXY_SHUTDOWN_ENDPOINT_ENABLED @@ -1485,6 +1495,13 @@ spec: fieldPath: spec.nodeName - name: _pod_containerName value: &containerName linkerd-proxy + + + + - name: LINKERD2_PROXY_CORES + value: "1" + - name: LINKERD2_PROXY_CORES_MIN + value: "1" - name: LINKERD2_PROXY_SHUTDOWN_ENDPOINT_ENABLED value: "false" - name: LINKERD2_PROXY_LOG @@ -2044,6 +2061,13 @@ spec: fieldPath: spec.nodeName - name: _pod_containerName value: &containerName linkerd-proxy + + + + - name: LINKERD2_PROXY_CORES + value: "1" + - name: LINKERD2_PROXY_CORES_MIN + value: "1" - name: LINKERD2_PROXY_SHUTDOWN_ENDPOINT_ENABLED value: "false" - name: LINKERD2_PROXY_LOG diff --git a/cli/cmd/testdata/install_helm_control_plane_output_ha_with_gid.golden b/cli/cmd/testdata/install_helm_control_plane_output_ha_with_gid.golden index 4e4540836..b9ac608fa 100755 --- a/cli/cmd/testdata/install_helm_control_plane_output_ha_with_gid.golden +++ b/cli/cmd/testdata/install_helm_control_plane_output_ha_with_gid.golden @@ -741,6 +741,9 @@ data: memory: limit: 250Mi request: 20Mi + runtime: + workers: + minimum: 1 saMountPath: null shutdownGracePeriod: "" startupProbe: @@ -1062,6 +1065,13 @@ spec: fieldPath: spec.nodeName - name: _pod_containerName value: &containerName linkerd-proxy + + + + - name: LINKERD2_PROXY_CORES + value: "1" + - name: LINKERD2_PROXY_CORES_MIN + value: "1" - name: LINKERD2_PROXY_INBOUND_PORTS_REQUIRE_TLS value: "8080" - name: LINKERD2_PROXY_SHUTDOWN_ENDPOINT_ENABLED @@ -1489,6 +1499,13 @@ spec: fieldPath: spec.nodeName - name: _pod_containerName value: &containerName linkerd-proxy + + + + - name: LINKERD2_PROXY_CORES + value: "1" + - name: LINKERD2_PROXY_CORES_MIN + value: "1" - name: LINKERD2_PROXY_SHUTDOWN_ENDPOINT_ENABLED value: "false" - name: LINKERD2_PROXY_LOG @@ -2055,6 +2072,13 @@ spec: fieldPath: spec.nodeName - name: _pod_containerName value: &containerName linkerd-proxy + + + + - name: LINKERD2_PROXY_CORES + value: "1" + - name: LINKERD2_PROXY_CORES_MIN + value: "1" - name: LINKERD2_PROXY_SHUTDOWN_ENDPOINT_ENABLED value: "false" - name: LINKERD2_PROXY_LOG diff --git a/cli/cmd/testdata/install_helm_output_ha_labels.golden b/cli/cmd/testdata/install_helm_output_ha_labels.golden index 6d9b7bbbb..03a8007cd 100644 --- a/cli/cmd/testdata/install_helm_output_ha_labels.golden +++ b/cli/cmd/testdata/install_helm_output_ha_labels.golden @@ -745,6 +745,9 @@ data: memory: limit: 250Mi request: 20Mi + runtime: + workers: + minimum: 1 saMountPath: null shutdownGracePeriod: "" startupProbe: @@ -1069,6 +1072,13 @@ spec: fieldPath: spec.nodeName - name: _pod_containerName value: &containerName linkerd-proxy + + + + - name: LINKERD2_PROXY_CORES + value: "1" + - name: LINKERD2_PROXY_CORES_MIN + value: "1" - name: LINKERD2_PROXY_INBOUND_PORTS_REQUIRE_TLS value: "8080" - name: LINKERD2_PROXY_SHUTDOWN_ENDPOINT_ENABLED @@ -1497,6 +1507,13 @@ spec: fieldPath: spec.nodeName - name: _pod_containerName value: &containerName linkerd-proxy + + + + - name: LINKERD2_PROXY_CORES + value: "1" + - name: LINKERD2_PROXY_CORES_MIN + value: "1" - name: LINKERD2_PROXY_SHUTDOWN_ENDPOINT_ENABLED value: "false" - name: LINKERD2_PROXY_LOG @@ -2064,6 +2081,13 @@ spec: fieldPath: spec.nodeName - name: _pod_containerName value: &containerName linkerd-proxy + + + + - name: LINKERD2_PROXY_CORES + value: "1" + - name: LINKERD2_PROXY_CORES_MIN + value: "1" - name: LINKERD2_PROXY_SHUTDOWN_ENDPOINT_ENABLED value: "false" - name: LINKERD2_PROXY_LOG diff --git a/cli/cmd/testdata/install_helm_output_ha_namespace_selector.golden b/cli/cmd/testdata/install_helm_output_ha_namespace_selector.golden index ddb882652..f4bbe7b30 100644 --- a/cli/cmd/testdata/install_helm_output_ha_namespace_selector.golden +++ b/cli/cmd/testdata/install_helm_output_ha_namespace_selector.golden @@ -736,6 +736,9 @@ data: memory: limit: 250Mi request: 20Mi + runtime: + workers: + minimum: 1 saMountPath: null shutdownGracePeriod: "" startupProbe: @@ -1051,6 +1054,13 @@ spec: fieldPath: spec.nodeName - name: _pod_containerName value: &containerName linkerd-proxy + + + + - name: LINKERD2_PROXY_CORES + value: "1" + - name: LINKERD2_PROXY_CORES_MIN + value: "1" - name: LINKERD2_PROXY_INBOUND_PORTS_REQUIRE_TLS value: "8080" - name: LINKERD2_PROXY_SHUTDOWN_ENDPOINT_ENABLED @@ -1475,6 +1485,13 @@ spec: fieldPath: spec.nodeName - name: _pod_containerName value: &containerName linkerd-proxy + + + + - name: LINKERD2_PROXY_CORES + value: "1" + - name: LINKERD2_PROXY_CORES_MIN + value: "1" - name: LINKERD2_PROXY_SHUTDOWN_ENDPOINT_ENABLED value: "false" - name: LINKERD2_PROXY_LOG @@ -2034,6 +2051,13 @@ spec: fieldPath: spec.nodeName - name: _pod_containerName value: &containerName linkerd-proxy + + + + - name: LINKERD2_PROXY_CORES + value: "1" + - name: LINKERD2_PROXY_CORES_MIN + value: "1" - name: LINKERD2_PROXY_SHUTDOWN_ENDPOINT_ENABLED value: "false" - name: LINKERD2_PROXY_LOG diff --git a/cli/cmd/testdata/install_no_init_container.golden b/cli/cmd/testdata/install_no_init_container.golden index adfea7db8..68bcb67b5 100644 --- a/cli/cmd/testdata/install_no_init_container.golden +++ b/cli/cmd/testdata/install_no_init_container.golden @@ -737,6 +737,9 @@ data: memory: limit: "" request: "" + runtime: + workers: + minimum: 1 saMountPath: null shutdownGracePeriod: "" startupProbe: @@ -1011,6 +1014,13 @@ spec: fieldPath: spec.nodeName - name: _pod_containerName value: &containerName linkerd-proxy + + + + - name: LINKERD2_PROXY_CORES + value: "1" + - name: LINKERD2_PROXY_CORES_MIN + value: "1" - name: LINKERD2_PROXY_INBOUND_PORTS_REQUIRE_TLS value: "8080" - name: LINKERD2_PROXY_SHUTDOWN_ENDPOINT_ENABLED @@ -1381,6 +1391,13 @@ spec: fieldPath: spec.nodeName - name: _pod_containerName value: &containerName linkerd-proxy + + + + - name: LINKERD2_PROXY_CORES + value: "1" + - name: LINKERD2_PROXY_CORES_MIN + value: "1" - name: LINKERD2_PROXY_SHUTDOWN_ENDPOINT_ENABLED value: "false" - name: LINKERD2_PROXY_LOG @@ -1888,6 +1905,13 @@ spec: fieldPath: spec.nodeName - name: _pod_containerName value: &containerName linkerd-proxy + + + + - name: LINKERD2_PROXY_CORES + value: "1" + - name: LINKERD2_PROXY_CORES_MIN + value: "1" - name: LINKERD2_PROXY_SHUTDOWN_ENDPOINT_ENABLED value: "false" - name: LINKERD2_PROXY_LOG diff --git a/cli/cmd/testdata/install_output.golden b/cli/cmd/testdata/install_output.golden index a77e4991b..1c75b81fc 100644 --- a/cli/cmd/testdata/install_output.golden +++ b/cli/cmd/testdata/install_output.golden @@ -700,6 +700,8 @@ data: memory: limit: memory-limit request: memory-request + runtime: + workers: {} saMountPath: null shutdownGracePeriod: "" startupProbe: null @@ -964,6 +966,9 @@ spec: fieldPath: spec.nodeName - name: _pod_containerName value: &containerName linkerd-proxy + + + - name: LINKERD2_PROXY_INBOUND_PORTS_REQUIRE_TLS value: "8080" - name: LINKERD2_PROXY_SHUTDOWN_ENDPOINT_ENABLED @@ -1338,6 +1343,9 @@ spec: fieldPath: spec.nodeName - name: _pod_containerName value: &containerName linkerd-proxy + + + - name: LINKERD2_PROXY_SHUTDOWN_ENDPOINT_ENABLED value: "false" - name: LINKERD2_PROXY_LOG @@ -1858,6 +1866,9 @@ spec: fieldPath: spec.nodeName - name: _pod_containerName value: &containerName linkerd-proxy + + + - name: LINKERD2_PROXY_SHUTDOWN_ENDPOINT_ENABLED value: "false" - name: LINKERD2_PROXY_LOG diff --git a/cli/cmd/testdata/install_proxy_ignores.golden b/cli/cmd/testdata/install_proxy_ignores.golden index 7ee8ae3fb..b1780d34d 100644 --- a/cli/cmd/testdata/install_proxy_ignores.golden +++ b/cli/cmd/testdata/install_proxy_ignores.golden @@ -737,6 +737,9 @@ data: memory: limit: "" request: "" + runtime: + workers: + minimum: 1 saMountPath: null shutdownGracePeriod: "" startupProbe: @@ -1011,6 +1014,13 @@ spec: fieldPath: spec.nodeName - name: _pod_containerName value: &containerName linkerd-proxy + + + + - name: LINKERD2_PROXY_CORES + value: "1" + - name: LINKERD2_PROXY_CORES_MIN + value: "1" - name: LINKERD2_PROXY_INBOUND_PORTS_REQUIRE_TLS value: "8080" - name: LINKERD2_PROXY_SHUTDOWN_ENDPOINT_ENABLED @@ -1388,6 +1398,13 @@ spec: fieldPath: spec.nodeName - name: _pod_containerName value: &containerName linkerd-proxy + + + + - name: LINKERD2_PROXY_CORES + value: "1" + - name: LINKERD2_PROXY_CORES_MIN + value: "1" - name: LINKERD2_PROXY_SHUTDOWN_ENDPOINT_ENABLED value: "false" - name: LINKERD2_PROXY_LOG @@ -1902,6 +1919,13 @@ spec: fieldPath: spec.nodeName - name: _pod_containerName value: &containerName linkerd-proxy + + + + - name: LINKERD2_PROXY_CORES + value: "1" + - name: LINKERD2_PROXY_CORES_MIN + value: "1" - name: LINKERD2_PROXY_SHUTDOWN_ENDPOINT_ENABLED value: "false" - name: LINKERD2_PROXY_LOG diff --git a/cli/cmd/testdata/install_values_file.golden b/cli/cmd/testdata/install_values_file.golden index 04c694d74..e8e407e49 100644 --- a/cli/cmd/testdata/install_values_file.golden +++ b/cli/cmd/testdata/install_values_file.golden @@ -737,6 +737,9 @@ data: memory: limit: "" request: "" + runtime: + workers: + minimum: 1 saMountPath: null shutdownGracePeriod: "" startupProbe: @@ -1011,6 +1014,13 @@ spec: fieldPath: spec.nodeName - name: _pod_containerName value: &containerName linkerd-proxy + + + + - name: LINKERD2_PROXY_CORES + value: "1" + - name: LINKERD2_PROXY_CORES_MIN + value: "1" - name: LINKERD2_PROXY_INBOUND_PORTS_REQUIRE_TLS value: "8080" - name: LINKERD2_PROXY_SHUTDOWN_ENDPOINT_ENABLED @@ -1388,6 +1398,13 @@ spec: fieldPath: spec.nodeName - name: _pod_containerName value: &containerName linkerd-proxy + + + + - name: LINKERD2_PROXY_CORES + value: "1" + - name: LINKERD2_PROXY_CORES_MIN + value: "1" - name: LINKERD2_PROXY_SHUTDOWN_ENDPOINT_ENABLED value: "false" - name: LINKERD2_PROXY_LOG @@ -1902,6 +1919,13 @@ spec: fieldPath: spec.nodeName - name: _pod_containerName value: &containerName linkerd-proxy + + + + - name: LINKERD2_PROXY_CORES + value: "1" + - name: LINKERD2_PROXY_CORES_MIN + value: "1" - name: LINKERD2_PROXY_SHUTDOWN_ENDPOINT_ENABLED value: "false" - name: LINKERD2_PROXY_LOG diff --git a/controller/proxy-injector/fake/data/pod-cpu-ratio.json b/controller/proxy-injector/fake/data/pod-cpu-ratio.json new file mode 100644 index 000000000..5b33a8e77 --- /dev/null +++ b/controller/proxy-injector/fake/data/pod-cpu-ratio.json @@ -0,0 +1,433 @@ +[ + { + "op": "add", + "path": "/metadata/annotations/linkerd.io~1proxy-version", + "value": "dev-undefined" + }, + { + "op": "add", + "path": "/metadata/annotations/linkerd.io~1trust-root-sha256", + "value": "5090806bcf2daff5d54739ba02a8e7b919f7e62b2a46757e11089c916ec97fc2" + }, + { + "op": "add", + "path": "/metadata/labels/linkerd.io~1control-plane-ns", + "value": "linkerd" + }, + { + "op": "add", + "path": "/metadata/labels/linkerd.io~1proxy-deployment", + "value": "owner-deployment" + }, + { + "op": "add", + "path": "/metadata/labels/linkerd.io~1workload-ns", + "value": "kube-public" + }, + { + "op": "add", + "path": "/spec/volumes", + "value": [] + }, + { + "op": "add", + "path": "/spec/initContainers", + "value": [] + }, + { + "op": "add", + "path": "/spec/volumes/-", + "value": { + "emptyDir": {}, + "name": "linkerd-proxy-init-xtables-lock" + } + }, + { + "op": "add", + "path": "/spec/initContainers/-", + "value": { + "args": [ + "--ipv6=false", + "--incoming-proxy-port", + "4143", + "--outgoing-proxy-port", + "4140", + "--proxy-uid", + "2102", + "--inbound-ports-to-ignore", + "4190,4191,4567,4568", + "--outbound-ports-to-ignore", + "4567,4568" + ], + "image": "cr.l5d.io/linkerd/proxy-init:v2.4.2", + "imagePullPolicy": "IfNotPresent", + "name": "linkerd-init", + "resources": { + "requests": { + "cpu": "3" + } + }, + "securityContext": { + "allowPrivilegeEscalation": false, + "capabilities": { + "add": [ + "NET_ADMIN", + "NET_RAW" + ] + }, + "privileged": false, + "runAsNonRoot": true, + "runAsUser": 65534, + "runAsGroup": 65534, + "readOnlyRootFilesystem": true, + "seccompProfile": { + "type": "RuntimeDefault" + } + }, + "terminationMessagePolicy": "FallbackToLogsOnError", + "volumeMounts": [ + { + "mountPath": "/run", + "name": "linkerd-proxy-init-xtables-lock" + } + ] + } + }, + { + "op": "add", + "path": "/spec/volumes/-", + "value": { + "name": "linkerd-identity-end-entity", + "emptyDir": { + "medium": "Memory" + } + } + }, + { + "op": "add", + "path": "/spec/volumes/-", + "value": { + "name": "linkerd-identity-token", + "projected": { + "sources": [ + { + "serviceAccountToken": { + "audience": "identity.l5d.io", + "expirationSeconds": 86400, + "path": "linkerd-identity-token" + } + } + ] + } + } + }, + { + "op": "add", + "path": "/spec/containers/0", + "value": { + "env": [ + { + "name": "_pod_name", + "valueFrom": { + "fieldRef": { + "fieldPath": "metadata.name" + } + } + }, + { + "name": "_pod_ns", + "valueFrom": { + "fieldRef": { + "fieldPath": "metadata.namespace" + } + } + }, + { + "name": "_pod_uid", + "valueFrom": { + "fieldRef": { + "fieldPath": "metadata.uid" + } + } + }, + { + "name": "_pod_nodeName", + "valueFrom": { + "fieldRef": { + "fieldPath": "spec.nodeName" + } + } + }, + { + "name": "_pod_containerName", + "value": "linkerd-proxy" + }, + { + "name": "LINKERD2_PROXY_CORES", + "value": "3" + }, + { + "name": "LINKERD2_PROXY_CORES_MIN", + "value": "3" + }, + { + "name": "LINKERD2_PROXY_CORES_MAX_RATIO", + "value": "0.1" + }, + { + "name": "LINKERD2_PROXY_SHUTDOWN_ENDPOINT_ENABLED", + "value": "false" + }, + { + "name": "LINKERD2_PROXY_LOG", + "value": "warn,linkerd=info,hickory=error,[{headers}]=off,[{request}]=off" + }, + { + "name": "LINKERD2_PROXY_LOG_FORMAT", + "value": "plain" + }, + { + "name": "LINKERD2_PROXY_DESTINATION_SVC_ADDR", + "value": "linkerd-dst-headless.linkerd.svc.cluster.local.:8086" + }, + { + "name": "LINKERD2_PROXY_DESTINATION_PROFILE_NETWORKS", + "value": "10.0.0.0/8,100.64.0.0/10,172.16.0.0/12,192.168.0.0/16,fd00::/8" + }, + { + "name": "LINKERD2_PROXY_POLICY_SVC_ADDR", + "value": "linkerd-policy.linkerd.svc.cluster.local.:8090" + }, + { + "name": "LINKERD2_PROXY_POLICY_WORKLOAD", + "value": "{\"ns\":\"$(_pod_ns)\", \"pod\":\"$(_pod_name)\"}\n" + }, + { + "name": "LINKERD2_PROXY_INBOUND_DEFAULT_POLICY", + "value": "all-unauthenticated" + }, + { + "name": "LINKERD2_PROXY_POLICY_CLUSTER_NETWORKS", + "value": "10.0.0.0/8,100.64.0.0/10,172.16.0.0/12,192.168.0.0/16,fd00::/8" + }, + { + "name": "LINKERD2_PROXY_CONTROL_STREAM_INITIAL_TIMEOUT", + "value": "3s" + }, + { + "name": "LINKERD2_PROXY_CONTROL_STREAM_IDLE_TIMEOUT", + "value": "5m" + }, + { + "name": "LINKERD2_PROXY_CONTROL_STREAM_LIFETIME", + "value": "1h" + }, + { + "name": "LINKERD2_PROXY_INBOUND_CONNECT_TIMEOUT", + "value": "100ms" + }, + { + "name": "LINKERD2_PROXY_OUTBOUND_CONNECT_TIMEOUT", + "value": "1000ms" + }, + { + "name": "LINKERD2_PROXY_OUTBOUND_DISCOVERY_IDLE_TIMEOUT", + "value": "5s" + }, + { + "name": "LINKERD2_PROXY_INBOUND_DISCOVERY_IDLE_TIMEOUT", + "value": "90s" + }, + { + "name": "LINKERD2_PROXY_CONTROL_LISTEN_ADDR", + "value": "0.0.0.0:4190" + }, + { + "name": "LINKERD2_PROXY_ADMIN_LISTEN_ADDR", + "value": "0.0.0.0:4191" + }, + { + "name": "LINKERD2_PROXY_OUTBOUND_LISTEN_ADDR", + "value": "127.0.0.1:4140" + }, + { + "name": "LINKERD2_PROXY_OUTBOUND_LISTEN_ADDRS", + "value": "127.0.0.1:4140" + }, + { + "name": "LINKERD2_PROXY_INBOUND_LISTEN_ADDR", + "value": "0.0.0.0:4143" + }, + { + "name": "LINKERD2_PROXY_INBOUND_IPS", + "valueFrom": { + "fieldRef": { + "fieldPath": "status.podIPs" + } + } + }, + { + "name": "LINKERD2_PROXY_INBOUND_PORTS", + "value": "80" + }, + { + "name": "LINKERD2_PROXY_DESTINATION_PROFILE_SUFFIXES", + "value": "svc.cluster.local." + }, + { + "name": "LINKERD2_PROXY_INBOUND_ACCEPT_KEEPALIVE", + "value": "10000ms" + }, + { + "name": "LINKERD2_PROXY_OUTBOUND_CONNECT_KEEPALIVE", + "value": "10000ms" + }, + { + "name": "LINKERD2_PROXY_INBOUND_ACCEPT_USER_TIMEOUT", + "value": "30s" + }, + { + "name": "LINKERD2_PROXY_OUTBOUND_CONNECT_USER_TIMEOUT", + "value": "30s" + }, + { + "name": "LINKERD2_PROXY_INBOUND_SERVER_HTTP2_KEEP_ALIVE_INTERVAL", + "value": "10s" + }, + { + "name": "LINKERD2_PROXY_INBOUND_SERVER_HTTP2_KEEP_ALIVE_TIMEOUT", + "value": "3s" + }, + { + "name": "LINKERD2_PROXY_OUTBOUND_SERVER_HTTP2_KEEP_ALIVE_INTERVAL", + "value": "10s" + }, + { + "name": "LINKERD2_PROXY_OUTBOUND_SERVER_HTTP2_KEEP_ALIVE_TIMEOUT", + "value": "3s" + }, + { + "name": "LINKERD2_PROXY_INBOUND_PORTS_DISABLE_PROTOCOL_DETECTION", + "value": "25,587,3306,4444,5432,6379,9300,11211" + }, + { + "name": "LINKERD2_PROXY_DESTINATION_CONTEXT", + "value": "{\"ns\":\"$(_pod_ns)\", \"nodeName\":\"$(_pod_nodeName)\", \"pod\":\"$(_pod_name)\"}\n" + }, + { + "name": "_pod_sa", + "valueFrom": { + "fieldRef": { + "fieldPath": "spec.serviceAccountName" + } + } + }, + { + "name": "_l5d_ns", + "value": "linkerd" + }, + { + "name": "_l5d_trustdomain", + "value": "cluster.local" + }, + { + "name": "LINKERD2_PROXY_IDENTITY_DIR", + "value": "/var/run/linkerd/identity/end-entity" + }, + { + "name": "LINKERD2_PROXY_IDENTITY_TRUST_ANCHORS", + "value": "IdentityTrustAnchorsPEM\n" + }, + { + "name": "LINKERD2_PROXY_IDENTITY_TOKEN_FILE", + "value": "/var/run/secrets/tokens/linkerd-identity-token" + }, + { + "name": "LINKERD2_PROXY_IDENTITY_SVC_ADDR", + "value": "linkerd-identity-headless.linkerd.svc.cluster.local.:8080" + }, + { + "name": "LINKERD2_PROXY_IDENTITY_LOCAL_NAME", + "value": "$(_pod_sa).$(_pod_ns).serviceaccount.identity.linkerd.cluster.local" + }, + { + "name": "LINKERD2_PROXY_IDENTITY_SVC_NAME", + "value": "linkerd-identity.linkerd.serviceaccount.identity.linkerd.cluster.local" + }, + { + "name": "LINKERD2_PROXY_DESTINATION_SVC_NAME", + "value": "linkerd-destination.linkerd.serviceaccount.identity.linkerd.cluster.local" + }, + { + "name": "LINKERD2_PROXY_POLICY_SVC_NAME", + "value": "linkerd-destination.linkerd.serviceaccount.identity.linkerd.cluster.local" + } + ], + "image": "cr.l5d.io/linkerd/proxy:dev-undefined", + "imagePullPolicy": "IfNotPresent", + "lifecycle": { + "postStart": { + "exec": { + "command": [ + "/usr/lib/linkerd/linkerd-await", + "--timeout=2m", + "--port=4191" + ] + } + } + }, + "livenessProbe": { + "httpGet": { + "path": "/live", + "port": 4191 + }, + "initialDelaySeconds": 10, + "timeoutSeconds": 1 + }, + "name": "linkerd-proxy", + "ports": [ + { + "containerPort": 4143, + "name": "linkerd-proxy" + }, + { + "containerPort": 4191, + "name": "linkerd-admin" + } + ], + "readinessProbe": { + "httpGet": { + "path": "/ready", + "port": 4191 + }, + "initialDelaySeconds": 2, + "timeoutSeconds": 1 + }, + "resources": { + "requests": { + "cpu": "3" + } + }, + "securityContext": { + "allowPrivilegeEscalation": false, + "readOnlyRootFilesystem": true, + "runAsNonRoot": true, + "runAsUser": 2102, + "seccompProfile": { + "type": "RuntimeDefault" + } + }, + "terminationMessagePolicy": "FallbackToLogsOnError", + "volumeMounts": [ + { + "mountPath": "/var/run/linkerd/identity/end-entity", + "name": "linkerd-identity-end-entity" + }, + { + "mountPath": "/var/run/secrets/tokens", + "name": "linkerd-identity-token" + } + ] + } + } +] diff --git a/controller/proxy-injector/fake/data/pod-inject-enabled-cpu-ratio.yaml b/controller/proxy-injector/fake/data/pod-inject-enabled-cpu-ratio.yaml new file mode 100644 index 000000000..ad8f18f75 --- /dev/null +++ b/controller/proxy-injector/fake/data/pod-inject-enabled-cpu-ratio.yaml @@ -0,0 +1,18 @@ +kind: Pod +apiVersion: apps/v1 +metadata: + name: nginx + namespace: kube-public + annotations: + config.linkerd.io/proxy-cpu-request: "3" + config.linkerd.io/proxy-cpu-ratio-limit: "0.10" + linkerd.io/inject: enabled + labels: + app: nginx +spec: + containers: + - name: nginx + image: nginx + ports: + - name: http + containerPort: 80 diff --git a/controller/proxy-injector/fake/data/pod-log-level.json b/controller/proxy-injector/fake/data/pod-log-level.json index 4443b1dbd..9026c0b14 100644 --- a/controller/proxy-injector/fake/data/pod-log-level.json +++ b/controller/proxy-injector/fake/data/pod-log-level.json @@ -158,6 +158,14 @@ "name": "_pod_containerName", "value": "linkerd-proxy" }, + { + "name": "LINKERD2_PROXY_CORES", + "value": "1" + }, + { + "name": "LINKERD2_PROXY_CORES_MIN", + "value": "1" + }, { "name": "LINKERD2_PROXY_SHUTDOWN_ENDPOINT_ENABLED", "value": "false" diff --git a/controller/proxy-injector/fake/data/pod-with-debug.patch.json b/controller/proxy-injector/fake/data/pod-with-debug.patch.json index e92df93dc..19c5ce354 100644 --- a/controller/proxy-injector/fake/data/pod-with-debug.patch.json +++ b/controller/proxy-injector/fake/data/pod-with-debug.patch.json @@ -182,6 +182,14 @@ "name": "_pod_containerName", "value": "linkerd-proxy" }, + { + "name": "LINKERD2_PROXY_CORES", + "value": "1" + }, + { + "name": "LINKERD2_PROXY_CORES_MIN", + "value": "1" + }, { "name": "LINKERD2_PROXY_SHUTDOWN_ENDPOINT_ENABLED", "value": "false" diff --git a/controller/proxy-injector/fake/data/pod-with-ns-annotations.patch.json b/controller/proxy-injector/fake/data/pod-with-ns-annotations.patch.json index 6a3d3a55b..1dbf0fec2 100644 --- a/controller/proxy-injector/fake/data/pod-with-ns-annotations.patch.json +++ b/controller/proxy-injector/fake/data/pod-with-ns-annotations.patch.json @@ -168,6 +168,14 @@ "name": "_pod_containerName", "value": "linkerd-proxy" }, + { + "name": "LINKERD2_PROXY_CORES", + "value": "1" + }, + { + "name": "LINKERD2_PROXY_CORES_MIN", + "value": "1" + }, { "name": "LINKERD2_PROXY_SHUTDOWN_ENDPOINT_ENABLED", "value": "false" diff --git a/controller/proxy-injector/fake/data/pod.patch.json b/controller/proxy-injector/fake/data/pod.patch.json index 64718d4a6..af2239ae3 100644 --- a/controller/proxy-injector/fake/data/pod.patch.json +++ b/controller/proxy-injector/fake/data/pod.patch.json @@ -158,6 +158,14 @@ "name": "_pod_containerName", "value": "linkerd-proxy" }, + { + "name": "LINKERD2_PROXY_CORES", + "value": "1" + }, + { + "name": "LINKERD2_PROXY_CORES_MIN", + "value": "1" + }, { "name": "LINKERD2_PROXY_SHUTDOWN_ENDPOINT_ENABLED", "value": "false" diff --git a/controller/proxy-injector/webhook_test.go b/controller/proxy-injector/webhook_test.go index fb94cc362..3c987d885 100644 --- a/controller/proxy-injector/webhook_test.go +++ b/controller/proxy-injector/webhook_test.go @@ -98,11 +98,6 @@ func TestGetPodPatch(t *testing.T) { ns: nsDisabled, conf: confNsDisabled(), }, - { - filename: "pod-inject-enabled.yaml", - ns: nsDisabled, - conf: confNsDisabled(), - }, { filename: "pod-with-debug-disabled.yaml", ns: nsDisabled, @@ -181,6 +176,33 @@ func TestGetPodPatch(t *testing.T) { } }) + t.Run("by configuring cpu limit by ratio", func(t *testing.T) { + _, expectedPatch := loadPatch(factory, t, "pod-cpu-ratio.json") + + pod := fileContents(factory, t, "pod-inject-enabled-cpu-ratio.yaml") + fakeReq := getFakePodReq(pod) + conf := confNsWithoutOpaquePorts(). + WithKind(fakeReq.Kind.Kind). + WithOwnerRetriever(ownerRetrieverFake) + _, err = conf.ParseMetaAndYAML(fakeReq.Object.Raw) + if err != nil { + t.Fatal(err) + } + + patchJSON, err := conf.GetPodPatch(true) + if err != nil { + t.Fatalf("Unexpected PatchForAdmissionRequest error: %s", err) + } + + actualPatch := unmarshalPatch(t, patchJSON) + if diff := deep.Equal(expectedPatch, actualPatch); diff != nil { + expectedJSON, _ := json.MarshalIndent(expectedPatch, "", " ") + actualJSON, _ := json.MarshalIndent(actualPatch, "", " ") + t.Fatalf("Expected:\n%s\n\nActual:\n%s\n\nDiff:%+v", + string(expectedJSON), string(actualJSON), diff) + } + }) + t.Run("by checking pod inherits config annotations from namespace", func(t *testing.T) { _, expectedPatch := loadPatch(factory, t, "pod-with-ns-annotations.patch.json") diff --git a/pkg/charts/linkerd2/values.go b/pkg/charts/linkerd2/values.go index 3c8fb6e0f..cc7b5e733 100644 --- a/pkg/charts/linkerd2/values.go +++ b/pkg/charts/linkerd2/values.go @@ -121,9 +121,7 @@ type ( // Proxy contains the fields to set the proxy sidecar container Proxy struct { - Capabilities *Capabilities `json:"capabilities"` - // This should match .Resources.CPU.Limit, but must be a whole number - Cores int64 `json:"cores,omitempty"` + Capabilities *Capabilities `json:"capabilities"` EnableExternalProfiles bool `json:"enableExternalProfiles"` Image *Image `json:"image"` EnableShutdownEndpoint bool `json:"enableShutdownEndpoint"` @@ -163,6 +161,11 @@ type ( Inbound ProxyParams `json:"inbound,omitempty"` Outbound ProxyParams `json:"outbound,omitempty"` + + // Deprecated: Use Runtime.Workers.Minimum. + Cores int64 `json:"cores,omitempty"` + + Runtime ProxyRuntime `json:"runtime,omitempty"` } ProxyParams = map[string]ProxyScopeParams @@ -179,6 +182,17 @@ type ( Lifetime string `json:"lifetime"` } + ProxyRuntime struct { + Workers ProxyRuntimeWorkers `json:"workers,omitempty"` + } + + ProxyRuntimeWorkers struct { + Maximum int64 `json:"maximum,omitempty"` + Minimum int64 `json:"minimum,omitempty"` + + MaximumCPURatio float64 `json:"maximumCPURatio,omitempty"` + } + // ProxyInit contains the fields to set the proxy-init container ProxyInit struct { Capabilities *Capabilities `json:"capabilities"` diff --git a/pkg/charts/linkerd2/values_test.go b/pkg/charts/linkerd2/values_test.go index fc4c51a01..58ae1cd60 100644 --- a/pkg/charts/linkerd2/values_test.go +++ b/pkg/charts/linkerd2/values_test.go @@ -179,6 +179,11 @@ func TestNewValues(t *testing.T) { Lifetime: "1h", }, }, + Runtime: ProxyRuntime{ + Workers: ProxyRuntimeWorkers{ + Minimum: 1, + }, + }, Inbound: ProxyParams{ "server": ProxyScopeParams{ "http2": ProxyProtoParams{ diff --git a/pkg/inject/inject.go b/pkg/inject/inject.go index 91987eb91..8748912da 100644 --- a/pkg/inject/inject.go +++ b/pkg/inject/inject.go @@ -363,12 +363,20 @@ func applyAnnotationOverrides(values *l5dcharts.Values, annotations map[string]s } } + // Proxy CPU resources + if override, ok := annotations[k8s.ProxyCPURequestAnnotation]; ok { - _, err := k8sResource.ParseQuantity(override) + q, err := k8sResource.ParseQuantity(override) if err != nil { log.Warnf("%s (%s)", err, k8s.ProxyCPURequestAnnotation) } else { values.Proxy.Resources.CPU.Request = override + + n, err := ToWholeCPUCores(q) + if err != nil { + log.Warnf("%s (%s)", err, k8s.ProxyCPULimitAnnotation) + } + values.Proxy.Runtime.Workers.Minimum = n } } @@ -383,7 +391,19 @@ func applyAnnotationOverrides(values *l5dcharts.Values, annotations map[string]s if err != nil { log.Warnf("%s (%s)", err, k8s.ProxyCPULimitAnnotation) } - values.Proxy.Cores = n + values.Proxy.Runtime.Workers.Maximum = n + } + } + + if override, ok := annotations[k8s.ProxyCPURatioLimitAnnotation]; ok { + ratio, err := strconv.ParseFloat(override, 64) + if err != nil { + log.Warnf("%s (%s)", err, k8s.ProxyCPURatioLimitAnnotation) + } else if (ratio <= 0.0) || (ratio >= 1.0) { + log.Warnf("invalid value used for the %s annotation, valid values are between 0.0 and 1.0", + k8s.ProxyCPURatioLimitAnnotation) + } else { + values.Proxy.Runtime.Workers.MaximumCPURatio = ratio } } diff --git a/pkg/inject/inject_test.go b/pkg/inject/inject_test.go index 70322f157..1200cde1f 100644 --- a/pkg/inject/inject_test.go +++ b/pkg/inject/inject_test.go @@ -85,7 +85,7 @@ func TestGetOverriddenValues(t *testing.T) { expected: func() *l5dcharts.Values { values, _ := l5dcharts.NewValues() - values.Proxy.Cores = 2 + values.Proxy.Runtime.Workers.Maximum = 2 values.Proxy.Image.Name = "cr.l5d.io/linkerd/proxy" values.Proxy.Image.PullPolicy = pullPolicy values.Proxy.Image.Version = proxyVersionOverride @@ -190,7 +190,7 @@ func TestGetOverriddenValues(t *testing.T) { expected: func() *l5dcharts.Values { values, _ := l5dcharts.NewValues() - values.Proxy.Cores = 2 + values.Proxy.Runtime.Workers.Maximum = 2 values.Proxy.Image.Name = "cr.l5d.io/linkerd/proxy" values.Proxy.Image.PullPolicy = pullPolicy values.Proxy.Image.Version = proxyVersionOverride diff --git a/pkg/k8s/labels.go b/pkg/k8s/labels.go index d828f71cd..3f2a76a71 100644 --- a/pkg/k8s/labels.go +++ b/pkg/k8s/labels.go @@ -197,6 +197,10 @@ const ( // ProxyCPULimitAnnotation can be used to override the limitCPU config. ProxyCPULimitAnnotation = ProxyConfigAnnotationsPrefix + "/proxy-cpu-limit" + // ProxyCPURatioLimitAnnotation can be used to configure + // proxy worker threads as a proportion of the node's available CPUs. + ProxyCPURatioLimitAnnotation = ProxyConfigAnnotationsPrefix + "/proxy-cpu-ratio-limit" + // ProxyMemoryLimitAnnotation can be used to override the limitMemory config. ProxyMemoryLimitAnnotation = ProxyConfigAnnotationsPrefix + "/proxy-memory-limit"