Skip to content

Conversation

olix0r
Copy link
Member

@olix0r olix0r commented Apr 23, 2024

New proxy HTTP2 server parameters can be configured from the environment. These environment variables take the form:

LINKERD2_PROXY_[INBOUND|OUTBOUND]_[SERVER]_[HTTP2]_<PARAM>

We want to allow these parameters to be set, i.e., in a values.yaml file without having to document all of the possible parameters (especially those that primarily influence internals not exposed to the application).

To accomodate this, this commit introduces generic proxy environment templating and a test to verify the behavior.

Values like the following:

proxy:
  inbound:
    scope:
      proto:
        blueberryPi: 3.14
  outbound:
    scope:
      proto:
        appleSauce: "valueA"

Manifest as a proxy environment including:

LINKERD2_PROXY_INBOUND_SCOPE_PROTO_BLUEBERRY_PI="3.14"
LINKERD2_PROXY_OUTBOUND_SCOPE_PROTO_APPLE_SAUCE=valueA

That is, Helm value keys are converted to SCREAMING_SNAKE_CASE environment variable names.

@olix0r olix0r requested a review from a team as a code owner April 23, 2024 22:06
@olix0r olix0r force-pushed the ver/inject-h2-server branch from 2e9dede to 14ec2f1 Compare April 23, 2024 22:08
New proxy HTTP2 server parameters can be configured from the environment. These
environment variables take the form:

    LINKERD2_PROXY_[INBOUND|OUTBOUND]_[SERVER]_[HTTP2]_<PARAM>

We want to allow these parameters to be set, i.e., in a values.yaml file without
having to document all of the possible parameters (especially those that
primarily influence internals not exposed to the application).

To accomodate this, this commit introduces generic proxy environment templating
and a test to verify the behavior.

Values like the following:

    proxy:
      inbound:
        scope:
          proto:
            blueberryPi: 3.14
      outbound:
        scope:
          proto:
            applesauce: "valueA"

Manifest as a proxy environment including:

    LINKERD2_PROXY_INBOUND_SCOPE_PROTO_BLUEBERRY_PI="3.14"
    LINKERD2_PROXY_OUTBOUND_SCOPE_PROTO_APPLESAUCE=valueA

That is, Helm value keys are converted to SCREAMING_SNAKE_CASE environment
variable names.
@olix0r olix0r force-pushed the ver/inject-h2-server branch from 14ec2f1 to 24f3de2 Compare April 23, 2024 22:19
@olix0r olix0r changed the title feat(inject): support arbitrary proxy parameters feat(inject): support arbitrary proxy parameters from helm Apr 23, 2024
Copy link
Member

@adleong adleong left a comment

Choose a reason for hiding this comment

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

Looks great

@olix0r olix0r merged commit 9e241a7 into main Apr 24, 2024
@olix0r olix0r deleted the ver/inject-h2-server branch April 24, 2024 20:55
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.

2 participants