mirror of https://github.com/kubernetes/kops.git
change -o template to -o go-template=...
This commit is contained in:
parent
a2f3dd10d8
commit
d0f0177ae4
|
|
@ -198,7 +198,7 @@ function run-until-success() {
|
||||||
# returns a list of <namespace>/<name> pairs (nsnames)
|
# returns a list of <namespace>/<name> pairs (nsnames)
|
||||||
function get-addon-nsnames-from-server() {
|
function get-addon-nsnames-from-server() {
|
||||||
local -r obj_type=$1
|
local -r obj_type=$1
|
||||||
"${KUBECTL}" get "${obj_type}" --all-namespaces -o template -t "{{range.items}}{{.metadata.namespace}}/{{.metadata.name}} {{end}}" --api-version=v1 -l kubernetes.io/cluster-service=true
|
"${KUBECTL}" get "${obj_type}" --all-namespaces -o go-template="{{range.items}}{{.metadata.namespace}}/{{.metadata.name}} {{end}}" --api-version=v1 -l kubernetes.io/cluster-service=true
|
||||||
}
|
}
|
||||||
|
|
||||||
# returns the characters after the last separator (including)
|
# returns the characters after the last separator (including)
|
||||||
|
|
|
||||||
|
|
@ -174,7 +174,7 @@ start_addon /etc/kubernetes/addons/namespace.yaml 100 10 "" &
|
||||||
token_found=""
|
token_found=""
|
||||||
while [ -z "${token_found}" ]; do
|
while [ -z "${token_found}" ]; do
|
||||||
sleep .5
|
sleep .5
|
||||||
token_found=$(${KUBECTL} get --namespace="${SYSTEM_NAMESPACE}" serviceaccount default -o template -t "{{with index .secrets 0}}{{.name}}{{end}}" || true)
|
token_found=$(${KUBECTL} get --namespace="${SYSTEM_NAMESPACE}" serviceaccount default -o go-template="{{with index .secrets 0}}{{.name}}{{end}}" || true)
|
||||||
done
|
done
|
||||||
|
|
||||||
echo "== default service account in the ${SYSTEM_NAMESPACE} namespace has token ${token_found} =="
|
echo "== default service account in the ${SYSTEM_NAMESPACE} namespace has token ${token_found} =="
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue