Skip to content
This repository was archived by the owner on Jul 7, 2020. It is now read-only.

@kubectl@ --show-all option is defaulted to true and deprecated since 1.11 and removed since 1.14 #576

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 18 additions & 1 deletion deploy/gk-deploy
Original file line number Diff line number Diff line change
Expand Up @@ -916,7 +916,24 @@ while [[ "x${heketi_service}" == "x" ]] || [[ "${heketi_service}" == "<none>" ]]
heketi_service=$(${CLI} describe svc/heketi | grep "Endpoints:" | awk '{print $2}')
done

heketi_pod=$(${CLI} get pod --no-headers --show-all --selector="heketi" | awk '{print $1}')
SHOW_ALL_OPT=$(${CLI} version -o json | python -c """
# coding: utf8
import json
import sys
try:
version = json.load(sys.stdin)
except ValueError as e:
print(\"Invalid json format in : %s Error: %s\" % (file, e))
sys.exit(1)
show_all_opt = \"\"
if version['clientVersion']['major'] < \"2\":
if version['clientVersion']['minor'] < \"14\":
show_all_opt += \"--show-all\"
print(show_all_opt)
"""
)

heketi_pod=$(${CLI} get pod --no-headers "${SHOW_ALL_OPT}" --selector="heketi" | awk '{print $1}')

if [[ "${CLI}" == *oc\ * ]]; then
heketi_service=$(${CLI} describe routes/heketi | grep "Requested Host:" | awk '{print $3}')
Expand Down