mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-28 05:57:25 +00:00
coreos/azure: Parametrise registration label
This commit is contained in:
parent
9ac9670022
commit
fc1feebcf5
@ -10,12 +10,18 @@ write_files:
|
|||||||
#!/bin/sh -xe
|
#!/bin/sh -xe
|
||||||
minion_id="${1}"
|
minion_id="${1}"
|
||||||
master_url="${2}"
|
master_url="${2}"
|
||||||
|
env_label="${3}"
|
||||||
until healthcheck=$(curl --fail --silent "${master_url}/healthz")
|
until healthcheck=$(curl --fail --silent "${master_url}/healthz")
|
||||||
do sleep 2
|
do sleep 2
|
||||||
done
|
done
|
||||||
test -n "${healthcheck}"
|
test -n "${healthcheck}"
|
||||||
test "${healthcheck}" = "ok"
|
test "${healthcheck}" = "ok"
|
||||||
printf '{ "id": "%s", "kind": "Minion", "apiVersion": "v1beta1", "labels": { "environment": "production" } }' "${minion_id}" \
|
printf '{
|
||||||
|
"id": "%s",
|
||||||
|
"kind": "Minion",
|
||||||
|
"apiVersion": "v1beta1",
|
||||||
|
"labels": { "environment": "%s" }
|
||||||
|
}' "${minion_id}" "${env_label}" \
|
||||||
| /opt/bin/kubectl create -s "${master_url}" -f -
|
| /opt/bin/kubectl create -s "${master_url}" -f -
|
||||||
|
|
||||||
- path: /etc/kubernetes/manifests/fluentd.manifest
|
- path: /etc/kubernetes/manifests/fluentd.manifest
|
||||||
@ -169,6 +175,7 @@ coreos:
|
|||||||
Requires=docker.service
|
Requires=docker.service
|
||||||
Requires=install-weave.service
|
Requires=install-weave.service
|
||||||
[Service]
|
[Service]
|
||||||
|
TimeoutStartSec=0
|
||||||
EnvironmentFile=/etc/weave.%H.env
|
EnvironmentFile=/etc/weave.%H.env
|
||||||
ExecStartPre=/opt/bin/weave setup
|
ExecStartPre=/opt/bin/weave setup
|
||||||
ExecStartPre=/opt/bin/weave launch $WEAVE_PEERS
|
ExecStartPre=/opt/bin/weave launch $WEAVE_PEERS
|
||||||
@ -354,7 +361,7 @@ coreos:
|
|||||||
Wants=download-kubernetes.service
|
Wants=download-kubernetes.service
|
||||||
ConditionHost=!kube-00
|
ConditionHost=!kube-00
|
||||||
[Service]
|
[Service]
|
||||||
ExecStart=/opt/bin/register_minion.sh %H http://kube-00:8080
|
ExecStart=/opt/bin/register_minion.sh %H http://kube-00:8080 production
|
||||||
Type=oneshot
|
Type=oneshot
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=kubernetes-minion.target
|
WantedBy=kubernetes-minion.target
|
||||||
|
Loading…
Reference in New Issue
Block a user