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

Enable configure Connect Injector and Controller Webhooks to be managed by Vault #1191

Merged
merged 80 commits into from
Jun 13, 2022

Conversation

jmurret
Copy link
Member

@jmurret jmurret commented Apr 27, 2022

Changes proposed in this PR:

  • Managing mutating webhook certs for controller and connect injector locally within those components when configured with Vault.
  • Not deploying webhook-cert-manager when webhook certs have been configured with Vault
  • To turn on this configuration, this will not just be turned on when Vault is turned on. Users will have to configure the below properties that effect both connect inject webhooks and controller webhooks (the reason being that the systemdoes not deploy webhook-cert-manager entirely which normally manages the certs with k8s secrets):
    • global.secretsBackend.vault.enabled
    • global.secretsBackend.vault.consulConnectInjectCARole
    • global.secretsBackend.vault.connectInject.tlsCert.secretName
    • global.secretsBackend.vault.connectInject.caCert.secretName
    • global.secretsBackend.vault.consulControllerCARole
    • global.secretsBackend.vault.controller.tlsCert.secretName
    • global.secretsBackend.vault.controller.caCert.secretName

How to read this PR:

  • start with charts/consul/values.yaml to get a sense of what is exposed
  • check out acceptance/tests/vault/vault_webhook_certs_test.go and the comments left there
  • view charts/consul/templates/connect-inject-deployment.yaml and charts/consul/templates/controller-deployment.yaml to see how configuration is passed
  • then view the below commands to see how the managing of webhook certs got implemented locally (and bypassed inwebhook-cert-manager):
    • control-plane/subcommand/controller/command.go
    • control-plane/subcommand/inject-connect/command.go
    • control-plane/subcommand/webhook-cert-manager/command.go

How I've tested this PR:

  • manual testing and acceptance tests

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

@jmurret jmurret force-pushed the jm/webhook-certs branch 3 times, most recently from 0f8b32b to a86a5d5 Compare May 9, 2022 16:45
@jmurret jmurret force-pushed the jm/webhook-certs branch from c5dffbf to ca62a2b Compare May 11, 2022 18:38
@jmurret jmurret force-pushed the jm/webhook-certs branch 2 times, most recently from a77cdce to 2990896 Compare May 19, 2022 21:28
@jmurret jmurret changed the base branch from main to jm/refactor-vault-tests May 19, 2022 21:29
@jmurret jmurret changed the base branch from jm/refactor-vault-tests to jm/vault-test-refactor May 19, 2022 21:29
@jmurret jmurret force-pushed the jm/vault-test-refactor branch from f7e6353 to 32f54f5 Compare May 19, 2022 21:30
@jmurret jmurret force-pushed the jm/webhook-certs branch from 2d622d5 to 11db258 Compare May 21, 2022 01:06
Base automatically changed from jm/vault-test-refactor to main May 21, 2022 02:06
@jmurret jmurret force-pushed the jm/webhook-certs branch from 11db258 to 17220f6 Compare May 21, 2022 02:15
jmurret and others added 24 commits June 13, 2022 11:54
…ronnectInjectCARole to consulConnectInjectRole
… the same as they are under web-cert-manager. updated path of where webhook certs get saved.
Co-authored-by: Iryna Shustava <ishustava@users.noreply.github.com>
Co-authored-by: Iryna Shustava <ishustava@users.noreply.github.com>
…lane/subcommand/controller/command.go

Co-authored-by: Iryna Shustava <ishustava@users.noreply.github.com>
@jmurret jmurret force-pushed the jm/webhook-certs branch from f3241e9 to 21c2ee7 Compare June 13, 2022 18:23
@jmurret jmurret merged commit a16c4ee into main Jun 13, 2022
@jmurret jmurret deleted the jm/webhook-certs branch June 13, 2022 19:29
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