mirror of
https://github.com/labring/sealos.git
synced 2026-09-24 15:46:19 +08:00
Fix desktop password salt (#4762)
* Update deploy.yaml.tmpl * Update configmap.yaml.tmpl * fix init.sh * Update init.sh
This commit is contained in:
@@ -135,7 +135,7 @@ function gen_cockroachdbUri() {
|
||||
}
|
||||
|
||||
function gen_saltKey() {
|
||||
password_salt=$(kubectl get configmap desktop-frontend-config -n sealos -o jsonpath='{.data.config\.yaml}' | grep "salt:" | awk '{print $2}' 2>/dev/null || true)
|
||||
password_salt=$(kubectl get configmap desktop-frontend-config -n sealos -o jsonpath='{.data.config\.yaml}' | grep "salt:" | awk '{print $2}' 2>/dev/null | tr -d '"' || true)
|
||||
if [[ -z "$password_salt" ]]; then
|
||||
saltKey=$(tr -dc 'a-z0-9' </dev/urandom | head -c64)
|
||||
else
|
||||
@@ -144,7 +144,7 @@ function gen_saltKey() {
|
||||
}
|
||||
|
||||
function gen_regionUID(){
|
||||
uid=$(kubectl get configmap desktop-frontend-config -n sealos -o jsonpath='{.data.config\.yaml}' | grep "regionUID:" | awk '{print $2}' 2>/dev/null || true)
|
||||
uid=$(kubectl get configmap desktop-frontend-config -n sealos -o jsonpath='{.data.config\.yaml}' | grep "regionUID:" | awk '{print $2}' 2>/dev/null | tr -d '"' || true)
|
||||
if [[ -z "$uid" ]]; then
|
||||
localRegionUID=$(uuidgen)
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user