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
|
apiVersion: apps/v1
|
||||||
kind: Deployment
|
kind: Service
|
||||||
metadata:
|
metadata:
|
||||||
name: forgejo
|
name: forgejo
|
||||||
namespace: forgejo
|
namespace: forgejo
|
||||||
spec:
|
spec:
|
||||||
|
type: ClusterIP
|
||||||
replicas: 1
|
replicas: 1
|
||||||
selector:
|
selector:
|
||||||
matchLabels:
|
matchLabels:
|
||||||
|
|
@ -18,14 +19,22 @@ spec:
|
||||||
image: codeberg.org/forgejo/forgejo:10
|
image: codeberg.org/forgejo/forgejo:10
|
||||||
ports:
|
ports:
|
||||||
- containerPort: 3000
|
- containerPort: 3000
|
||||||
|
name: http
|
||||||
- containerPort: 22
|
- containerPort: 22
|
||||||
|
name: ssh
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- name : data
|
- name : data
|
||||||
mountPath: /data
|
mountPath: /data
|
||||||
|
- name: config
|
||||||
|
mountPath: /data/gitea/conf/app.ini
|
||||||
|
subPath: app.ini
|
||||||
volumes:
|
volumes:
|
||||||
- name: data
|
- name: data
|
||||||
persistentVolumeClaim:
|
persistentVolumeClaim:
|
||||||
claimName: forgejo-data
|
claimName: forgejo-data
|
||||||
|
- name: config
|
||||||
|
configMap:
|
||||||
|
name: forgejo-config
|
||||||
---
|
---
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: Service
|
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