mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-28 05:57:25 +00:00
Quote a bash variable, fix a typo and add some additional logging.
This commit is contained in:
parent
0c81f60ba0
commit
48f79cf600
@ -160,7 +160,7 @@ function create-federation-api-objects {
|
|||||||
gen-kube-basicauth
|
gen-kube-basicauth
|
||||||
export FEDERATION_API_BASIC_AUTH="${KUBE_PASSWORD},${KUBE_USER},admin"
|
export FEDERATION_API_BASIC_AUTH="${KUBE_PASSWORD},${KUBE_USER},admin"
|
||||||
|
|
||||||
# Create a kubeconfig with credentails for federation-apiserver. We will
|
# Create a kubeconfig with credentials for federation-apiserver. We will
|
||||||
# then use this kubeconfig to create a secret which the federation
|
# then use this kubeconfig to create a secret which the federation
|
||||||
# controller manager can use to talk to the federation-apiserver.
|
# controller manager can use to talk to the federation-apiserver.
|
||||||
# Note that the file name should be "kubeconfig" so that the secret key gets the same name.
|
# Note that the file name should be "kubeconfig" so that the secret key gets the same name.
|
||||||
@ -203,12 +203,14 @@ function create-federation-api-objects {
|
|||||||
export FEDERATION_ADMISSION_CONTROL="${FEDERATION_ADMISSION_CONTROL:-NamespaceLifecycle}"
|
export FEDERATION_ADMISSION_CONTROL="${FEDERATION_ADMISSION_CONTROL:-NamespaceLifecycle}"
|
||||||
|
|
||||||
for file in federation-etcd-pvc.yaml federation-apiserver-{deployment,secrets}.yaml federation-controller-manager-deployment.yaml; do
|
for file in federation-etcd-pvc.yaml federation-apiserver-{deployment,secrets}.yaml federation-controller-manager-deployment.yaml; do
|
||||||
|
echo "Creating manifest: ${file}"
|
||||||
|
$template "${manifests_root}/${file}"
|
||||||
$template "${manifests_root}/${file}" | $host_kubectl create -f -
|
$template "${manifests_root}/${file}" | $host_kubectl create -f -
|
||||||
done
|
done
|
||||||
|
|
||||||
# Update the users kubeconfig to include federation-apiserver credentials.
|
# Update the users kubeconfig to include federation-apiserver credentials.
|
||||||
CONTEXT=${FEDERATION_KUBE_CONTEXT} \
|
CONTEXT=${FEDERATION_KUBE_CONTEXT} \
|
||||||
KUBE_BEARER_TOKEN="$FEDERATION_API_TOKEN" \
|
KUBE_BEARER_TOKEN="${FEDERATION_API_TOKEN}" \
|
||||||
KUBE_USER="${KUBE_USER}" \
|
KUBE_USER="${KUBE_USER}" \
|
||||||
KUBE_PASSWORD="${KUBE_PASSWORD}" \
|
KUBE_PASSWORD="${KUBE_PASSWORD}" \
|
||||||
SECONDARY_KUBECONFIG=true \
|
SECONDARY_KUBECONFIG=true \
|
||||||
|
@ -751,7 +751,6 @@ func (f *Framework) GetUnderlyingFederatedContexts() []E2EContext {
|
|||||||
e2eContexts := []E2EContext{}
|
e2eContexts := []E2EContext{}
|
||||||
for _, context := range kubeconfig.Contexts {
|
for _, context := range kubeconfig.Contexts {
|
||||||
if strings.HasPrefix(context.Name, "federation") && context.Name != federatedKubeContext {
|
if strings.HasPrefix(context.Name, "federation") && context.Name != federatedKubeContext {
|
||||||
|
|
||||||
user := kubeconfig.findUser(context.Context.User)
|
user := kubeconfig.findUser(context.Context.User)
|
||||||
if user == nil {
|
if user == nil {
|
||||||
Failf("Could not find user for context %+v", context)
|
Failf("Could not find user for context %+v", context)
|
||||||
|
Loading…
Reference in New Issue
Block a user