Browse Source

Fix kubectl.sh parameter quoting (#6239)

If the special parameter "$@" is not quoted, the following command will not work:

./kubectl.sh patch storageclass my-storage-class -p '{"metadata": {"annotations":{"storageclass.kubernetes.io/is-default-class":"true"}}}'
pull/6273/head
Y0UZ45 4 years ago
committed by GitHub
parent
commit
06391b6dd9
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions
  1. 2
      roles/kubernetes/client/tasks/main.yml

2
roles/kubernetes/client/tasks/main.yml

@ -106,7 +106,7 @@
copy:
content: |
#!/bin/bash
${BASH_SOURCE%/*}/kubectl --kubeconfig=${BASH_SOURCE%/*}/admin.conf $@
${BASH_SOURCE%/*}/kubectl --kubeconfig=${BASH_SOURCE%/*}/admin.conf "$@"
dest: "{{ artifacts_dir }}/kubectl.sh"
mode: 0755
become: no

Loading…
Cancel
Save