Merge "Make static manifest cleanup configurable"

This commit is contained in:
Zuul 2019-06-12 17:18:49 +00:00 committed by Gerrit Code Review
commit 0c672551c4
8 changed files with 13 additions and 0 deletions

View File

@ -65,7 +65,9 @@ snapshot_files "${SNAPSHOT_DIR}"
while true; do
if [ -e /tmp/stop ]; then
echo Stopping
{{- if .Values.anchor.enable_cleanup }}
cleanup
{{- end }}
break
fi

View File

@ -77,6 +77,7 @@ labels:
anchor:
dns_policy: Default
enable_cleanup: true
kubelet:
manifest_path: /etc/kubernetes/manifests
period: 15

View File

@ -37,7 +37,9 @@ while true; do
if [ -e /tmp/stop ]; then
echo Stopping
{{- if .Values.anchor.enable_cleanup }}
cleanup
{{- end }}
break
fi

View File

@ -27,6 +27,7 @@ labels:
anchor:
dns_policy: Default
enable_cleanup: true
kubelet:
manifest_path: /etc/kubernetes/manifests
period: 15

View File

@ -26,6 +26,7 @@ function cleanup_host {
# Let the anchor process know it should not try to start the server.
touch /tmp/stopping
{{- if .Values.anchor.enable_cleanup }}
while true; do
if etcdctl member list > /tmp/stop_members; then
if grep $PEER_ENDPOINT /tmp/stop_members; then
@ -43,3 +44,5 @@ while true; do
sleep {{ .Values.anchor.period }}
done
{{- end }}
touch /tmp/stopped

View File

@ -25,6 +25,7 @@ labels:
anchor:
dns_policy: ClusterFirstWithHostNet
enable_cleanup: true
etcdctl_endpoint: example-etcd
host_data_path: /var/lib/etcd/example

View File

@ -36,7 +36,9 @@ cleanup() {
while true; do
if [ -e /tmp/stop ]; then
echo Stopping
{{- if .Values.anchor.enable_cleanup }}
cleanup
{{- end }}
break
fi

View File

@ -2,6 +2,7 @@ release_group: null
anchor:
dns_policy: Default
enable_cleanup: true
kubelet:
manifest_path: /etc/kubernetes/manifests
period: 15