Update tls cert mountPath in custom-values.yaml, argo-values.yaml

This commit is contained in:
wbsong111
2024-12-12 16:47:35 +09:00
parent a0c737770f
commit 179a45c88c
2 changed files with 29 additions and 11 deletions
+2 -5
View File
@@ -26,11 +26,10 @@ extraVolumes:
secret:
secretName: platform
extraContainerVolumeMounts:
- name: keycloak-tls
mountPath: /data/gitea/https/
mountPath: /etc/ssl/certs/ca.crt
subPath: ca.crt
lifecycleHooks:
postStart:
@@ -40,8 +39,6 @@ lifecycleHooks:
- "-c"
- |
/bin/bash <<'EOF' > /tmp/post_start.log
cp /data/gitea/https/tls.crt /usr/local/share/ca-certificates/ # 사설 인증서 사용시에만 추가
update-ca-certificates # 사설 인증서 사용시에만 추가
su git
OAUTH_NAME='keycloak'
AUTH_ID=$(gitea admin auth list --vertical-bars | grep -E "\|${OAUTH_NAME}\s+\|" | grep -iE '\|OAuth2\s+\|' | awk -F " " "{print \$1}")
+27 -6
View File
@@ -48,15 +48,36 @@ extraVolumes:
secret:
secretName: gitea-tls-secret
extraContainerVolumeMounts:
- name: gitea-tls
mountPath: /data/gitea/https
mountPath: /etc/ssl/certs/ca.crt
subPath: ca.crt
lifecycleHooks:
postStart:
exec:
command: ["/bin/sh", "-c", "cp /data/gitea/https/tls.crt /usr/local/share/ca-certificates/; update-ca-certificates"]
# lifecycleHooks:
# postStart:
# exec:
# command:
# - "/bin/sh"
# - "-c"
# - |
# /bin/bash <<'EOF' > /tmp/post_start.log
# su git
# OAUTH_NAME='keycloak'
# AUTH_ID=$(gitea admin auth list --vertical-bars | grep -E "\|${OAUTH_NAME}\s+\|" | grep -iE '\|OAuth2\s+\|' | awk -F " " "{print \$1}")
# KEYCLOAK_URL="https://keycloak.example.org"
# KEYCLOAK_CLIENT_ID="keycloak"
# KEYCLOAK_SECRET=""
# REALM=paasup
# if [[ -z "${AUTH_ID}" ]]; then
# echo "No oauth configuration found with name '${OAUTH_NAME}'. Installing it now..."
# gitea admin auth add-oauth --auto-discover-url "${KEYCLOAK_URL}/auth/realms/${REALM}/.well-known/openid-configuration" --key "${KEYCLOAK_CLIENT_ID}" --name "keycloak" --provider "openidConnect" --secret "{$KEYCLOAK_SECRET}"
# echo '...installed.'
# else
# echo "Existing oauth configuration with name '${OAUTH_NAME}': '${AUTH_ID}'. Running update to sync settings..."
# gitea admin auth update-oauth --id "${AUTH_ID}" --auto-discover-url "${KEYCLOAK_URL}/auth/realms/${REALM}/.well-known/openid-configuration" --key"${KEYCLOAK_CLIENT_ID}" --name "keycloak" --provider "openidConnect" --secret "{$KEYCLOAK_SECRET}"
# echo '...sync settings done.'
# fi
# EOF
## pod 설정