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

Validate Consul secrets while respecting federation #1126

Merged
merged 15 commits into from Mar 30, 2022
Merged

Conversation

t-eckert
Copy link
Contributor

@t-eckert t-eckert commented Mar 28, 2022

Changes proposed in this PR:

  • When installing Consul as a secondary datacenter, the validation which checks for existing Consul secrets will expect a federation secret.
  • A release.Release struct was added to encapsulate a Consul release and its configuration. Its use and feature set will be expanded later.
  • A helm.Values struct was added, generated from the current Helm values YAML file. This should be generated by the Helm chart and taken as a dependency in the future to avoid getting out of sync.

How I've tested this PR:

  • Modified the existing test which checks for Consul secrets to test the behavior which expects an existing federation secret.
  • Added tests around the ListConsulSecrets function in the new validation package (which I plan on expanding over time to dedupe validation code.

How I expect reviewers to test this PR:

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...)

@t-eckert t-eckert marked this pull request as ready for review March 29, 2022 16:24
@t-eckert t-eckert requested review from a team, curtbushko and jmurret and removed request for a team March 29, 2022 16:25
Copy link
Contributor

@jmurret jmurret left a comment

Choose a reason for hiding this comment

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

Great work. This looks great. Just a few questions but nothing blocking.

cli/cmd/install/install.go Outdated Show resolved Hide resolved
cli/helm/values.go Show resolved Hide resolved
cli/validation/kubernetes.go Outdated Show resolved Hide resolved
Copy link
Contributor

@curtbushko curtbushko left a comment

Choose a reason for hiding this comment

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

Looks good!

cli/cmd/install/install.go Show resolved Hide resolved
cli/cmd/install/install_test.go Show resolved Hide resolved
@t-eckert t-eckert merged commit 7ae8173 into main Mar 30, 2022
@t-eckert t-eckert deleted the cli/validate-secrets branch March 30, 2022 14:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants