0

Whenever I run helm install on the chart I'm making I see this,

Error: INSTALLATION FAILED: rendered manifests contain a resource that already exists. Unable to continue with install: IngressClass "nginx" in namespace "" exists and cannot be imported into the current release: invalid ownership metadata; annotation validation error: key "meta.helm.sh/release-name" must equal "acme-1681486075": current value is "acmecorp-nginx"; annotation validation error: key "meta.helm.sh/release-namespace" must equal "acme": current value is "default"

What concerns me here is this part

Error: INSTALLATION FAILED: rendered manifests contain a resource that already exists. Unable to continue with install: IngressClass "nginx" in namespace "" exists and cannot be imported into the current release

I don't want to import the cluster default. I want to create and bring my own ingress controller with my helm chart. Why is it still thinking this is a default to be imported?

dependencies:
  ...
  - name: "ingress-nginx"
    repository: https://kubernetes.github.io/ingress-nginx
    version: 4.x.x
controller:
  electionID: ingress-controller-leader
  ingressClassResource:
    name: internal-nginx  # default: nginx
    enabled: true
    default: false
    controllerValue: "k8s.io/internal-ingress-nginx"  # default: k8s.io/ingress-nginx

What is the syntax in a Chart.yaml to list ingress-nginx as a dependency for a multiple ingress install?

1 Answer 1

0

For me the problem here was spelling, believe it or not. I just had to lowercase the release name in the chart. I figured this out, by dumping my helm to a yaml using helm template and then applying that. When I did this is what I got

Error from server (Invalid): error when creating "nginx-ingress-install.yaml": ServiceAccount "release-name-FooBar" is invalid: metadata.name: Invalid value: "release-name-FooBar": a lowercase RFC 1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character (e.g. 'example.com', regex used for validation is 'a-z0-9?(.a-z0-9?)*')

I just had to change my release from FooBar to foobar

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.