Browse Source

gitea: allow specifying different external ssh port (#2613)

* gitea: allow specifying different external ssh port

* desc

* lint

* bump

* single quotes
Stavros Kois 1 năm trước cách đây
mục cha
commit
ea167e8f50

+ 1 - 1
library/ix-dev/community/gitea/Chart.yaml

@@ -3,7 +3,7 @@ description: Gitea - Git with a cup of tea
 annotations:
   title: Gitea
 type: application
-version: 1.1.20
+version: 1.1.21
 apiVersion: v2
 appVersion: 1.22.0
 kubeVersion: '>=1.16.0-0'

+ 1 - 0
library/ix-dev/community/gitea/ci/basic-values.yaml

@@ -13,3 +13,4 @@ giteaStorage:
 
 giteaNetwork:
   rootURL: http://localhost:30000
+  externalSshPort: 22

+ 11 - 1
library/ix-dev/community/gitea/questions.yaml

@@ -21,7 +21,6 @@ portals:
     path: "$kubernetes-resource_configmap_portal_path"
 
 questions:
-
   - variable: giteaConfig
     label: ""
     group: Gitea Configuration
@@ -105,6 +104,17 @@ questions:
             min: 9000
             max: 65535
             required: true
+        - variable: externalSshPort
+          label: External SSH Port
+          description: |
+            The ssh port that Gitea will be available at externally.</br>
+            Leave empty to use the same port as the ssh port.
+          schema:
+            type: int
+            "null": true
+            default: null
+            min: 9000
+            max: 65535
         - variable: hostNetwork
           label: Host Network
           description: |

+ 1 - 1
library/ix-dev/community/gitea/templates/_configuration.tpl

@@ -45,7 +45,7 @@ configmap:
     data:
       {{ $protocol := "http" }}
       GITEA__server__HTTP_PORT: {{ .Values.giteaNetwork.webPort | quote }}
-      GITEA__server__SSH_PORT: {{ .Values.giteaNetwork.sshPort | quote }}
+      GITEA__server__SSH_PORT: {{ .Values.giteaNetwork.externalSshPort | default .Values.giteaNetwork.sshPort | quote }}
       GITEA__server__SSH_LISTEN_PORT: {{ .Values.giteaNetwork.sshPort | quote }}
       GITEA__server__ROOT_URL: {{ .Values.giteaNetwork.rootURL | quote }}
       {{ if .Values.giteaNetwork.certificateID }}

+ 1 - 1
library/ix-dev/community/tdarr/Chart.yaml

@@ -3,7 +3,7 @@ description: Tdarr is a Distributed Transcoding System
 annotations:
   title: Tdarr
 type: application
-version: 1.2.5
+version: 1.2.6
 apiVersion: v2
 appVersion: 2.17.01
 kubeVersion: '>=1.16.0-0'

+ 5 - 1
library/ix-dev/community/tdarr/upgrade_strategy

@@ -14,7 +14,11 @@ STRIP_TEXT = '_ffmpeg5'
 
 def newer_mapping(image_tags):
     key = list(image_tags.keys())[0]
-    tags = {RE_CLEAN_VERSION.sub("\\1", t.strip(STRIP_TEXT)): t for t in image_tags[key] if RE_STABLE_VERSION.fullmatch(t)}
+    tags = {
+        RE_CLEAN_VERSION.sub('\\1', t.strip(STRIP_TEXT)): t
+        for t in image_tags[key]
+        if RE_STABLE_VERSION.fullmatch(t)
+    }
     version = semantic_versioning(list(tags))
     if not version:
         return {}