Skip to content

Commit

Permalink
Run cloud-init init --local once on Azure to get provider configura…
Browse files Browse the repository at this point in the history
…tion set up properly (#388)

Signed-off-by: Marvin Beckers <marvin@kubermatic.com>
  • Loading branch information
embik committed May 6, 2024
1 parent 0af4cf8 commit e72bede
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions deploy/osps/default/osp-ubuntu.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,11 @@ spec:
curl -s -k -v --header 'Authorization: Bearer {{ .Token }}' {{ .ServerURL }}/api/v1/namespaces/cloud-init-settings/secrets/{{ .SecretName }} | jq '.data["cloud-config"]' -r| base64 -d > /etc/cloud/cloud.cfg.d/{{ .SecretName }}.cfg
cloud-init clean
{{- /* Azure's cloud-init provider integration has changed recently (end of April 2024) and now requires us to run this command below once to set some files up that seem required for another cloud-init run. */}}
{{- if (eq .CloudProviderName "azure") }}
cloud-init init --local
{{- end }}
{{- /* The default cloud-init configurations files have a bug on Digital Ocean that causes the machine to be in-accessible on the 2nd cloud-init and in case of Hetzner, ipv6 addresses are missing. Hence we disable network configuration. */}}
{{- if (or (eq .CloudProviderName "digitalocean") (eq .CloudProviderName "hetzner")) }}
rm /etc/netplan/50-cloud-init.yaml
Expand Down

0 comments on commit e72bede

Please sign in to comment.