Update tls cert mountPath in custom-values.yaml, argo-values.yaml
This commit is contained in:
@@ -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}")
|
||||
|
||||
@@ -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 설정
|
||||
|
||||
Reference in New Issue
Block a user