Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enable configure Connect Injector and Controller Webhooks to be manag…
…ed by Vault (#1191) * refactored TestVault * Fixing name of CreateConnectCARootAndIntermediatePIKPolicy to CreateConnectCARootAndIntermediatePKIPolicy * refactored all except WAN Fed has error * fixing vault wan fed test * comment formatting * PR Feedback. Moving vault helper functions to be on the structs they were taking as arguments. * PR Feedback. changing name of Save() onkv2secret to something moredescriptive. adding comment string. * Do not load webhook cert manager when vault is enabled. * do not mount volumes when using vault * configuring vault injector * Fixing linting * Pods are all running * Fixing cert-dir paths for vault and non-vault use * fixing volume mount * fixing volume mount again * adding bats tests for tls cert directory * fixing cert for tls-cert dir * Adding logic to tests for controller tls cert. also adding snapshot agent and vault namespaces tests * it works...with hardocded stuff...need to refactor from here * refactoring out the updating of the webhook config * adding missing file * adding tests for webhook-cert-manager * refining webhook cert manager to remove setting of global.enablePodSecurityPolicies * adding connect-inject bats tests * adding test for controller and use of resource-prefix * adding tests for mwc update code * configure controller to only update mwc with ca bundle when using vault as a secrets backend. * configure connect inject to only update mwc with ca bundle when using vault as a secrets backend. * fixing lint errors for unnahdled errors * embedding tlsCertDir for controller and connectInject under vault in values.yaml * embedding tlsCertDir for controller and connectInject under vault in values.yaml - fixing tests * change vault role for controller to come from global.secretsBackend.vault.consulControllerCARole * fixing vault namespaces and snapshot agent on vault acceptance tests * fixing VAULT_TLSAUtoReload test * rebased fromvault refactor. static server replicaset has error about unknown authority. * Working using separate CAs for connect-injector and controller. only vault test is configured. * adding failure if .Values.global.secretsBackend.vault.consulConnectInjectCARole, .Values.global.secretsBackend.vault.connectInject.tlsCert, .Values.global.secretsBackend.vault.connectInject.caCert are either all not set or all set. * updating chart with caCert configs * enforcing setting both controller and connectInject CA and tls vault settings all at once. * correcting connect inject tests * Update controller tests * fixing condition on which web certmanager is shut off * only rendering vault role when suppled in controller and connect-inject deployments * fixing connect inject deploy for vault role * making global.secretsBackend.vault.consulCARole the fallback in the controller and connect-inject deployments if the web cert replacement roles are not defined. * Updating the doc string for TestVault_WebhookCerts * correct rebasing issues * removing unneccessary format changes. refactoring consul.serverTLSCATemplate to use consul.vaultCATemplate * updating test descriptions for webhook-cert-manager resources * updating connect-inject-clusterrole and controller-clusterrole tests * updated maybeFailValuesIfVaultWebhookCertSettingsAreIncomplete * Adding Changelog * Update maybeFailValuesIfVaultWebhookCertSettingsAreIncomplete to validateVaultWebhookCertConfiguration * Updating wbhook vault test to make sure that webhook-cert-manager is not deployed. * Fixing the validation that webhook-cert-manager is not running in the TestVault_WebhookCerts test * Renamed consulControllerCARole to consulControllerRole and consulContronnectInjectCARole to consulConnectInjectRole * fixing linting * Renamed configureCABundleUpdate() to updateWebhookCABundle() * Make ca.crt a constant * Adding doc strings for webhook certs secretName * updated alt_names for controller and connect inject deployments to be the same as they are under web-cert-manager. updated path of where webhook certs get saved. * Change mutatingwebhookconfigurationswhen to mutatingwebhookconfigurations when * added test cases for vault to controller test * Webhook certs vault test - checking cert rotation. currently failing. * moved vault webhook stuff into main vault test and deleted the webhook cert specific test. * getting rid of lint error * refactoring long conditional in webhook-cert-manager files into a variable for readability * addressing PR feedback * Apply suggestions from code review Co-authored-by: Iryna Shustava <ishustava@users.noreply.github.com> * Fixing broken test with retry change * Update charts/consul/templates/_helpers.tpl Co-authored-by: Iryna Shustava <ishustava@users.noreply.github.com> * Removing 127.0.0.1 from ip_sans * Removing reference to common_name: Consul Webhook Certificates Service * Removing a dangle reference to Consul Webhook Certificates Service * adding 127.0.0.1 back into server ip_sans * making common name the name of the service for connect-inject and controller * Update the description for enable-webhook-ca-update flag in control-plane/subcommand/controller/command.go Co-authored-by: Iryna Shustava <ishustava@users.noreply.github.com> * Dropping the consul prefix from consulConnectInjectRole and consulControllerRole * Updating values.yaml file descriptions for connectInject and controller under vault. * Updating cert expiry in logging in vault test from RPC expiry. Co-authored-by: Iryna Shustava <ishustava@users.noreply.github.com>
- Loading branch information