Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Helm Chart v1.10.3: template for k8ssandraclusters CustomResourceDefinition has uninterpolated strings / missing Helm templating #1135

Open
frimik opened this issue Dec 12, 2023 · 6 comments
Labels
bug Something isn't working

Comments

@frimik
Copy link

frimik commented Dec 12, 2023

What happened?

After helm install of k8ssandra-operator v1.10.3, the k8ssandraclusters CRD contains the following annotation:
cert-manager.io/inject-ca-from: $(CERTIFICATE_NAMESPACE_K8S)/$(CERTIFICATE_NAME_K8S)

apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  annotations:
    cert-manager.io/inject-ca-from: $(CERTIFICATE_NAMESPACE_K8S)/$(CERTIFICATE_NAME_K8S)
    controller-gen.kubebuilder.io/version: v0.12.0

How to reproduce it (as minimally and precisely as possible):

helm install --version 1.10.3 k8ssandra-operator k8ssandra/k8ssandra-operator -n k8ssandra-operator --set global.clusterScoped=true --create-namespace

kubectl get crd k8ssandraclusters.k8ssandra.io -o jsonpath='{.metadata.annotations}'
# {"cert-manager.io/inject-ca-from":"$(CERTIFICATE_NAMESPACE_K8S)/$(CERTIFICATE_NAME_K8S)","controller-gen.kubebuilder.io/version":"v0.12.0"}%                                                                                                                                                                                                                                           

┆Issue is synchronized with this Jira Story by Unito
┆Issue Number: K8OP-60

@frimik frimik added the bug Something isn't working label Dec 12, 2023
@gadiener
Copy link

Hello I have the same issue, did you find a workaround?

@burmanm
Copy link
Contributor

burmanm commented Oct 16, 2024

Annotations can be added and removed. Although it shouldn't have any effect.

@gadiener
Copy link

It does have an effect in this case, with this annotation the cert manager cainjector will print the following log in loop

E1016 08:59:10.670334       1 sources.go:106] "unable to fetch associated certificate" err="Certificate.cert-manager.io \"$(CERTIFICATE_NAME_K8S)\" not
found" logger="cert-manager" kind="customresourcedefinition" kind="customresourcedefinition" name="k8ssandraclusters.k8ssandra.io" certificate="$(CERTIF
ICATE_NAMESPACE_K8S)/$(CERTIFICATE_NAME_K8S)"

@gadiener
Copy link

If the annotation is not needed I can create a quick pr to remove it

@burmanm
Copy link
Contributor

burmanm commented Oct 17, 2024

The annotation is only used in the Kustomize installation (as that's a kustomize replacement directive), but since the CRD is copied from there it's in the Helm chart also. To remove would require a modification to the prepare-helm-release.sh to remove it after it was generated. A sed command would probably be enough..

@gadiener
Copy link

Thanks @burmanm I'll create a PR as soon as I have time

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
No open projects
Status: No status
Development

No branches or pull requests

3 participants