ansible-role-k8s-storage/files/linode/get-linode-id-ConfigMap.yaml
Adrien 058d9bd8e1
All checks were successful
continuous-integration/drone/push Build is passing
Update linode from upstream
2020-10-29 12:18:08 +01:00

19 lines
483 B
YAML

apiVersion: v1
data:
get-linode-id.sh: |-
#!/bin/bash -efu
id="$(kubectl get node/"${NODE_NAME}" -o jsonpath='{.spec.providerID}')"
if [[ ! -z "${id}" ]]; then
echo "${id}"
echo -n "${id:9}" > /linode-info/linode-id
exit 0
fi
echo "Provider ID not found"
# Exit here so that we wait for the CCM to initialize the provider ID
exit 1
kind: ConfigMap
metadata:
labels:
app: csi-linode
name: get-linode-id
namespace: kube-system