kustomize: secretGenerator does not add labels

I have:

commonLabels:
  app: MYLABEL

I also have:

secretGenerator:
  - name: regcred
    env: imagePullSecret.txt
    type: Opaque

the resulting secret does not have a label applied.

this in turn breaks the ability to run kubectl apply -f - --print -l app=MYLABEL

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 18 (9 by maintainers)

Most upvoted comments

secretGenerator:
  - name: regcred
    env: imagePullSecret.txt
    type: Opaque
    options:
      labels:
        app: MYLABEL```