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 support for Enterprise License to be configured in Vault #1032

Merged
merged 21 commits into from
Feb 18, 2022

Conversation

jmurret
Copy link
Member

@jmurret jmurret commented Feb 14, 2022

Changes proposed in this PR:
For server-statefulset, client-agent-snapshot-deployment, and client-daemonset:

  • when vault is enabled as secrets backend, allow default behavior of retrieving kubernetes secret for enterprise license
  • when vault is enabled as secrets backend
    • use vault injectors to get retrieve the license from vault and write it to disk
    • use the license from disk to write the location of the vault injected license to the environment variable for the license. (server-statefulset and client-daemonset use CONSUL_LICENSE_PATH and client-agent-snapshot-deployment uses ENTERPRISE_LICENSE).
    • do not create a volume or a volumeMount for the license since it is not coming from kubernetes.

How I've tested this PR:

  • unit tests
  • acceptance tests

How I expect reviewers to test this PR:

  • review code and test changes

Checklist:

  • Tests added
  • CHANGELOG entry added
  • Acceptance tests added
  • Docs PR to describe how to enable this behavior

@jmurret
Copy link
Member Author

jmurret commented Feb 14, 2022

I'm most curious to talk through the VolumeMounts, how I should assume they will work, and whether those need to be modified.

@jmurret
Copy link
Member Author

jmurret commented Feb 14, 2022

I've also found these failure validations for gossipEncryption key that I also implemented for enterpriseLicense in this PR.

This has caused these two tests to fail. So, I amwondering:

  • should I modify the old tests? modify the added logic? just forgo this logic in the PR?
  • should these failure validations also be in client-daemonset and client-snapshot-agent-deployment? (likewise client-daemonset does not have the validations for gossip key).

@jmurret jmurret force-pushed the jm/vault-ent-license branch from 29628f3 to a48d018 Compare February 17, 2022 00:50
@jmurret jmurret marked this pull request as ready for review February 17, 2022 02:43
@jmurret jmurret requested review from a team, kschoche and ishustava and removed request for a team February 17, 2022 15:27
@jmurret jmurret force-pushed the jm/vault-ent-license branch from 57eeab2 to 3516257 Compare February 17, 2022 16:59
Copy link
Contributor

@ishustava ishustava left a comment

Choose a reason for hiding this comment

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

Looking pretty good, John! I left some comments in-line.

@jmurret jmurret force-pushed the jm/vault-ent-license branch 2 times, most recently from 82f9f48 to 6977124 Compare February 17, 2022 21:14
@jmurret jmurret force-pushed the jm/vault-ent-license branch from 0d765e2 to 6d483ee Compare February 18, 2022 00:47
…hat we can conditionally add consul-enterprise licence policy to the Vault Auth Roles.
@jmurret jmurret force-pushed the jm/vault-ent-license branch from 6d483ee to cb6c3f8 Compare February 18, 2022 00:50
Copy link
Contributor

@ishustava ishustava left a comment

Choose a reason for hiding this comment

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

A couple more comments about tests, but otherwise looks good!

@jmurret jmurret requested a review from ishustava February 18, 2022 18:59
…terpriseLicense.secretKey or secretName is supplied.
@jmurret jmurret force-pushed the jm/vault-ent-license branch from d8562cb to 172401f Compare February 18, 2022 19:03
Copy link
Contributor

@ishustava ishustava left a comment

Choose a reason for hiding this comment

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

:shipit:

@jmurret jmurret merged commit ae206c9 into main Feb 18, 2022
@jmurret jmurret deleted the jm/vault-ent-license branch February 18, 2022 19:58
@jmurret jmurret added the vault label Mar 24, 2022
geobeau pushed a commit to geobeau/consul-k8s that referenced this pull request May 20, 2022
hashicorp#1032)

* update the wording for the consul sidecar to reflect current behaviour

Co-authored-by: Nitya Dhanushkodi <nitya@hashicorp.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants