diff --git a/inventory.yml b/inventory.yml index 71e637b..02af5b0 100644 --- a/inventory.yml +++ b/inventory.yml @@ -94,13 +94,13 @@ forgejo_runners: forgejo_host: codeberg.org forgejo_org: EntanglementGarden forgejo-runner-3: - home_network: true - forgejo_host: codeberg.org - forgejo_org: EntanglementGarden - forgejo-runner-4: home_network: true forgejo_host: codeberg.org forgejo_org: thefinn93 + forgejo-runner-dev: + home_network: true + forgejo_host: forgejo-dev.janky.solutions + forgejo_org: system seedboxes: hosts: diff --git a/k8s/forgejo-dev/config.yaml b/k8s/forgejo-dev/config.yaml new file mode 100644 index 0000000..ff7f682 --- /dev/null +++ b/k8s/forgejo-dev/config.yaml @@ -0,0 +1,31 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: forgejo +data: + 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: "false" + FORGEJO__openid__ENABLE_OPENID_SIGNUP: "false" + FORGEJO__server__ROOT_URL: https://forgejo-dev.janky.solutions/ + FORGEJO__server__DOMAIN: forgejo-dev.janky.solutions + FORGEJO__DEFAULT__APP_NAME: Forgejo Dev + DEFAULT_MERGE_STYLE: rebase + diff --git a/k8s/forgejo-dev/ingress.yaml b/k8s/forgejo-dev/ingress.yaml new file mode 100644 index 0000000..63f9949 --- /dev/null +++ b/k8s/forgejo-dev/ingress.yaml @@ -0,0 +1,16 @@ +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: forgejo +spec: + rules: + - host: forgejo-dev.janky.solutions + http: + paths: + - path: / + pathType: Prefix + backend: + service: + name: forgejo + port: + name: web diff --git a/k8s/forgejo-dev/kustomization.yaml b/k8s/forgejo-dev/kustomization.yaml new file mode 100644 index 0000000..0c5d8f6 --- /dev/null +++ b/k8s/forgejo-dev/kustomization.yaml @@ -0,0 +1,10 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +namespace: forgejo-dev +resources: + - namespace.yaml + - config.yaml + - ingress.yaml + - services.yaml + - statefulset.yaml + - secrets.yaml diff --git a/k8s/forgejo-dev/namespace.yaml b/k8s/forgejo-dev/namespace.yaml new file mode 100644 index 0000000..fe16d1b --- /dev/null +++ b/k8s/forgejo-dev/namespace.yaml @@ -0,0 +1,4 @@ +apiVersion: v1 +kind: Namespace +metadata: + name: forgejo-dev diff --git a/k8s/forgejo-dev/services.yaml b/k8s/forgejo-dev/services.yaml new file mode 100644 index 0000000..9aae5fc --- /dev/null +++ b/k8s/forgejo-dev/services.yaml @@ -0,0 +1,10 @@ +apiVersion: v1 +kind: Service +metadata: + name: forgejo +spec: + ports: + - name: web + port: 3000 + selector: + app: forgejo diff --git a/k8s/forgejo-dev/statefulset.yaml b/k8s/forgejo-dev/statefulset.yaml new file mode 100644 index 0000000..1e72f47 --- /dev/null +++ b/k8s/forgejo-dev/statefulset.yaml @@ -0,0 +1,41 @@ +apiVersion: apps/v1 +kind: StatefulSet +metadata: + name: forgejo +spec: + selector: + matchLabels: + app: forgejo + serviceName: forgejo + replicas: 1 + template: + metadata: + labels: + app: forgejo + spec: + containers: + - image: git.janky.solutions/finn/forgejo:dev + imagePullPolicy: Always + name: forgejo + resources: {} + volumeMounts: + - name: forgejo-data + mountPath: /data + envFrom: + - secretRef: + name: forgejo + - configMapRef: + name: forgejo + ports: + - name: web + containerPort: 3000 + - name: ssh + containerPort: 22 + volumeClaimTemplates: + - metadata: + name: forgejo-data + spec: + accessModes: ["ReadWriteOnce"] + resources: + requests: + storage: 5Gi