Skip to content

Commit

Permalink
remove caching of metadata where it isn't used
Browse files Browse the repository at this point in the history
  • Loading branch information
cprivitere authored and davidspek committed Apr 11, 2022
1 parent a6c222c commit 40c7de0
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions templates/cluster-template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,15 +74,13 @@ spec:
rm /run/metadata.json
postKubeadmCommands:
- |
curl -o /run/metadata.json -fsSL https://metadata.platformequinix.com/metadata
if [ -f "/run/kubeadm/kubeadm.yaml" ]; then
export KUBECONFIG=/etc/kubernetes/admin.conf
export CPEM_YAML=https://github.com/equinix/cloud-provider-equinix-metal/releases/download/v3.4.0/deployment.yaml
export SECRET_DATA='cloud-sa.json=''{"apiKey": "{{ .apiKey }}","projectID": "${PROJECT_ID}", "loadbalancer": "kube-vip://", "facility": "${FACILITY}"}'''
kubectl create secret generic -n kube-system metal-cloud-config --from-literal="$${SECRET_DATA}" || (sleep 1 && kubectl create secret generic -n kube-system metal-cloud-config --from-literal="$${SECRET_DATA}") || (sleep 1 && kubectl create secret generic -n kube-system metal-cloud-config --from-literal="$${SECRET_DATA}")
kubectl apply -f $${CPEM_YAML} || (sleep 1 && kubectl apply -f $${CPEM_YAML}) || (sleep 1 && kubectl apply -f $${CPEM_YAML})
fi
rm /run/metadata.json
---
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
kind: PacketMachineTemplate
Expand Down

0 comments on commit 40c7de0

Please sign in to comment.