Kustomize: Error processing wild card paths for resources in kustomization.yaml

Created on 8 Sep 2018  路  1Comment  路  Source: kubernetes-sigs/kustomize

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}

Most helpful comment

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

>All comments

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
Was this page helpful?
0 / 5 - 0 ratings

Related issues

pst picture pst  路  4Comments

laupow picture laupow  路  4Comments

wuestkamp picture wuestkamp  路  3Comments

monopole picture monopole  路  3Comments

davidknezic picture davidknezic  路  3Comments