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

Add opt-in server discovery for API Gateway Controller #1732

Merged
merged 3 commits into from
Nov 17, 2022

Conversation

andrewstucki
Copy link
Contributor

@andrewstucki andrewstucki commented Nov 17, 2022

Changes proposed in this PR:

For backwards compatibility with old helm charts where we only ever talk to the agent nodes which don't have gRPC APIs for Consul dataplane, we need to use our old login/logout flow and the static agent node address rather than leveraging the consul server connection manager. This PR coincides with the changes introduced in hashicorp/consul-api-gateway#454.

How I've tested this PR:

Manually verified in explicitly agent-based and agentless installation modes and added unit tests.

Checklist:

  • Tests added
  • CHANGELOG entry added

    HashiCorp engineers only, community PRs should not add a changelog entry.
    Entries should use present tense (e.g. Add support for...)

@@ -119,6 +119,10 @@ spec:
value: {{ .Values.global.adminPartitions.name }}
{{- end }}
{{- end }}
{{- if not .Values.client.enabled }}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

If clients are enabled we still leverage $(HOST_IP) -- so in any other case (i.e. cluster-based or external servers) we know we should use the server gRPC discovery components. This is also passed explicitly as an env variable to support older versions of api-gateway rather than having the entrypoints fail with an unknown flag.

Copy link
Contributor

@mikemorris mikemorris left a comment

Choose a reason for hiding this comment

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

To be clear this isn't really "opt-in" from the end-user UX (only the consul-api-gateway binary), as it just passes an env var to the binary based on other existing settings in the chart (which will default to clients disabled in the upcoming v1.0 release), and therefore enable the gRPC server discovery functionality on supporting versions of Consul API Gateway (v0.5 and newer).

Should add a changelog entry though.

@andrewstucki andrewstucki merged commit 0d0333d into main Nov 17, 2022
@andrewstucki andrewstucki deleted the as/dynamic-discovery-opt-in branch November 17, 2022 03:32
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.

3 participants