On macOS High Sierra, I'm seeing errors when paths specified in the resources section of kusomization.yaml have wild cards:
resources:
- ../rbac/*.yaml
- ../manager/*.yaml
Results in:
鈹斺柛 pwd
/Users/me/source/go/src/github.com/foo/k8s-resource-abstraction
鈹斺柛 kustomize build config/default
Error: loadResMapFromBasesAndResources: rawResources failed to read Resources: Load from path ../rbac/*.yaml failed: open /Users/me/source/go/src/github.com/foo/k8s-resource-abstraction/config/rbac/*.yaml: no such file or directory
Even though the files are present:
鈹斺柛 pwd
/Users/me/source/go/src/github.com/foo/k8s-resource-abstraction
鈹斺柛 ls config/rbac/*.yaml
config/rbac/rbac_role.yaml config/rbac/rbac_role_binding.yaml
kustomize version
Version: {KustomizeVersion:1.0.7 GitCommit:633c43a672715dc4c39eaa983a8886ecd21be2e5 BuildDate:2018-08-27T16:09:39Z GoOs:unknown GoArch:unknown}
The glob support in kustomization.yaml file is dropped in v1.0.6. The reason of dropping the feature is documented here https://github.com/kubernetes-sigs/kustomize/blob/master/docs/eschewedFeatures.md#globs-in-kustomization-files
You have to explicitly list all the files as resources. Kustomize has a command to add all the files matching *.yaml to this file
kustomize edit add resource ../rbac/*.yaml
Most helpful comment
The glob support in
kustomization.yamlfile is dropped in v1.0.6. The reason of dropping the feature is documented here https://github.com/kubernetes-sigs/kustomize/blob/master/docs/eschewedFeatures.md#globs-in-kustomization-filesYou have to explicitly list all the files as resources. Kustomize has a command to add all the files matching
*.yamlto this file