From f10365b0bb7a539f65130fe9cbdddd50a6a574f0 Mon Sep 17 00:00:00 2001 From: Phil Sphicas Date: Tue, 7 Sep 2021 19:54:39 +0000 Subject: [PATCH] perm: Fix values hash The hash used by divingbell-perms to decide whether or not to rerun the permissions script was being generated incorrectly, using a fixed value instead of actually looking at the values passed to the chart. This change updates the hash to reflect conf.divingbell.perms, and will rerun the script if the hash changes. Change-Id: I74f056f69a1b7f0eb9223915b1671e1e18091483 --- divingbell/templates/bin/_perm.sh.tpl | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/divingbell/templates/bin/_perm.sh.tpl b/divingbell/templates/bin/_perm.sh.tpl index d07baf4..2372db8 100644 --- a/divingbell/templates/bin/_perm.sh.tpl +++ b/divingbell/templates/bin/_perm.sh.tpl @@ -146,8 +146,7 @@ revert_perm(){ cd "${backup_path}" -{{- $_ := set $.Values "__values_hash" list }} -{{- $hash := $.Values.__values_hash | toString | sha256sum }} +{{- $hash := $.Values.conf.perm | toString | sha256sum }} hash={{ $hash | squote }} if [ ! -d "${hash}" ]; then