Add custom gitea configuration in helm chart
This commit is contained in:
@@ -0,0 +1,114 @@
|
||||
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
|
||||
|
||||
extraContainerVolumeMounts:
|
||||
- name: gitea-tls
|
||||
mountPath: /data/gitea/https
|
||||
|
||||
lifecycleHooks:
|
||||
postStart:
|
||||
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
|
||||
# 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}")
|
||||
# KEYCLOAK_URL="https://keycloak.example.org"
|
||||
# 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 "gitea" --name "keycloak" --provider "openidConnect" --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 "gitea" --name "keycloak" --provider "openidConnect" --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: 1Gi
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
storageClass: ""
|
||||
|
||||
# oauth setting
|
||||
|
||||
|
||||
## 같은 네임스페이스에 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
|
||||
|
||||
Reference in New Issue
Block a user