diff --git a/k8s/forgejo/config.yaml b/k8s/forgejo/config.yaml new file mode 100644 index 0000000..7b9627e --- /dev/null +++ b/k8s/forgejo/config.yaml @@ -0,0 +1,257 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: forgejo + namespace: forgejo +data: + FORGEJO__repository__DEFAULT_REPO_UNITS: repo.code,repo.releases,repo.issues,repo.pulls,repo.wiki,repo.projects,repo.packages,repo.actions # this is the default for 1.22, should be safe to remove when we get there + FORGEJO__repository__PREFERRED_LICENSES: AGPL-3.0-or-later,LGPL-3.0-or-later,GPL-3.0-or-later,Apache-2.0,MIT + FORGEJO__repository__ENABLE_PUSH_CREATE_USER: "true" + FORGEJO__metrics__ENABLED: "true" + FORGEJO__email.incoming__USERNAME: git@janky.solutions + FORGEJO__email.incoming__USE_TLS: "true" + FORGEJO__email.incoming__PORT: "993" + FORGEJO__email.incoming__HOST: mx1.janky.email + FORGEJO__email.incoming__REPLY_TO_ADDRESS: git+%{token}@janky.solutions + FORGEJO__email.incoming__ENABLED: "true" + FORGEJO__mailer__FROM: git@janky.solutions + FORGEJO__mailer__USER: git@janky.solutions + FORGEJO__mailer__SMTP_ADDR: mx1.janky.email + FORGEJO__mailer__PROTOCOL: smtps + FORGEJO__mailer__ENABLED: "true" + FORGEJO__service__NO_REPLY_ADDRESS: noreply.git.janky.solutions + FORGEJO__service__ALLOW_ONLY_EXTERNAL_REGISTRATION: "true" + FORGEJO__service__SHOW_REGISTRATION_BUTTON: "false" + FORGEJO__service__DEFAULT_KEEP_EMAIL_PRIVATE: "true" + FORGEJO__service__ENABLE_NOTIFY_MAIL: "true" + FORGEJO__oauth2_client__ENABLE_AUTO_REGISTRATION: "true" + FORGEJO__oauth2_client__REGISTER_EMAIL_CONFIRM: "true" + FORGEJO__openid__ENABLE_OPENID_SIGNUP: "false" + FORGEJO__server__ROOT_URL: https://git.janky.solutions/ + FORGEJO__server__DOMAIN: git.janky.solutions + FORGEJO__DEFAULT__APP_NAME: Janky Solutions + # FORGEJO__storage__STORAGE_TYPE: minio + # FORGEJO__storage__MINIO_ENDPOINT: storage.home.finn.io + # FORGEJO__storage__MINIO_USE_SSL: "true" + # FORGEJO__storage__MINIO_LOCATION: us-sea-1 + # FORGEJO__storage__MINIO_ACCESS_KEY_ID: aQ0zCsTpCSJ8eKLtGZ3C + # FORGEJO__storage__MINIO_BUCKET: forgejo + # FORGEJO__attachment__STORAGE_TYPE: minio + # FORGEJO__attachment__MINIO_ENDPOINT: storage.home.finn.io + # FORGEJO__attachment__MINIO_USE_SSL: "true" + # FORGEJO__attachment__MINIO_LOCATION: us-sea-1 + # FORGEJO__attachment__MINIO_ACCESS_KEY_ID: aQ0zCsTpCSJ8eKLtGZ3C + # FORGEJO__attachment__MINIO_BUCKET: forgejo +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: forgejo-templates-base + namespace: forgejo +data: + head_navbar.tmpl: | + {{$notificationUnreadCount := 0}} + {{if and .IsSigned .NotificationUnreadCount}} + {{$notificationUnreadCount = call .NotificationUnreadCount}} + {{end}} + + diff --git a/k8s/forgejo/oauth2-settings.txt b/k8s/forgejo/oauth2-settings.txt deleted file mode 100644 index f078bbc..0000000 --- a/k8s/forgejo/oauth2-settings.txt +++ /dev/null @@ -1,3 +0,0 @@ -client_id: forgejo -client_secret: 3d8ef8de-4ab1-4690-8bff-3563c4060653 -discovery_url: https://auth.janky.solutions/auth/realms/janky.solutions/.well-known/openid-configuration diff --git a/k8s/forgejo/statefulset.yaml b/k8s/forgejo/statefulset.yaml index dfabb1d..e382814 100644 --- a/k8s/forgejo/statefulset.yaml +++ b/k8s/forgejo/statefulset.yaml @@ -21,65 +21,22 @@ spec: volumeMounts: - name: forgejo-data mountPath: /data + - name: forgejo-templates-base + mountPath: /data/gitea/templates/base envFrom: - secretRef: name: forgejo - env: - - name: FORGEJO__DEFAULT__APP_NAME - value: Janky Solutions - - name: FORGEJO__server__DOMAIN - value: git.janky.solutions - - name: FORGEJO__server__ROOT_URL - value: https://git.janky.solutions/ - - name: FORGEJO__openid__ENABLE_OPENID_SIGNUP - value: "false" - - name: FORGEJO__oauth2_client__REGISTER_EMAIL_CONFIRM - value: "false" - - name: FORGEJO__oauth2_client__ENABLE_AUTO_REGISTRATION - value: "true" - - name: FORGEJO__service__ENABLE_NOTIFY_MAIL - value: "true" - - name: FORGEJO__service__DEFAULT_KEEP_EMAIL_PRIVATE - value: "true" - - name: FORGEJO__service__SHOW_REGISTRATION_BUTTON - value: "false" - - name: FORGEJO__service__ALLOW_ONLY_EXTERNAL_REGISTRATION - value: "true" - - name: FORGEJO__service__NO_REPLY_ADDRESS - value: noreply.git.janky.solutions - - name: FORGEJO__mailer__ENABLED - value: "true" - - name: FORGEJO__mailer__PROTOCOL - value: smtps - - name: FORGEJO__mailer__SMTP_ADDR - value: mx1.janky.email - - name: FORGEJO__mailer__USER - value: git@janky.solutions - - name: FORGEJO__mailer__FROM - value: git@janky.solutions - - name: FORGEJO__email.incoming__ENABLED - value: "true" - - name: FORGEJO__email.incoming__REPLY_TO_ADDRESS - value: git+%{token}@janky.solutions - - name: FORGEJO__email.incoming__HOST - value: mx1.janky.email - - name: FORGEJO__email.incoming__PORT - value: "993" - - name: FORGEJO__email.incoming__USE_TLS - value: "true" - - name: FORGEJO__email.incoming__USERNAME - value: git@janky.solutions - - name: FORGEJO__metrics__ENABLED - value: "true" - - name: FORGEJO__repository__ENABLE_PUSH_CREATE_USER - value: "true" - - name: FORGEJO__repository__PREFERRED_LICENSES - value: AGPL-3.0-or-later,LGPL-3.0-or-later,GPL-3.0-or-later,Apache-2.0,MIT + - configMapRef: + name: forgejo ports: - name: web containerPort: 3000 - name: ssh containerPort: 22 + volumes: + - name: forgejo-templates-base + configMap: + name: forgejo-templates-base volumeClaimTemplates: - metadata: name: forgejo-data