mirror of
https://github.com/dredx/prole.git
synced 2026-09-23 11:03:59 +00:00
fix(init_knoe_users): replace multiline die with err+exit to fix pipe syntax error
The 'die' call with a multiline string containing '|' (for base64 pipeline in the help text) was parsed by bash as a pipe operator. Replace with individual err() calls followed by explicit exit 1. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
991c04d936
commit
385f74b4f7
@ -291,19 +291,18 @@ initialize() {
|
||||
log "Using PROLE_LOCAL_ADMIN_PASSWORD as PROLE_KDC_MASTER_PASSWORD"
|
||||
fi
|
||||
if [[ -z "$PROLE_KDC_MASTER_PASSWORD" ]]; then
|
||||
die "PROLE_KDC_MASTER_PASSWORD not found.
|
||||
The KDC master password must match the running KDC database and cannot be auto-generated.
|
||||
Resolve one of:
|
||||
1. Store in k8s secret:
|
||||
kubectl -n ${KNOE_KDC_NAMESPACE} patch secret knoe-kdc-secrets \\
|
||||
--type=merge -p '{\"data\":{\"master_password\":\"'\\$(echo -n <pw> | base64)'\"}}'
|
||||
2. Store in 1Password and set in conf/k3s.cfg:
|
||||
OP_KDC_MASTER_PASSWORD_REF = op://personal/<item>/password
|
||||
then: op run -- bash etc/init_knoe_users.sh --mode k3s initialize
|
||||
3. Export directly (not recommended for production):
|
||||
export PROLE_KDC_MASTER_PASSWORD=<password>
|
||||
4. Check existing secrets:
|
||||
kubectl -n ${KNOE_KDC_NAMESPACE} get secrets | grep kdc"
|
||||
err "PROLE_KDC_MASTER_PASSWORD not found."
|
||||
err "The KDC master password must match the running KDC database and cannot be auto-generated."
|
||||
err "Resolve one of:"
|
||||
err " 1. Store in k8s secret:"
|
||||
err " kubectl -n ${KNOE_KDC_NAMESPACE} patch secret knoe-kdc-secrets \\"
|
||||
err " --type=merge -p '{\"data\":{\"master_password\":\"BASE64PW\"}}'"
|
||||
err " 2. Store in 1Password and set in conf/k3s.cfg:"
|
||||
err " OP_KDC_MASTER_PASSWORD_REF = op://personal/<item>/password"
|
||||
err " then: op run -- bash etc/init_knoe_users.sh --mode k3s initialize"
|
||||
err " 3. Export directly: export PROLE_KDC_MASTER_PASSWORD=<password>"
|
||||
err " 4. Check existing: kubectl -n ${KNOE_KDC_NAMESPACE} get secrets"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ -z "$KNOE_GUEST_PASSWORD" ]]; then
|
||||
|
||||
Loading…
Reference in New Issue
Block a user