Upgrade Helm Charts to support Helm 3 and deprecate Helm 2
Currently helm charts produced by this repository support Helm 2, which is deprecated and should not be used. Unfortunately, they are not very well compatible with Helm 3 and fail to install using Terraform Helm provider's helm_release which supports only Helm 3.
Chart fails to install due to internal CRD resolution:
module.cloud.helm_release.base_cloud: Creating...
╷
│ Error: unable to build kubernetes objects from release manifest: [resource mapping not found for name: "token-vendor" namespace: "" from "": no matches for kind "AppRollout" in version "apps.cloudrobotics.com/v1alpha1"
│ ensure CRDs are installed first, resource mapping not found for name: "fluentd-metrics" namespace: "kube-system" from "": no matches for kind "ServiceMonitor" in version "monitoring.coreos.com/v1"
│ ensure CRDs are installed first, resource mapping not found for name: "nginx-ingress-controller-metrics" namespace: "" from "": no matches for kind "ServiceMonitor" in version "monitoring.coreos.com/v1"
│ ensure CRDs are installed first]
│
│ with module.cloud.helm_release.base_cloud,
│ on ../../../infrastructure/gcp/terraform/deployment-resources/intrinsic-dsm/robot-infra/main.tf line 57, in resource "helm_release" "base_cloud":
│ 57: resource "helm_release" "base_cloud" {
│
╵
This probably requires the go imports of 'k8s.io/helm/pkg/...' to be changed to 'helm.sh/helm/v3/pkg/...' but the API seems to have changed significantly.
Updating everything to use helm3 is a major effort. But it would allows us to simplify the bootstrap. Currently it is dones as a shell script and here is the helm + synk invocation: https://github.com/googlecloudrobotics/core/blob/main/deploy.sh#L418
The initial step would be to separate internal CRD + Controller and Apps as that would allow us to install this using Helm 3. The Helm 3 authors essentially gave up on reasonable support of CRDs and recommend splitting charts into CRD part and part depending on those CRDs. I think that could be manageable in short term.
This is also affected by https://github.com/googlecloudrobotics/core/issues/368
Synk and the chartassignment controller is handling CRDs just fine. Also CRC supports helm3, but we essentially run helm3 template as part of the build and repackage the output as helm2.
From what I can see, using helm + synk is to overcome the limitation of Helm 2, especially when it comes to CRD. We are using 2 tools to do a job of one. However, this makes the charts a bit hard to use for example from Terraform.
Issue #368 still applies unfortunately as not even synk can overcome API removal.