fix(forgejo): add config map to enable ssh and disable http git. Forward traefik port 22 to forgejo.
This commit is contained in:
parent
9d0d908f1a
commit
593a427df3
5 changed files with 59 additions and 1 deletions
23
manifests/forgejo/configmap.yaml
Normal file
23
manifests/forgejo/configmap.yaml
Normal file
|
|
@ -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
|
||||
|
|
@ -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
|
||||
|
|
|
|||
13
manifests/forgejo/ingress-ssh.yaml
Normal file
13
manifests/forgejo/ingress-ssh.yaml
Normal file
|
|
@ -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
|
||||
13
manifests/traefik/helmchartconfig.yaml
Normal file
13
manifests/traefik/helmchartconfig.yaml
Normal file
|
|
@ -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
|
||||
Loading…
Add table
Reference in a new issue