Fix external OpenBao code path
What does this MR do and why?
This MR tries to address the problems observed during trial-and-error work of !8616, with the external OpenBao code path being probably without much prior testing. Some more details are available in #4405.
Separate commits are available for an easier review:
- b7fbd0aa - Removes
vault-external's hard dependency onvault-init(unit only used for Sylva's own internally deployed Vault/OpenBao, it could never be true for the external OpenBao code path) - 323fcbda - Removes
vault-external's dependency onvault-config-operator(its manifests never actually usevault-config-operator's CRDs, so it wasn't functionally needed); - 049471ce - Have
vault-externalcreate its ownNamespace/vaultvia the same../namespace-defs/baseline-namespacepatternvault-initused. Also madevault-config-operatorconditionally depend on bothvault-initandvault-external, whichever is actually the active namespace-creator for that deployment mode; - ea3a9d6e - For
harbor-initmoves from a hard depencencyvault-init: trueto a'{{ tuple . "vault-init" | include "unit-enabled" }}', so that it's not applied when the external OpenBao path is used; - 9f985c59 - Makes
openbao-set-service-labelenabled only whenvault(Sylva's own internally deployed Vault/OpenBao) is enabled; - 6ee1cabc - Allow for the external Vault use with no TLS use-case, by removing
.spec.connection.tLSConfigofvault-operator-configCRs via Kustomize component rather than Kyverno ClusterPolicy, as nokyverno-policiesunit dependency was set for some of the units deploying suchvault-operator-configCRs and we don't need to involve mutating policy for this. Maybe a personal preference only, but I see this as cleaner code. - 53e3e2a5 - Inject the external OpenBao endpoint to workload-team-defs chart values - needs sylva-projects/sylva-elements/helm-charts/workload-team-defs!174 (merged) also
If you feel like I need to split this in multiple MRs, please do let me know.
Related reference(s)
- this MR is a follow-up to Add ability to leverage an external Vault (!4463 - merged)
- addresses #4405
Test coverage
There is no CI option that could exercise this change for the external OpenBao case. Such is being introduced in !8616 and good results were seen in https://gitlab.com/sylva-projects/sylva-core/-/pipelines/2710154382 for this change set
CI configuration
Below you can choose test deployment variants to run in this MR's CI.
Click to open to CI configuration
Legend:
| Icon | Meaning | Available values |
|---|---|---|
| Infra Provider | capd, capo, capm3 |
|
| Bootstrap Provider | kubeadm (alias kadm), rke2, okd, ck8s |
|
| Node OS | ubuntu, suse, na, leapmicro |
|
| Deployment Options | Deployment option list and description | |
| Pipeline Scenarios | Available scenario list and description | |
| Enabled units | Any available units name, by default apply to management and workload cluster. Can be prefixed by mgmt: or wkld: to be applied only to a specific cluster type |
|
| Disabled units | Any available units name, by default apply to management and workload cluster. Can be prefixed by mgmt: or wkld: to be applied only to a specific cluster type |
|
| Target platform | Can be used to select specific deployment environment Available platform list and description | |
| Pipeline control | autorun, manual or blocking. Can be used to override global config and start a deployment pipeline the required way |
-
🎬 preview☁️ capd🚀 kadm🐧 ubuntu -
🎬 preview☁️ capo🚀 rke2🐧 suse -
🎬 preview☁️ capm3🚀 rke2🐧 ubuntu -
☁️ capd🚀 kadm🛠️ light-deploy🐧 ubuntu -
☁️ capd🚀 rke2🛠️ light-deploy🐧 suse -
☁️ capo🚀 rke2🐧 suse -
☁️ capo🚀 rke2🐧 leapmicro -
☁️ capo🚀 kadm🐧 ubuntu -
☁️ capo🚀 kadm🐧 ubuntu🟢 neuvector,mgmt:harbor -
☁️ capo🚀 rke2🎬 rolling-update🛠️ ha🐧 ubuntu -
☁️ capo🚀 kadm🎬 wkld-k8s-upgrade🐧 ubuntu -
☁️ capo🚀 rke2🎬 rolling-update-no-wkld🛠️ ha🐧 suse -
☁️ capo🚀 rke2🎬 sylva-upgrade🛠️ ha🐧 ubuntu -
☁️ capo🚀 rke2🎬 sylva-upgrade-from-1.7.x🛠️ ha🐧 ubuntu -
☁️ capo🚀 rke2🛠️ ha,misc🐧 ubuntu -
☁️ capo🚀 rke2🛠️ misc🐧 ubuntu🟢 mgmt:harbor🔴 neuvector -
☁️ capo🚀 rke2🛠️ ha,misc,openbao🐧 suse -
☁️ capo🚀 rke2🐧 suse🎬 upgrade-from-prev-tag -
☁️ capm3🚀 rke2🐧 suse -
☁️ capm3🚀 kadm🐧 ubuntu -
☁️ capm3🚀 ck8s🐧 ubuntu -
☁️ capm3🚀 kadm🎬 rolling-update-no-wkld🛠️ ha,misc🐧 ubuntu -
☁️ capm3🚀 rke2🎬 wkld-k8s-upgrade🛠️ ha🐧 suse -
☁️ capm3🚀 kadm🎬 rolling-update🛠️ ha🐧 ubuntu -
☁️ capm3🚀 rke2🎬 upgrade-from-prev-release-branch🛠️ ha🐧 suse -
☁️ capm3🚀 rke2🛠️ misc,ha🐧 suse -
☁️ capm3🚀 rke2🎬 sylva-upgrade🛠️ ha,misc🐧 suse -
☁️ capm3🚀 kadm🎬 rolling-update🛠️ ha🐧 suse -
☁️ capm3🚀 ck8s🎬 rolling-update🛠️ ha🐧 ubuntu -
☁️ capm3🚀 rke2|okd🎬 no-update🐧 ubuntu|na -
☁️ capm3🚀 rke2🐧 suse🎬 upgrade-from-release-1.5 -
☁️ capm3🚀 rke2🐧 suse🎬 upgrade-to-main
Global config for deployment pipelines
- autorun pipelines
- allow failure on pipelines
- record sylvactl events
Notes:
- Enabling
autorunwill make deployment pipelines to be run automatically without human interaction - Disabling
allow failurewill make deployment pipelines mandatory for pipeline success. - if both
autorunandallow failureare disabled, deployment pipelines will need manual triggering but will be blocking the pipeline
Be aware: after configuration change, pipeline is not triggered automatically.
Please run it manually (by clicking the run pipeline button in Pipelines tab) or push new code.