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

Remove backfile-kubeletauth-certs from gce upgrade #55324

Merged
merged 1 commit into from
Nov 9, 2017
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
47 changes: 0 additions & 47 deletions cluster/gce/upgrade.sh
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,6 @@ function upgrade-master() {
parse-master-env
upgrade-master-env

backfile-kubeletauth-certs

# Delete the master instance. Note that the master-pd is created
# with auto-delete=no, so it should not be deleted.
gcloud compute instances delete \
Expand All @@ -122,51 +120,6 @@ function upgrade-master-env() {
fi
}

# TODO(mikedanese): delete when we don't support < 1.6
function backfile-kubeletauth-certs() {
if [[ ! -z "${KUBEAPISERVER_CERT_BASE64:-}" && ! -z "${KUBEAPISERVER_CERT_BASE64:-}" ]]; then
return 0
fi

mkdir -p "${KUBE_TEMP}/pki"
echo "${CA_KEY_BASE64}" | base64 -d > "${KUBE_TEMP}/pki/ca.key"
echo "${CA_CERT_BASE64}" | base64 -d > "${KUBE_TEMP}/pki/ca.crt"
(cd "${KUBE_TEMP}/pki"
kube::util::ensure-cfssl "${KUBE_TEMP}/cfssl"
cat <<EOF > ca-config.json
{
"signing": {
"client": {
"expiry": "43800h",
"usages": [
"signing",
"key encipherment",
"client auth"
]
}
}
}
EOF
# the name kube-apiserver is bound to the node proxy
# subpaths required for the apiserver to hit proxy
# endpoints on the kubelet's handler.
cat <<EOF \
| "${CFSSL_BIN}" gencert \
-ca=ca.crt \
-ca-key=ca.key \
-config=ca-config.json \
-profile=client \
- \
| "${CFSSLJSON_BIN}" -bare kube-apiserver
{
"CN": "kube-apiserver"
}
EOF
)
KUBEAPISERVER_CERT_BASE64=$(cat "${KUBE_TEMP}/pki/kube-apiserver.pem" | base64 | tr -d '\r\n')
KUBEAPISERVER_KEY_BASE64=$(cat "${KUBE_TEMP}/pki/kube-apiserver-key.pem" | base64 | tr -d '\r\n')
}

function wait-for-master() {
echo "== Waiting for new master to respond to API requests =="

Expand Down