135 lines
3.9 KiB
YAML
135 lines
3.9 KiB
YAML
global:
|
|
imageRegistry: ""
|
|
|
|
# # ingress 배포 전 인증서 secret 배포 필요(secret 이름은 platform)
|
|
# ingress:
|
|
# enabled: true
|
|
# annotations:
|
|
# kubernetes.io/ingress.class: nginx
|
|
# nginx.ingress.kubernetes.io/proxy-body-size: 200m
|
|
# hosts:
|
|
# - host: gitea.example.org
|
|
# paths:
|
|
# - path: /
|
|
# pathType: Prefix
|
|
# tls:
|
|
# - hosts:
|
|
# host: gitea.example.org
|
|
# secretName: platform
|
|
|
|
# # 사설 인증서를 사용 시 아래 내용 추가
|
|
# extraVolumes:
|
|
# - name: gitea-tls
|
|
# secret:
|
|
# secretName: platform
|
|
|
|
# ingress 배포 전 인증서 secret 배포 필요(secret 이름은 platform)
|
|
ingress:
|
|
enabled: true
|
|
annotations:
|
|
cert-manager.io/cluster-issuer: "selfsigned-issuer"
|
|
cert-manager.io/duration: 8760h
|
|
cert-manager.io/renew-before: 720h
|
|
konghq.com/protocols: https
|
|
konghq.com/https-redirect-status-code: "301"
|
|
|
|
hosts:
|
|
- host: gitea.example.org
|
|
paths:
|
|
- path: /
|
|
pathType: Prefix
|
|
tls:
|
|
- hosts:
|
|
host: gitea.example.org
|
|
secretName: gitea-tls-secret
|
|
|
|
# 사설 인증서를 사용 시 아래 내용 추가
|
|
extraVolumes:
|
|
- name: gitea-tls
|
|
secret:
|
|
secretName: gitea-tls-secret
|
|
|
|
extraContainerVolumeMounts:
|
|
- name: gitea-tls
|
|
mountPath: /etc/ssl/certs/ca.crt
|
|
subPath: ca.crt
|
|
|
|
# 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 설정
|
|
replicaCount: 1
|
|
|
|
tolerations: []
|
|
|
|
nodeSelector: {}
|
|
|
|
resources:
|
|
requests:
|
|
cpu: 100m
|
|
memory: 300Mi
|
|
limits:
|
|
cpu: 300m
|
|
memory: 500Mi
|
|
|
|
persistence:
|
|
enabled: true
|
|
size: 10Gi
|
|
storageClass: ""
|
|
|
|
## 같은 네임스페이스에 postgresql 배포 가정
|
|
gitea:
|
|
admin:
|
|
username: sudouser
|
|
password: password
|
|
email: "sudouser@cro.com"
|
|
config:
|
|
APP_NAME: paasup git
|
|
RUN_MODE: prod
|
|
server:
|
|
ROOT_URL: https://gitea.example.org
|
|
database:
|
|
DB_TYPE: postgres
|
|
# HOST: postgresql-postgresql-ha-pgpool:5432
|
|
HOST: postgresql-postgresql-ha-postgresql:5432
|
|
NAME: postgres # database name
|
|
USER: postgres # username
|
|
PASSWD: postgres # user password
|
|
CHARSET: utf8
|
|
SCHEMA: public
|
|
SSL_MODE: disable
|
|
session:
|
|
PROVIDER: postgres
|
|
# PROVIDER_CONFIG: user=gitea password=gitea host=postgresql-postgresql-ha-pgpool port=5432 dbname=gitea_session sslmode=disable
|
|
PROVIDER_CONFIG: user=postgres password=postgres host=postgresql-postgresql-ha-postgresql port=5432 dbname=postgres sslmode=disable
|
|
COOKIE_NAME: i_hate_gitea
|
|
service:
|
|
DEFAULT_ALLOW_CREATE_ORGANIZATION: true
|
|
repository:
|
|
DEFAULT_BRANCH: master
|
|
|