Update tls cert mountPath in custom-values.yaml, argo-values.yaml
This commit is contained in:
@@ -26,11 +26,10 @@ extraVolumes:
|
|||||||
secret:
|
secret:
|
||||||
secretName: platform
|
secretName: platform
|
||||||
|
|
||||||
|
|
||||||
extraContainerVolumeMounts:
|
extraContainerVolumeMounts:
|
||||||
- name: keycloak-tls
|
- name: keycloak-tls
|
||||||
mountPath: /data/gitea/https/
|
mountPath: /etc/ssl/certs/ca.crt
|
||||||
|
subPath: ca.crt
|
||||||
|
|
||||||
lifecycleHooks:
|
lifecycleHooks:
|
||||||
postStart:
|
postStart:
|
||||||
@@ -40,8 +39,6 @@ lifecycleHooks:
|
|||||||
- "-c"
|
- "-c"
|
||||||
- |
|
- |
|
||||||
/bin/bash <<'EOF' > /tmp/post_start.log
|
/bin/bash <<'EOF' > /tmp/post_start.log
|
||||||
cp /data/gitea/https/tls.crt /usr/local/share/ca-certificates/ # 사설 인증서 사용시에만 추가
|
|
||||||
update-ca-certificates # 사설 인증서 사용시에만 추가
|
|
||||||
su git
|
su git
|
||||||
OAUTH_NAME='keycloak'
|
OAUTH_NAME='keycloak'
|
||||||
AUTH_ID=$(gitea admin auth list --vertical-bars | grep -E "\|${OAUTH_NAME}\s+\|" | grep -iE '\|OAuth2\s+\|' | awk -F " " "{print \$1}")
|
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:
|
secret:
|
||||||
secretName: gitea-tls-secret
|
secretName: gitea-tls-secret
|
||||||
|
|
||||||
|
|
||||||
extraContainerVolumeMounts:
|
extraContainerVolumeMounts:
|
||||||
- name: gitea-tls
|
- name: gitea-tls
|
||||||
mountPath: /data/gitea/https
|
mountPath: /etc/ssl/certs/ca.crt
|
||||||
|
subPath: ca.crt
|
||||||
|
|
||||||
lifecycleHooks:
|
# lifecycleHooks:
|
||||||
postStart:
|
# postStart:
|
||||||
exec:
|
# exec:
|
||||||
command: ["/bin/sh", "-c", "cp /data/gitea/https/tls.crt /usr/local/share/ca-certificates/; update-ca-certificates"]
|
# 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 설정
|
## pod 설정
|
||||||
|
|||||||
Reference in New Issue
Block a user