astonishing-postman-47327
06/22/2023, 2:58 PMsecret
containing the CA certificate as the key cacerts.pem
• For Fleet, to check out the GitRepo over https, I needed to add the CA certificate as base64 encoded string with the key caBundle
directly into the `GitRepo`Object
• One of those Fleet GitRepo
contains a Helm installation in that Repos fleet.yaml
(because HelmController is lacking the feature I need here). To get that helm chart from the internal chart repo, I also need the CA. But this doesn't work with the already existing caBundle
, I need to add the same CA a second time to my GitRepo
, that time as a secret reference called helmSecretName
. That secret needs the key cacerts
so I can't use the same as for Rancher Manager which needs different key.
• I also have HelmChart
objects from the HelmController. To get the charts here, I have the poorly documented option to use the key repoCA
which contains the CA not encoded as a literal scalar (I think that's what it is called). After I took a look at the CRD, I also discovered the repoCAConfigMap
which I wasn't able to find in any documentation. But after reading this go function (https://github.com/k3s-io/helm-controller/blob/master/pkg/controllers/chart/chart.go#L749) I understand this need to be for real a ConfigMap. As far as I understand, I doesn't matter how the key is called, it gets mounted as /ca-files in the container.
To wrap it up: I have my very same CA certificate at least for times used in different ways: in two secrets with different keys, inline as a base64 encoded string and either inline as a literal scalar or in a ConfigMap.
I understand this are different tools. And maybe also different developers. But I also understand this is all Rancher (or Suse) and we also have already exiting concepts in Kubernetes as secretKeyRef
and others.
Now, finally my question: How should I manage the CA certificate. I'm open for ideas...