Skip to content

Backport of Fix Sync Catalog ACL Token Environment Var Name into release/1.1.x#2077

Merged
hc-github-team-consul-core merged 2 commits intorelease/1.1.xfrom
backport/fix-catalog-sync-token-vars/vertically-profound-mongrel
Apr 21, 2023
Merged

Backport of Fix Sync Catalog ACL Token Environment Var Name into release/1.1.x#2077
hc-github-team-consul-core merged 2 commits intorelease/1.1.xfrom
backport/fix-catalog-sync-token-vars/vertically-profound-mongrel

Conversation

@hc-github-team-consul-core
Copy link
Copy Markdown
Collaborator

Backport

This PR is auto-generated from #2068 to be assessed for backporting due to the inclusion of the label backport/1.1.x.

The below text is copied from the body of the original PR.


Changes proposed in this PR:

  • Change the environment variable name for the ACL token secret to match what is expected by the control plane. (Fixes Helm: ACL token env var is incorrect for Sync Catalog  #1891)
    • Currently, the chart is setting the CONSUL_HTTP_TOKEN environment variable which is not used by the Consul client within the control plane.
    • The control plane is instead reading CONSUL_ACL_TOKEN:
      fs.StringVar(&f.Token, "token", os.Getenv(ACLTokenEnvVar),
      "ACL token to use for connection to Consul."+
      "This can also be specified via the CONSUL_ACL_TOKEN environment variable.")

How I've tested this PR:

  • Deployed the chart with the included changes and observed the control plane properly loaded the provided Consul token and used it to register services.

How I expect reviewers to test this PR:

  • Deploy an external Consul server that has ACLs enabled.
  • Create a policy and token with the proper permissions to run the catalog sync agent.
  • Populate the token secret into a K8S secret and provide that secret name and key to the chart.
  • Verify that the sync catalog agent loads the token and is able to register services.

Checklist:

  • Tests updated
  • CHANGELOG entry added

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


Overview of commits

@hc-github-team-consul-core hc-github-team-consul-core force-pushed the backport/fix-catalog-sync-token-vars/vertically-profound-mongrel branch 2 times, most recently from 68b2a8a to 22cbb3b Compare April 21, 2023 18:43
@hc-github-team-consul-core hc-github-team-consul-core enabled auto-merge (squash) April 21, 2023 18:43
@hc-github-team-consul-core hc-github-team-consul-core merged commit f180db4 into release/1.1.x Apr 21, 2023
@hc-github-team-consul-core hc-github-team-consul-core deleted the backport/fix-catalog-sync-token-vars/vertically-profound-mongrel branch April 21, 2023 18:43
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