Skip to content
This repository has been archived by the owner on Oct 24, 2023. It is now read-only.

Commit

Permalink
Fixed AzureStack regression
Browse files Browse the repository at this point in the history
  • Loading branch information
ericsuhong committed Apr 15, 2020
1 parent 992835c commit e30d4c9
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions parts/k8s/cloud-init/artifacts/cse_customcloud.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
{{- if not IsAzureStackCloud}}
ensureCustomCloudRootCertificates() {
CUSTOM_CLOUD_ROOT_CERTIFICATES="{{GetCustomCloudRootCertificates}}"
KUBE_CONTROLLER_MANAGER_FILE=/etc/kubernetes/manifests/kube-controller-manager.yaml

if [ ! -z $CUSTOM_CLOUD_ROOT_CERTIFICATES ]; then
# Replace placeholder for ssl binding
Expand Down Expand Up @@ -41,8 +42,6 @@ ensureCustomCloudSourcesList() {
{{end}}

configureK8sCustomCloud() {
KUBE_CONTROLLER_MANAGER_FILE=/etc/kubernetes/manifests/kube-controller-manager.yaml

{{- if IsAzureStackCloud}}
export -f ensureAzureStackCertificates
retrycmd 60 10 30 bash -c ensureAzureStackCertificates
Expand Down Expand Up @@ -103,7 +102,7 @@ ensureAzureStackCertificates() {
AZURESTACK_RESOURCE_METADATA_ENDPOINT="$AZURESTACK_RESOURCE_MANAGER_ENDPOINT/metadata/endpoints?api-version=2015-01-01"
curl $AZURESTACK_RESOURCE_METADATA_ENDPOINT
CURL_RETURNCODE=$?

KUBE_CONTROLLER_MANAGER_FILE=/etc/kubernetes/manifests/kube-controller-manager.yaml
if [ $CURL_RETURNCODE != 0 ]; then
# Replace placeholder for ssl binding
if [ -f $KUBE_CONTROLLER_MANAGER_FILE ]; then
Expand Down

0 comments on commit e30d4c9

Please sign in to comment.