Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move storage-dir argument to k8s-dqlite #2672

Merged
merged 3 commits into from
Oct 21, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion microk8s-resources/wrappers/run-kubelite-with-args
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ done

if [ -e ${SNAP_DATA}/args/ha-conf ]
then
storage_param="$(get_opt_in_config '--storage-dir' 'kube-apiserver')"
storage_param="$(get_opt_in_config '--storage-dir' 'k8s-dqlite')"
storage_dir="$(eval echo $storage_param)"
if $(grep -qE "^failure-domain" "${SNAP_DATA}/args/ha-conf"); then
val="$(get_opt_in_config 'failure-domain' 'ha-conf')"
Expand Down
6 changes: 6 additions & 0 deletions snap/hooks/configure
Original file line number Diff line number Diff line change
Expand Up @@ -545,6 +545,12 @@ then

refresh_opt_in_config etcd-servers unix://\${SNAP_DATA}/var/kubernetes/backend/kine.sock:12379 kube-apiserver
skip_opt_in_config storage-backend kube-apiserver

storage_dir="$(get_opt_in_config '--storage-dir' 'kube-apiserver')"
if ! [ -z $storage_dir ]
then
refresh_opt_in_config storage-dir "$storage_dir" k8s-dqlite
fi
skip_opt_in_config storage-dir kube-apiserver

snapctl restart ${SNAP_NAME}.daemon-k8s-dqlite
Expand Down