Open irishandyb opened 2 years ago
I have made a little progress. The root of the issue is the Helm post-install hook attached to the Certificate resource.
helm.sh/hook: post-install
helm.sh/hook-weight: "1"
This is present as cert-manager is included as a dependency/requirement for my application chart. With this, it is required that cert-manager complete its installation and its CRDs be available before Helm creates the Certificate resource.
There seems to be a circular dependency here in which Helm does not execute the post hook to create the Certificate because there is a Pod holding up the install by depending on the Secret created for the Certificate.
What is very confusing is that I do not encounter this issue during a manual helm install
of the same chart with the same values.
I am having a problem in which resources templated by a Helm _helper function are not being rendered or generated when deploying the chart via argo.
I have the following Helm helper function defined in _cert.tpl. It serves to generate a cert-manager Certificate resource based on provided inputs.
This function is invoked in the tls.yaml template file as follows:
This is then combined with the following values.yaml:
When rendered via
helm template
the following Certificate resource is generated as expected. It is also created if I deploy the Helm chart via the Helm CLI.However when I deploy the same Helm chart via argocd, the Certificate resource is not created or deployed. It's simply not there; neither as a Kubernetes resource or an item listed on the application tree view in argo. The argo logs for the application eventually show as degraded as one of the pods will not start without this particular cert.. but no error or notice of the certificate resource itself.
The Application definition is as follows:
There are no logs in cert-manager to indicate any issues with admission of a certificate resource. Note that I do also have another hard-coded Certificate (i.e., not generated by a template function) in the Chart and this is created as expected.. so the issue appears to be limited to this helper function.
I have deployed argocd via Helm as below:
Any input as to whether this may be a bug or user error would be greatly appreciated.
Andy