Skip to content

Sync bootstrap config from consul/main#101

Merged
freddygv merged 2 commits into
mainfrom
cc-4929-copy-bootstrap-config
May 9, 2023
Merged

Sync bootstrap config from consul/main#101
freddygv merged 2 commits into
mainfrom
cc-4929-copy-bootstrap-config

Conversation

@freddygv
Copy link
Copy Markdown
Contributor

@freddygv freddygv commented May 9, 2023

Updated with make copy-bootstrap-config to sync changes from hashicorp/consul#17204


UNIX domain socket paths are limited to 104-108 characters depending on the OS. This limit was quite easy to exceed when testing the feature on Kubernetes, due to how proxy IDs encode the Pod ID eg:
metrics-collector-59467bcb9b-fkkzl-hcp-metrics-collector-sidecar-proxy

To ensure we stay under the lower 104 character limit this commit makes a couple changes:

  • Use a b64 encoded SHA1 hash of the namespace + proxy ID to create a short and deterministic socket file name.
  • Add validation to proxy registrations and proxy-defaults to enforce a limit on the socket directory length.

@freddygv freddygv added backport/1.0 backport/1.1 Changes are backported to 1.1 labels May 9, 2023
@freddygv freddygv requested a review from ndhanushkodi May 9, 2023 20:33
@freddygv freddygv requested a review from a team as a code owner May 9, 2023 20:33
@freddygv freddygv added the pr/no-changelog This PR does not introduce a user-facing change that should be reflected in the changelog label May 9, 2023
Copy link
Copy Markdown

@ndhanushkodi ndhanushkodi left a comment

Choose a reason for hiding this comment

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

nice!

@@ -91,19 +94,6 @@ const (
]
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

just checking, is this file diff bigger because the changes weren't synced recently?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

It's because the original changes from #90 weren't synced via the Makefile target, and were a bit different from the Consul changes

Now things are the same on both sides

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport/1.1 Changes are backported to 1.1 pr/no-changelog This PR does not introduce a user-facing change that should be reflected in the changelog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants