Skip to content

Commit

Permalink
Move storage-dir argument to k8s-dqlite (#2672)
Browse files Browse the repository at this point in the history
* Move storage-dir argument to k8s-dqlite

* Fix the config values

* Remove empty line
  • Loading branch information
ktsakalozos committed Oct 21, 2021
1 parent b8fb341 commit 645e77c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
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

0 comments on commit 645e77c

Please sign in to comment.