constellation/internal/helm
Daniel Weiße b3c734b804
helm: re-enable timeout flag (#2658)
* Honor (hidden) timeout flag for applying helm charts
* Set only internally used structs to private

---------

Signed-off-by: Daniel Weiße <dw@edgeless.systems>
2023-11-29 14:55:10 +01:00
..
charts cli: move cli/internal libraries (#2623) 2023-11-22 14:52:56 +01:00
imageversion cli: move cli/internal libraries (#2623) 2023-11-22 14:52:56 +01:00
testdata cli: move cli/internal libraries (#2623) 2023-11-22 14:52:56 +01:00
action.go helm: re-enable timeout flag (#2658) 2023-11-29 14:55:10 +01:00
actionfactory_test.go helm: re-enable timeout flag (#2658) 2023-11-29 14:55:10 +01:00
actionfactory.go helm: re-enable timeout flag (#2658) 2023-11-29 14:55:10 +01:00
BUILD.bazel cli: move cli/internal libraries (#2623) 2023-11-22 14:52:56 +01:00
chartutil.go cli: move cli/internal libraries (#2623) 2023-11-22 14:52:56 +01:00
cilium.patch cli: move cli/internal libraries (#2623) 2023-11-22 14:52:56 +01:00
generateCertManager.sh cli: move cli/internal libraries (#2623) 2023-11-22 14:52:56 +01:00
generateCilium.sh cli: move cli/internal libraries (#2623) 2023-11-22 14:52:56 +01:00
helm_test.go Fix Konnectivity migration (#2633) 2023-11-24 12:28:37 +01:00
helm.go helm: re-enable timeout flag (#2658) 2023-11-29 14:55:10 +01:00
loader_test.go helm: re-enable timeout flag (#2658) 2023-11-29 14:55:10 +01:00
loader.go helm: re-enable timeout flag (#2658) 2023-11-29 14:55:10 +01:00
overrides.go cli: move cli/internal libraries (#2623) 2023-11-22 14:52:56 +01:00
README.md cli: move cli/internal libraries (#2623) 2023-11-22 14:52:56 +01:00
release.go helm: re-enable timeout flag (#2658) 2023-11-29 14:55:10 +01:00
retryaction_test.go cli: move cli/internal libraries (#2623) 2023-11-22 14:52:56 +01:00
retryaction.go cli: move cli/internal libraries (#2623) 2023-11-22 14:52:56 +01:00
serviceversion.go cli: move cli/internal libraries (#2623) 2023-11-22 14:52:56 +01:00
update-aws-load-balancer-chart.sh cli: move cli/internal libraries (#2623) 2023-11-22 14:52:56 +01:00
update-csi-charts.sh cli: move cli/internal libraries (#2623) 2023-11-22 14:52:56 +01:00
values.go cli: move cli/internal libraries (#2623) 2023-11-22 14:52:56 +01:00
versionlister.go helm: re-enable timeout flag (#2658) 2023-11-29 14:55:10 +01:00

Helm

Constellation uses helm to install and upgrade deployments to the Kubernetes cluster. Helm wraps deployments into charts. One chart should contain all the configuration needed to run a deployment.

Charts used by Constellation

To make installation and lifecycle management easier, Constellation groups multiple related charts into sub-charts. The following "parent" charts are used by Constellation:

  • cert-manager

  • Cilium

  • constellation-services

    Cluster services (mostly) written by us, providing basic functionality of the cluster

  • csi

    Our modified Kubernetes CSI drivers and Snapshot controller/CRDs

  • operators

    Kubernetes operators we use to control and manage the lifecycle of a Constellation cluster

Chart upgrades

All services that are installed via helm-install are upgraded via helm-upgrade. Two aspects are not full covered by running helm-upgrade: CRDs and values. While helm-install can install CRDs if they are contained in a chart's crds folder, upgrade won't change any installed CRDs. Furthermore, new values introduced with a new version of a chart will not be installed into the cluster if the --reuse-values flag is set. Nevertheless, we have to rely on the values already present in the cluster because some of the values are set by the bootstrapper during installation. Because upgrades should be a CLI-only operation and we want to avoid the behaviour of --reuse-values, we fetch the cluster values and merge them with any new values.

Here is how we manage CRD upgrades for each chart.

Cilium

  • CRDs are updated by cilium-operator.

cert-manager

  • installCRDs flag is set during upgrade. This flag is managed by cert-manager. cert-manager is in charge of correctly upgrading the CRDs.
  • WARNING: upgrading cert-manager might break other installations of cert-manager in the cluster, if those other installation are not on the same version as the Constellation-manager installation. This is due to the cluster-wide CRDs.

Operators

  • Manually update CRDs before upgrading the chart. Update by applying the CRDs found in the operators/crds/ folder.

Constellation-services

  • There currently are no CRDs in this chart.

CSI

  • CRDs are required for enabling snapshot support
  • CRDs are provided as their own helm chart and may be updated using helm