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

feat!: Add config to disable proxy /shutdown admin endpoint #12705

Merged
merged 3 commits into from
Jun 14, 2024

Conversation

adleong
Copy link
Member

@adleong adleong commented Jun 12, 2024

We add a proxy.enableShutdownEndpoint Helm value and corresponding config.linkerd.io/enableShutdownEndpoint workload annotation for configuring the proxy's /shutdown admin endpoint. These configs work by setting the LINKERD2_PROXY_SHUTDOWN_ENDPOINT_ENABLED env var on the proxy.

Depends on linkerd/linkerd2-proxy#3014

@adleong adleong requested a review from a team as a code owner June 12, 2024 00:44
@olix0r olix0r changed the title Add config to disable proxy /shutdown admin endpoint feat!: Add config to disable proxy /shutdown admin endpoint Jun 14, 2024
@@ -25,7 +25,7 @@ Kubernetes: `>=1.22.0-0`
| commonLabels | object | `{}` | Labels to apply to all resources |
| destCNIBinDir | string | `"/opt/cni/bin"` | Directory on the host where the CNI configuration will be placed |
| destCNINetDir | string | `"/etc/cni/net.d"` | Directory on the host where the CNI plugin binaries reside |
| disableIPv6 | bool | `false` | Disables adding IPv6 rules on top of IPv4 rules |
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

intentional? looks like you need a rebase

@@ -209,6 +209,10 @@ const (
// ProxyGIDAnnotation can be used to override the GID config.
ProxyGIDAnnotation = ProxyConfigAnnotationsPrefix + "/proxy-gid"

// ProxyEnableShutdownEndpointAnnotation can be used to override the
// LINKERD2_PROXY_SHUTDOWN_ENDPOINT_ENABLED config.
ProxyEnableShutdownEndpointAnnotation = ProxyConfigAnnotationsPrefix + "/enable-shutdown-endpoint"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As discussed, I think we probably ought to use something like

Suggested change
ProxyEnableShutdownEndpointAnnotation = ProxyConfigAnnotationsPrefix + "/enable-shutdown-endpoint"
ProxyEnableShutdownEndpointAnnotation = ProxyConfigAnnotationsPrefix + "/proxy-admin-shutdown"

with a value of 'enabled'.

  1. true causes YAML weirdness, since the value must be explicitly quoted to avoid type errors in annotations. enabled is properly handled a string value without quotes.
  2. Consistent proxy- prefixes sort together and help express scoping/grouping.

@olix0r olix0r merged commit 35fb2d6 into main Jun 14, 2024
40 checks passed
@olix0r olix0r deleted the alex/disable-shutdown branch June 14, 2024 16:55
@KenVanGrinsven
Copy link

Why isn't this documented as a breaking change in the release notes, since we've changed a default value here?
Also, I expected the documentation for graceful pod shutdown to be updated with this change, mentioning that this endpoint is turned off by default.

@kflynn
Copy link
Member

kflynn commented Jun 28, 2024

@KenVanGrinsven Ouch, thanks for pointing that out! I've edited the release notes to cover that, and will be updating the docs shortly. Sorry for the misstep, and thanks for pointing it out!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants