Skip to content

Commit

Permalink
Ensure legacy whitelist overrides work like ops overrides (#3289)
Browse files Browse the repository at this point in the history
  • Loading branch information
augustabt authored Feb 2, 2025
1 parent 7cdb7d3 commit 5742a34
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions scripts/start-setupRbac
Original file line number Diff line number Diff line change
Expand Up @@ -77,13 +77,18 @@ if [[ -v WHITELIST_FILE ]]; then
fi
if [[ -v WHITELIST ]]; then
args=()
if isTrue "${APPEND_WHITELIST:-false}" || isFalse "${OVERRIDE_WHITELIST:-true}"; then
args+=(--append-only)
fi
existing="$EXISTING_WHITELIST_FILE"
if [[ "$EXISTING_WHITELIST_FILE" = SYNC_FILE_MERGE_LIST ]]; then
existing=MERGE
fi
# legacy option
if [[ -v APPEND_WHITELIST ]] && isTrue "${APPEND_WHITELIST}"; then
existing=MERGE
fi
# legacy option
if [[ -v OVERRIDE_WHITELIST ]] && isFalse "${OVERRIDE_WHITELIST}"; then
existing=SKIP
fi
# shellcheck disable=SC2086
mc-image-helper manage-users \
"${sharedArgs[@]}" "${args[@]}" \
Expand Down

0 comments on commit 5742a34

Please sign in to comment.