Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Expose the gitea ssh port on 32222 #478

Merged
merged 1 commit into from
Jan 28, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions hack/gitea/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,16 @@ gitea:
server:
DOMAIN: '{{- if .UsePathRouting -}} {{ .Host }} {{- else -}} gitea.{{- .Host }} {{- end }}'
ROOT_URL: '{{- if .UsePathRouting }} {{- .Protocol }}://{{ .Host }}:{{ .Port }}/gitea {{- else }} {{- .Protocol }}://gitea.{{ .Host }}:{{ .Port }} {{- end }}'
SSH_PORT: 32222
SSH_LISTEN_PORT: 2222
webhook:
ALLOWED_HOST_LIST: private
SKIP_TLS_VERIFY: true

service:
ssh:
type: NodePort
port: 32222
nodePort: 32222
externalTrafficPolicy: Local

Expand Down
8 changes: 4 additions & 4 deletions pkg/controllers/localbuild/resources/gitea/k8s/install.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ stringData:
ROOT_URL={{- if .UsePathRouting }} {{- .Protocol }}://{{ .Host }}:{{ .Port }}/gitea {{- else }} {{- .Protocol }}://gitea.{{ .Host }}:{{ .Port }} {{- end }}
SSH_DOMAIN={{- if .UsePathRouting -}} {{ .Host }} {{- else -}} gitea.{{- .Host }} {{- end }}
SSH_LISTEN_PORT=2222
SSH_PORT=22
SSH_PORT=32222
START_SSH_SERVER=true
session: |-
PROVIDER=memory
Expand Down Expand Up @@ -381,7 +381,7 @@ spec:
externalTrafficPolicy: Local
ports:
- name: ssh
port: 22
port: 32222
targetPort: 2222
protocol: TCP
nodePort: 32222
Expand Down Expand Up @@ -417,7 +417,7 @@ spec:
template:
metadata:
annotations:
checksum/config: 94b0102e29e8bd17652180743c848722b184530813c36ad9fe0705edc22cc716
checksum/config: 9472556301411a93ff19830db2ba46ea781c96364243b2f06ab8e33fb785c25d
labels:
helm.sh/chart: gitea-10.1.4
app: gitea
Expand Down Expand Up @@ -539,7 +539,7 @@ spec:
- name: SSH_LISTEN_PORT
value: "2222"
- name: SSH_PORT
value: "22"
value: "32222"
- name: GITEA_APP_INI
value: /data/gitea/conf/app.ini
- name: GITEA_CUSTOM
Expand Down
9 changes: 9 additions & 0 deletions pkg/kind/cluster_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ nodes:
- containerPort: 443
hostPort: 8443
protocol: TCP
- containerPort: 32222
hostPort: 32222
protocol: TCP
containerdConfigPatches:
- |-
[plugins."io.containerd.grpc.v1.cri".registry.mirrors."gitea.cnoe.localtest.me:8443"]
Expand All @@ -65,6 +68,9 @@ nodes:
- containerPort: 443
hostPort: 8443
protocol: TCP
- containerPort: 32222
hostPort: 32222
protocol: TCP

containerdConfigPatches:
- |-
Expand Down Expand Up @@ -117,6 +123,9 @@ nodes:
- containerPort: 443
hostPort: 8443
protocol: TCP
- containerPort: 32222
hostPort: 32222
protocol: TCP
- containerPort: 32222
hostPort: 22
protocol: TCP
Expand Down
3 changes: 3 additions & 0 deletions pkg/kind/resources/kind.yaml.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ nodes:
- containerPort: {{ if (eq .Protocol "http") -}} 80 {{- else -}} 443 {{- end }}
hostPort: {{ .Port }}
protocol: TCP
- containerPort: 32222
hostPort: 32222
protocol: TCP
{{ range .ExtraPortsMapping -}}
- containerPort: {{ .ContainerPort }}
hostPort: {{ .HostPort }}
Expand Down
Loading