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

NET-6663 Set gateway-kind in Workload metadata when it represents a xGateway Pod #3365

Merged
merged 2 commits into from
Dec 14, 2023

Conversation

nathancoleman
Copy link
Member

@nathancoleman nathancoleman commented Dec 12, 2023

Changes proposed in this PR

By setting the gateway-kind annotation on the Pods for a MeshGateway, we indicate to the Pod controller in consul-k8s that the Pod represents a mesh gateway (or api/terminating in the future). The Pod controller then passes this along as metadata on the Workload that it creates in Consul.

The end result is that the sidecar and gateway proxy controllers can determine which Workloads they should generate ProxyStateTemplates for and which should be left to the other.

How I've tested this PR

When combined with hashicorp/consul#19902, the sidecar proxy controller should skip any Workloads created for a MeshGateway when meshGateway.enabled=true and experiments: [resource-apis] in values.yaml.

How I expect reviewers to test this PR

See above

Checklist

@nathancoleman nathancoleman added theme/mesh-gw pr/no-changelog PR does not need a corresponding .changelog entry pr/no-backport signals that a PR will not contain a backport label labels Dec 12, 2023
@nathancoleman nathancoleman changed the title Set gateway-kind in Workload metadata when it represents a xGateway Pod NET-6663 Set gateway-kind in Workload metadata when it represents a xGateway Pod Dec 12, 2023
@nathancoleman nathancoleman marked this pull request as ready for review December 14, 2023 17:14
@nathancoleman nathancoleman requested review from DanStough, a team, andrewstucki and sarahalsmiller and removed request for a team December 14, 2023 17:14
Copy link
Contributor

@DanStough DanStough left a comment

Choose a reason for hiding this comment

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

LGTM

By setting the gateway-kind annotation on the Pods for a MeshGateway, we indicate to the Pod controller in consul-k8s that the Pod represents a mesh gateway (or api/terminating in the future). The Pod controller then passes this along as metadata on the Workload that it creates in Consul.

The end result is that the sidecar and gateway proxy controllers can determine which Workloads they should generate ProxyStateTemplates for.
@nathancoleman nathancoleman force-pushed the workload-meta-gateway-kind branch from 5d6854f to d9e35cb Compare December 14, 2023 17:25
@nathancoleman nathancoleman enabled auto-merge (squash) December 14, 2023 17:38
@nathancoleman nathancoleman merged commit 6c71611 into main Dec 14, 2023
3 checks passed
@nathancoleman nathancoleman deleted the workload-meta-gateway-kind branch December 14, 2023 18:42
sarahalsmiller pushed a commit that referenced this pull request Jan 5, 2024
…Gateway Pod (#3365)

Set gateway-kind in Workload metadata when it represents a xGateway Pod

By setting the gateway-kind annotation on the Pods for a MeshGateway, we indicate to the Pod controller in consul-k8s that the Pod represents a mesh gateway (or api/terminating in the future). The Pod controller then passes this along as metadata on the Workload that it creates in Consul.

The end result is that the sidecar and gateway proxy controllers can determine which Workloads they should generate ProxyStateTemplates for.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr/no-backport signals that a PR will not contain a backport label pr/no-changelog PR does not need a corresponding .changelog entry theme/mesh-gw
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants