1

I'm trying to configure kustomize so it adds a suffix to my tls secret name, I've got the following configuration:

nameSuffix:
  - kind: Ingress
    path: /spec/tls/0/secretName

This is my ingress manifest:

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: ingress
spec:
  rules:
  - host: <APP-URL>
    http:
      paths:
      - path: /
        pathType: Prefix
        backend:
          service:
            name: service
            port:
              number: 80
  tls:
  - hosts:
    - <APP-URL>
    secretName: letsencrypt-this-is-where-i-want-my-suffix

When trying to build my kustomize file I receive the following error:

Error: considering field '/spec/tls/0/secretName' of object Ingress.v1.networking.k8s.io/joeingressjoe.[noNs]: cannot set or create an empty field name

I'm a bit confused by this, my path (/spec/tls/0/secretName) does work when I'd try to apply a patch. Does anybody know if I am overseeing something here?

hY8vVpf3tyR57Xib
  • 3,574
  • 8
  • 41
  • 86
  • what's your kustomize version? – ciis0 Jun 30 '22 at 07:46
  • 1
    I can reproduce with 4.5, you should create an issue https://github.com/kubernetes-sigs/kustomize/issues/new?assignees=&labels=kind%2Fbug&template=bug_report.md&title= – ciis0 Jun 30 '22 at 07:48

0 Answers0