@@ -159,15 +159,6 @@ function clear-kubeconfig() {
159
159
echo " Cleared config for ${CONTEXT} from ${KUBECONFIG} "
160
160
}
161
161
162
- function tear_down_alive_resources() {
163
- local kubectl=" ${KUBE_ROOT} /cluster/kubectl.sh"
164
- " ${kubectl} " delete deployments --all || true
165
- " ${kubectl} " delete rc --all || true
166
- " ${kubectl} " delete pods --all || true
167
- " ${kubectl} " delete svc --all || true
168
- " ${kubectl} " delete pvc --all || true
169
- }
170
-
171
162
# Gets username, password for the current-context in kubeconfig, if they exist.
172
163
# Assumed vars:
173
164
# KUBECONFIG # if unset, defaults to global
@@ -253,17 +244,6 @@ function gen-kube-bearertoken() {
253
244
KUBE_BEARER_TOKEN=$( dd if=/dev/urandom bs=128 count=1 2> /dev/null | base64 | tr -d " =+/" | dd bs=32 count=1 2> /dev/null)
254
245
}
255
246
256
- # Generate uid
257
- # This function only works on systems with python. It generates a time based
258
- # UID instead of a UUID because GCE has a name length limit.
259
- #
260
- # Vars set:
261
- # KUBE_UID
262
- function gen-uid {
263
- KUBE_UID=$( python -c ' import uuid; print(uuid.uuid1().fields[0])' )
264
- }
265
-
266
-
267
247
function load-or-gen-kube-basicauth() {
268
248
if [[ ! -z " ${KUBE_CONTEXT:- } " ]]; then
269
249
get-kubeconfig-basicauth
@@ -293,28 +273,6 @@ function load-or-gen-kube-bearertoken() {
293
273
fi
294
274
}
295
275
296
- # Get the master IP for the current-context in kubeconfig if one exists.
297
- #
298
- # Assumed vars:
299
- # KUBECONFIG # if unset, defaults to global
300
- # KUBE_CONTEXT # if unset, defaults to current-context
301
- #
302
- # Vars set:
303
- # KUBE_MASTER_URL
304
- #
305
- # KUBE_MASTER_URL will be empty if no current-context is set, or the
306
- # current-context user does not exist or contain a server entry.
307
- function detect-master-from-kubeconfig() {
308
- export KUBECONFIG=${KUBECONFIG:- $DEFAULT_KUBECONFIG }
309
-
310
- local cc=$( " ${KUBE_ROOT} /cluster/kubectl.sh" config view -o jsonpath=" {.current-context}" )
311
- if [[ ! -z " ${KUBE_CONTEXT:- } " ]]; then
312
- cc=" ${KUBE_CONTEXT} "
313
- fi
314
- local cluster=$( " ${KUBE_ROOT} /cluster/kubectl.sh" config view -o jsonpath=" {.contexts[?(@.name == \" ${cc} \" )].context.cluster}" )
315
- KUBE_MASTER_URL=$( " ${KUBE_ROOT} /cluster/kubectl.sh" config view -o jsonpath=" {.clusters[?(@.name == \" ${cluster} \" )].cluster.server}" )
316
- }
317
-
318
276
# Sets KUBE_VERSION variable to the proper version number (e.g. "v1.0.6",
319
277
# "v1.2.0-alpha.1.881+376438b69c7612") or a version' publication of the form
320
278
# <path>/<version> (e.g. "release/stable",' "ci/latest-1").
@@ -569,7 +527,6 @@ function build-kube-env {
569
527
fi
570
528
571
529
build-runtime-config
572
- gen-uid
573
530
574
531
rm -f ${file}
575
532
cat > $file << EOF
@@ -633,7 +590,6 @@ KUBE_DOCKER_REGISTRY: $(yaml-quote ${KUBE_DOCKER_REGISTRY:-})
633
590
KUBE_ADDON_REGISTRY: $( yaml-quote ${KUBE_ADDON_REGISTRY:- } )
634
591
MULTIZONE: $( yaml-quote ${MULTIZONE:- } )
635
592
NON_MASQUERADE_CIDR: $( yaml-quote ${NON_MASQUERADE_CIDR:- } )
636
- KUBE_UID: $( yaml-quote ${KUBE_UID:- } )
637
593
ENABLE_DEFAULT_STORAGE_CLASS: $( yaml-quote ${ENABLE_DEFAULT_STORAGE_CLASS:- } )
638
594
ENABLE_APISERVER_BASIC_AUDIT: $( yaml-quote ${ENABLE_APISERVER_BASIC_AUDIT:- } )
639
595
ENABLE_APISERVER_ADVANCED_AUDIT: $( yaml-quote ${ENABLE_APISERVER_ADVANCED_AUDIT:- } )
0 commit comments