diff --git a/manifests/forgejo/configmap.yaml b/manifests/forgejo/configmap.yaml new file mode 100644 index 0000000..42be5ba --- /dev/null +++ b/manifests/forgejo/configmap.yaml @@ -0,0 +1,23 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: forgejo-config + namespace: forgejo +data: + app.ini: | + [service] + DISABLE_REGISTRATION = false + REGISTER_MANUAL_CONFIRM = true + REQUIRE_SIGNIN_VIEW = false + DISABLE_GIT_HTTP = true + + [server] + DISABLE_SSH = false + START_SSH_SERVER = true + SSH_PORT = 22 + SSH_LISTEN_PORT = 22 + DOMAIN = forgejo.libretalk.eu + ROOT_URL = https://forgejo.libretalk.eu/ + + [repository] + ENABLE_PUSH_CREATE_USER = false diff --git a/manifests/forgejo/deployment.yaml b/manifests/forgejo/deployment.yaml index 630c400..5749b59 100644 --- a/manifests/forgejo/deployment.yaml +++ b/manifests/forgejo/deployment.yaml @@ -1,9 +1,10 @@ apiVersion: apps/v1 -kind: Deployment +kind: Service metadata: name: forgejo namespace: forgejo spec: + type: ClusterIP replicas: 1 selector: matchLabels: @@ -18,14 +19,22 @@ spec: image: codeberg.org/forgejo/forgejo:10 ports: - containerPort: 3000 + name: http - containerPort: 22 + name: ssh volumeMounts: - name : data mountPath: /data + - name: config + mountPath: /data/gitea/conf/app.ini + subPath: app.ini volumes: - name: data persistentVolumeClaim: claimName: forgejo-data + - name: config + configMap: + name: forgejo-config --- apiVersion: v1 kind: Service diff --git a/manifests/forgejo/ingress.yaml b/manifests/forgejo/ingress-http.yaml similarity index 100% rename from manifests/forgejo/ingress.yaml rename to manifests/forgejo/ingress-http.yaml diff --git a/manifests/forgejo/ingress-ssh.yaml b/manifests/forgejo/ingress-ssh.yaml new file mode 100644 index 0000000..dff8eac --- /dev/null +++ b/manifests/forgejo/ingress-ssh.yaml @@ -0,0 +1,13 @@ +apiVersion: traefik.io/v1alpha1 +kind: IngressRouteTCP +metadata: + name: forgejo-ssh + namespace: forgejo +spec: + entryPoints: + - ssh + routes: + - match: HostSNI(`*`) + services: + - name: forgejo + port: 22 diff --git a/manifests/traefik/helmchartconfig.yaml b/manifests/traefik/helmchartconfig.yaml new file mode 100644 index 0000000..8cd833f --- /dev/null +++ b/manifests/traefik/helmchartconfig.yaml @@ -0,0 +1,13 @@ +apiVersion: helm.cattle.io/v1 +kind: HelmChartConfig +metadata: + name: traefik + namespace: kube-system +spec: + valuesContent: |- + ports: + ssh: + port: 22 + expose: true + exposedPort: 22 + protocol: TCP