k3s/examples
Kubernetes Submit Queue 57414d9b9c Merge pull request #47066 from php-coder/improve_nfs_flex_volume_script
Automatic merge from submit-queue

examples/volumes/flexvolume/nfs: check for jq and simplify quoting

**What this PR does / why we need it**:

This PR improves error reporting of the nfs flex plugin script. Before it output non-JSON error, when `jq` wasn't installed on the server:
```
$ /usr/libexec/kubernetes/kubelet-plugins/volume/exec/k8s~nfs/nfs getvolumename test
/usr/libexec/kubernetes/kubelet-plugins/volume/exec/k8s~nfs/nfs: line 87: jq: command not found
/usr/libexec/kubernetes/kubelet-plugins/volume/exec/k8s~nfs/nfs: line 88: jq: command not found
{"status": "Success", "volumeName": "/"}
```
K8s fails to unmarshal such output to show an error in the logs:
>E0606 19:32:30.196262   25700 driver-call.go:212] Failed to unmarshal output for command: getvolumename, output: "/usr/libexec/kubernetes/kubelet-plugins/volume/exec/k8s\~nfs/nfs: line 87: jq: command not found\n/usr/libexec/kubernetes/kubelet-plugins/volume/exec/k8s\~nfs/nfs: line 88: jq: command not found\n{\"status\": \"Success\", \"volumeName\": \"/\"}", error: invalid character '/' looking for beginning of value

After  this change:
```sh
$ /usr/libexec/kubernetes/kubelet-plugins/volume/exec/k8s~nfs/nfs getvolumename test
{ "status": "Failure", "message": "'jq' binary not found. Please install jq package before using this driver"}
```
and
> E0606 19:52:07.915594   25700 driver-call.go:219] getvolumename command failed, status: Failure, reason: 'jq' binary not found. Please install jq package before using this driver

Also this PR improves quoting a bit by using single quotes where it possible.

**Release note**:
```release-note
NONE
```

CC @mfojtik
2017-07-14 12:42:02 -07:00
..
cluster-dns add redirect notice in all readme files 2017-07-14 17:18:01 +02:00
cockroachdb add redirect notice in all readme files 2017-07-14 17:18:01 +02:00
elasticsearch add redirect notice in all readme files 2017-07-14 17:18:01 +02:00
explorer add redirect notice in all readme files 2017-07-14 17:18:01 +02:00
guestbook add redirect notice in all readme files 2017-07-14 17:18:01 +02:00
guestbook-go add redirect notice in all readme files 2017-07-14 17:18:01 +02:00
https-nginx add redirect notice in all readme files 2017-07-14 17:18:01 +02:00
javaee add redirect notice in all readme files 2017-07-14 17:18:01 +02:00
javaweb-tomcat-sidecar add redirect notice in all readme files 2017-07-14 17:18:01 +02:00
job add redirect notice in all readme files 2017-07-14 17:18:01 +02:00
kubectl-container add redirect notice in all readme files 2017-07-14 17:18:01 +02:00
meteor add redirect notice in all readme files 2017-07-14 17:18:01 +02:00
mysql-cinder-pd add redirect notice in all readme files 2017-07-14 17:18:01 +02:00
mysql-wordpress-pd add redirect notice in all readme files 2017-07-14 17:18:01 +02:00
newrelic add redirect notice in all readme files 2017-07-14 17:18:01 +02:00
nodesjs-mongodb add redirect notice in all readme files 2017-07-14 17:18:01 +02:00
oms add redirect notice in all readme files 2017-07-14 17:18:01 +02:00
openshift-origin add redirect notice in all readme files 2017-07-14 17:18:01 +02:00
persistent-volume-provisioning add redirect notice in all readme files 2017-07-14 17:18:01 +02:00
phabricator add redirect notice in all readme files 2017-07-14 17:18:01 +02:00
podsecuritypolicy/rbac Merge pull request #48862 from gyliu513/psp 2017-07-14 11:46:05 -07:00
runtime-constraints add redirect notice in all readme files 2017-07-14 17:18:01 +02:00
selenium add redirect notice in all readme files 2017-07-14 17:18:01 +02:00
sharing-clusters add redirect notice in all readme files 2017-07-14 17:18:01 +02:00
spark add redirect notice in all readme files 2017-07-14 17:18:01 +02:00
storage add redirect notice in all readme files 2017-07-14 17:18:01 +02:00
storm add redirect notice in all readme files 2017-07-14 17:18:01 +02:00
sysdig-cloud add redirect notice in all readme files 2017-07-14 17:18:01 +02:00
volumes Merge pull request #47066 from php-coder/improve_nfs_flex_volume_script 2017-07-14 12:42:02 -07:00
BUILD Prune k8petstore from examples and e2es per discussion on sig-testing 2017-04-28 11:49:23 -05:00
OWNERS add eparis ass approver for test and examples 2017-03-30 11:58:49 -04:00
README.md add redirect notice in all readme files 2017-07-14 17:18:01 +02:00
doc.go Use Go canonical import paths 2016-07-16 13:48:21 -04:00
examples_test.go Remove redis-proxy example 2017-04-23 16:59:23 +02:00
guidelines.md Update docs/ URLs to point to proper locations 2017-06-05 22:13:54 -07:00
pod examples/pod: Revert the previous changes. 2016-09-13 15:09:25 -07:00
scheduler-policy-config-with-extender.json Added Bind method to Scheduler Extender 2017-06-05 09:44:53 -07:00
scheduler-policy-config.json move hardPodAffinitySymmetricWeight to scheduler policy config 2017-05-26 14:04:37 +08:00
simple-nginx.md Update docs/ URLs to point to proper locations 2017-06-05 22:13:54 -07:00