Because of the cluster-api implementation for OpenNebula we found ourselves in a need to parse cloud-init compatible user-data structure in one-context (linux).
For now the requirement is to support basic yaml structure like the following:
#cloud-config
write_files:
- path: /run/cluster-api/placeholder
owner: root:root
permissions: '0640'
content: "This placeholder file is used to create the /run/cluster-api sub directory in a way that is compatible with both Linux and Windows (mkdir -p /run/cluster-api does not work with Windows)"
runcmd:
- 'kubeadm init --config /run/kubeadm/kubeadm.yaml && echo success > /run/cluster-api/bootstrap-success.complete'
- "set -e; if test -d /etc/kubernetes/super-admin.conf; then\n\n mv /etc/kubernetes/manifests/kube-vip.yaml /var/tmp/;\n sleep 1;\n rmdir /etc/kubernetes/super-admin.conf/ || true;\n kubeadm init phase kubeconfig super-admin || true;\n mv /var/tmp/kube-vip.yaml /etc/kubernetes/manifests/; fi"
Fully implemented write_files: and runcmd: is something we need to progress with cluster API, one-context (linux) has to decode and parse the userdata, then create files and run commands.
Because of the cluster-api implementation for OpenNebula we found ourselves in a need to parse cloud-init compatible user-data structure in one-context (linux).
For now the requirement is to support basic yaml structure like the following:
write_files:
andruncmd:
is something we need to progress with cluster API, one-context (linux) has to decode and parse the userdata, then create files and run commands.