diff --git a/manifests/helm/gitea/12.6.0/argo-values.yaml b/manifests/helm/gitea/12.6.0/argo-values.yaml new file mode 100644 index 0000000..e96f4ab --- /dev/null +++ b/manifests/helm/gitea/12.6.0/argo-values.yaml @@ -0,0 +1,101 @@ +global: + imageRegistry: "" + +ingress: + enabled: true + annotations: + kubernetes.io/ingress.class: nginx + nginx.ingress.kubernetes.io/proxy-body-size: 200m + cert-manager.io/cluster-issuer: "selfsigned-issuer" + cert-manager.io/duration: 8760h + cert-manager.io/renew-before: 720h + hosts: + - host: gitea.example.org + paths: + - path: / + pathType: Prefix + tls: + - hosts: + host: gitea.example.org + secretName: gitea-tls-secret + +# 사설 인증서를 사용 시 아래 내용 추가 +# keycloak의 인증서를 마운트한다. +extraVolumes: + - name: keycloak-tls + secret: + secretName: platform + +extraContainerVolumeMounts: + - name: keycloak-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="gitea" + KEYCLOAK_SECRET='I5TeB3JV82PJjrqFdzsVdhZfCJhcZwNT' + REALM=paasxpert + 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 + +resources: + requests: + cpu: 100m + memory: 300Mi + limits: + cpu: 300m + memory: 500Mi + +persistence: + enabled: true + size: 10Gi + storageClass: "longhorn" + +## 같은 네임스페이스에 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 + service: + DEFAULT_ALLOW_CREATE_ORGANIZATION: true + repository: + DEFAULT_BRANCH: master + +postgresql: + enabled: true + global: + postgresql: + postgresqlDatabase: gitea + postgresqlUsername: gitea + postgresqlPassword: gitea + servicePort: 5432 + persistence: + size: 5Gi \ No newline at end of file diff --git a/manifests/helm/gitea/12.6.0/dip-questions.yaml b/manifests/helm/gitea/12.6.0/dip-questions.yaml new file mode 100644 index 0000000..51497b4 --- /dev/null +++ b/manifests/helm/gitea/12.6.0/dip-questions.yaml @@ -0,0 +1,10 @@ +questions: +- variable: infisical.username + label: username + type: hidden + default: "sudouser" +- variable: infisical.password + label: Password + type: password + required: true + default: "" \ No newline at end of file diff --git a/manifests/helm/gitea/12.6.0/dip-resources-quotas.yaml b/manifests/helm/gitea/12.6.0/dip-resources-quotas.yaml new file mode 100644 index 0000000..6639956 --- /dev/null +++ b/manifests/helm/gitea/12.6.0/dip-resources-quotas.yaml @@ -0,0 +1,53 @@ +small: + resources: + requests: + cpu: 500m + memory: 1Gi + limits: + cpu: 1000m + memory: 2Gi + + postgresql: + resources: + requests: + cpu: 250m + memory: 512Mi + limits: + cpu: 500m + memory: 1Gi + +medium: + resources: + requests: + cpu: 1000m + memory: 2Gi + limits: + cpu: 2000m + memory: 4Gi + + postgresql: + resources: + requests: + cpu: 500m + memory: 1Gi + limits: + cpu: 1000m + memory: 2Gi + +large: + resources: + requests: + cpu: 2000m + memory: 4Gi + limits: + cpu: 4000m + memory: 8Gi + + postgresql: + resources: + requests: + cpu: 1000m + memory: 2Gi + limits: + cpu: 2000m + memory: 4Gi \ No newline at end of file diff --git a/manifests/helm/gitea/12.6.0/dip-values.yaml b/manifests/helm/gitea/12.6.0/dip-values.yaml new file mode 100644 index 0000000..3b67617 --- /dev/null +++ b/manifests/helm/gitea/12.6.0/dip-values.yaml @@ -0,0 +1,106 @@ +global: + imageRegistry: "" + +ingress: + enabled: true + className: apisix + annotations: + k8s.apisix.apache.org/plugin-config-name: https-redirect + cert-manager.io/cluster-issuer: "root-ca-issuer" + cert-manager.io/duration: 8760h + cert-manager.io/renew-before: 720h + hosts: + - host: "{{ .Name }}.{{ .Domain }}" + paths: + - path: / + pathType: Prefix + tls: + - hosts: + host: "{{ .Name }}.{{ .Domain }}" + secretName: "{{ .Name }}-tls-secret" + +extraVolumes: + - name: keycloak-tls + secret: + secretName: keycloak-tls + + +extraContainerVolumeMounts: + - name: keycloak-tls + mountPath: /etc/ssl/certs/ca.crt + subPath: ca.crt + +extraInitVolumeMounts: + - name: keycloak-tls + mountPath: /etc/ssl/certs/ca.crt + subPath: ca.crt + +replicaCount: 1 + +resources: + requests: + cpu: 100m + memory: 300Mi + limits: + cpu: 300m + memory: 500Mi + +persistence: + enabled: true + size: 10Gi + storageClass: "longhorn" + +gitea: + admin: + username: sudouser + password: "" + email: "gitea@local.domain" + existingSecret: "$INFISICAL_SECRET" + config: + APP_NAME: paasup git + RUN_MODE: prod + server: + ROOT_URL: "https://{{ .Name }}.{{ .Domain }}" + database: + DB_TYPE: postgres + HOST: "{{ .Name }}-postgresql:5432" + NAME: gitea + USER: gitea + PASSWD: gitea + CHARSET: utf8 + SSL_MODE: disable + session: + PROVIDER: postgres + PROVIDER_CONFIG: user=gitea password=gitea host={{ .Name }}-postgresql port=5432 dbname=gitea sslmode=disable + COOKIE_NAME: i_hate_gitea + service: + DEFAULT_ALLOW_CREATE_ORGANIZATION: true + repository: + DEFAULT_BRANCH: master + oauth: + - name: keycloak + provider: "openidConnect" + key: "$KEYCLOAK_CLIENT_ID" + secret: "$KEYCLOAK_CLIENT_SECRET" + autoDiscoverUrl: "$KEYCLOAK_URL/realms/$KEYCLOAK_REALM/.well-known/openid-configuration" + +postgresql-ha: + enabled: false +valkey: + enabled: false +valkey-cluster: + enabled: false +postgresql: + enabled: true + global: + postgresql: + auth: + password: gitea + database: gitea + username: gitea + service: + ports: + postgresql: 5432 + primary: + persistence: + size: 10Gi \ No newline at end of file diff --git a/manifests/helm/gitea/12.6.0/dip-volumes-quotas.yaml b/manifests/helm/gitea/12.6.0/dip-volumes-quotas.yaml new file mode 100644 index 0000000..f7d73e2 --- /dev/null +++ b/manifests/helm/gitea/12.6.0/dip-volumes-quotas.yaml @@ -0,0 +1,29 @@ +small: + persistence: + size: 10Gi + storageClass: "" + + postgresql: + primary: + persistence: + size: 5Gi + +medium: + persistence: + size: 100Gi + storageClass: "" + + postgresql: + primary: + persistence: + size: 20Gi + +large: + persistence: + size: 500Gi + storageClass: "" + + postgresql: + primary: + persistence: + size: 100Gi \ No newline at end of file