1
0
mirror of https://github.com/rancher/os.git synced 2025-08-05 00:39:37 +00:00
os/framework/files/usr/sbin/ros-populate-node-labels
Darren Shepherd 5675644d9f Add operator
2021-10-20 10:58:54 -07:00

16 lines
373 B
Bash
Executable File

#!/bin/bash
set -e
. /usr/lib/rancheros-release
IMAGE=$(echo "$IMAGE" | sed 's![/:]!-!g')
for i in rke2 k3s; do
mkdir -p /etc/rancher/$i/config.yaml.d
cat > /etc/rancher/$i/config.yaml.d/99-rancheros-labels.yaml << EOF
node-label+:
- rancheros.cattle.io/image=${IMAGE}
- rancheros.cattle.io/tag=${IMAGE_TAG}
- plan.upgrade.cattle.io/os-upgrader=${IMAGE}
EOF
done