Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

federation: reverse the order of creating controller manager and secret since controller requires secret #27592

Merged
merged 1 commit into from
Jun 17, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions federation/cluster/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -145,9 +145,6 @@ function create-federation-api-objects {
FEDERATION_API_TOKEN="$(dd if=/dev/urandom bs=128 count=1 2>/dev/null | base64 | tr -d "=+/" | dd bs=32 count=1 2>/dev/null)"
export FEDERATION_API_KNOWN_TOKENS="${FEDERATION_API_TOKEN},admin,admin"

$template "${manifests_root}/federation-apiserver-"{deployment,secrets}".yaml" | $host_kubectl create -f -
$template "${manifests_root}/federation-controller-manager-deployment.yaml" | $host_kubectl create -f -

# Create a kubeconfig with credentails for federation-apiserver. We will
# then use this kubeconfig to create a secret which the federation
# controller manager can use to talk to the federation-apiserver.
Expand All @@ -169,6 +166,9 @@ function create-federation-api-objects {
$host_kubectl create secret generic ${name} --from-file="${dir}/kubeconfig" --namespace="${FEDERATION_NAMESPACE}"
done

$template "${manifests_root}/federation-apiserver-"{deployment,secrets}".yaml" | $host_kubectl create -f -
$template "${manifests_root}/federation-controller-manager-deployment.yaml" | $host_kubectl create -f -

# Update the users kubeconfig to include federation-apiserver credentials.
CONTEXT=federation-cluster \
KUBE_BEARER_TOKEN="$FEDERATION_API_TOKEN" \
Expand Down