feat: allow disabling chown for persistent storage in scheduler-docker-local

Some systems - such as a mounted read-only CIFS filesystem - do not fully support chown, and chowning should be considered optional for cases when the host os has already taken care of permissioning. This commit allows users to disable chown by setting a property on the scheduler-docker-local plugin.
This commit is contained in:
Jose Diaz-Gonzalez
2018-08-01 02:00:32 -04:00
parent 53c5d548f1
commit 7349c30cd9
10 changed files with 196 additions and 7 deletions

View File

@@ -1,5 +1,6 @@
#!/usr/bin/env bash
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
source "$PLUGIN_CORE_AVAILABLE_PATH/common/property-functions"
scheduler-docker-local-install() {
declare desc="scheduler-docker-local install plugin trigger"
@@ -7,6 +8,8 @@ scheduler-docker-local-install() {
mkdir -p "${DOKKU_LIB_ROOT}/data/scheduler-docker-local"
chown -R "${DOKKU_SYSTEM_USER}:${DOKKU_SYSTEM_GROUP}" "${DOKKU_LIB_ROOT}/data/scheduler-docker-local"
fn-plugin-property-setup "scheduler-docker-local"
}
scheduler-docker-local-install "$@"