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

chore: create azure.json via CSE #3876

Merged
merged 3 commits into from
Sep 29, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions parts/k8s/cloud-init/artifacts/cse_config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -164,10 +164,13 @@ configureK8s() {
generateAggregatedAPICerts
fi
else
{{- /* If we are a node vm then we only proceed w/ local azure.json configuration if cloud-init has pre-paved that file */}}
wait_for_file 1 1 $azure_json || return
{{- /* If we are a node that does not need azure.json (cloud-init tells us), then return immediately */}}
wait_for_file 1 1 /opt/azure/needs_azure.json || return
fi

touch $azure_json
chmod 0600 $azure_json
chown root:root $azure_json
{{/* Perform the required JSON escaping */}}
local sp_secret=${SERVICE_PRINCIPAL_CLIENT_SECRET//\\/\\\\}
sp_secret=${SERVICE_PRINCIPAL_CLIENT_SECRET//\"/\\\"}
Expand Down
4 changes: 2 additions & 2 deletions parts/k8s/cloud-init/nodecustomdata.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

write_files:
{{- if .RequiresCloudproviderConfig}}
- path: /etc/kubernetes/azure.json
permissions: "0600"
- path: /opt/azure/needs_azure.json
permissions: "0644"
owner: root
content: |
#EOF
Expand Down
11 changes: 7 additions & 4 deletions pkg/engine/templates_generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.