It seems caused by the secretGenerator.
~/go/src/sigs.k8s.io/kustomize/ master
โฏ kustomize build docs
Error: json: unknown field "envs"
โฏ kustomize version
Version: {KustomizeVersion:v2.0.3 GitCommit:a6f65144121d1955266b0cd836ce954c04122dc8 BuildDate:2019-03-18T22:15:21+00:00 GoOs:darwin GoArch:amd64}
The error will disappear if we modify envs to env, e.g.
secretGenerator:
- name: env_file_secret
# paths to files with k=v pairs, one pair per line.
env: env.txt
type: Opaque
Is there a change in the spec recently?
@yujunz Yes, the env is changed to envs recently in #1041.
Note if you are using kubectl 1.15.3, it's still env and not a list as shown above.
Does this change have Backward compatibility? I think this should be considered.
It looks like the Kustomize docs still refer to the old env property: https://kubectl.docs.kubernetes.io/pages/reference/kustomize.html#secretgenerator
Just got caught by Error: json: unknown field "env" and was lucky to find this issue. Using envs: worked.
env -> envs also applies to configMapGenerators (kubectl v1.18, kustomize v3.8.1)
Relates to #2205 and #2506
Most helpful comment
Does this change have Backward compatibility? I think this should be considered.