Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unkonwn field commands throws when use generate-yaml.sh to generate the configuration. #301

Closed
hchenxa opened this issue Apr 10, 2019 · 5 comments
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@hchenxa
Copy link
Contributor

hchenxa commented Apr 10, 2019

/kind bug

What steps did you take and what happened:
[A clear and concise description of what the bug is.]

root@hchen1:~/hchen/src/sigs.k8s.io/cluster-api-provider-openstack/cmd/clusterctl/examples/openstack# ./generate-yaml.sh  -f clouds.yaml openstack ubuntu
Error: json: unknown field "commands"

the error was from :

kustomize build /root/hchen/src/sigs.k8s.io/cluster-api-provider-openstack/cmd/clusterctl/examples/openstack/provider-component/clouds-secrets

and the file like below:

terctl/examples/openstack# cat  /root/hchen/src/sigs.k8s.io/cluster-api-provider-openstack/cmd/clusterctl/examples/openstack/provider-component/clouds-secrets/kustomization.yaml
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
generatorOptions:
  disableNameSuffixHash: true

secretGenerator:
- name: cloud-config
  commands:
    clouds.yaml: "cat configs/clouds.yaml"
  type: Opaque
- name: cloud-selector
  commands:
    OS_CLOUD: "cat configs/os_cloud.txt"
  type: Opaque

namespace: openstack-provider-system

What did you expect to happen:

the command should work fine.

Anything else you would like to add:
[Miscellaneous information that will assist in solving the issue.]

my kustomize version:

terctl/examples/openstack# kustomize version
Version: {KustomizeVersion:2.0.3 GitCommit:a6f65144121d1955266b0cd836ce954c04122dc8 BuildDate:2019-03-05T20:37:42Z GoOs:linux GoArch:amd64}

Environment:

  • Cluster-api version:
  • Minikube/KIND version:
  • Kubernetes version: (use kubectl version): 1.13
  • OS (e.g. from /etc/os-release):
@k8s-ci-robot k8s-ci-robot added the kind/bug Categorizes issue or PR as related to a bug. label Apr 10, 2019
@chrigl
Copy link

chrigl commented Apr 10, 2019

@jichenjc
Copy link
Contributor

@chrigl seems @hchenxa provided the version as 2.0.3 above...

@chrigl
Copy link

chrigl commented Apr 11, 2019

Ah thanks @jichenjc ... Haven't seen that. So @hchenxa could you please retest with kustomize 1.0.11?

@hchenxa
Copy link
Contributor Author

hchenxa commented Apr 11, 2019

the 1.0.11 worked for me.

@hchenxa hchenxa closed this as completed Apr 11, 2019
@gyliu513
Copy link
Contributor

@hchenxa Please check if yq is installed or not. Besides, you can also update generate-yaml.sh by adding set -x to get more error messages.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

No branches or pull requests

5 participants