Explorar o código

NAS-123967 / 24.04 / add missing (optional) domain field, remove mountOptions and set default `noperm` (#1518)

* add missing (optional) domain field, remove mountOptions and set default `noperm`

* only add smb specific mount option on smb type
Stavros Kois hai 1 ano
pai
achega
f5ce40542e

+ 1 - 1
library/ix-dev/test/syncthing/Chart.yaml

@@ -3,7 +3,7 @@ description: Syncthing is a continuous file synchronization program.
 annotations:
   title: Syncthing
 type: application
-version: 1.0.12
+version: 1.0.13
 apiVersion: v2
 appVersion: '1.23.3'
 kubeVersion: '>=1.16.0-0'

+ 6 - 21
library/ix-dev/test/syncthing/questions.yaml

@@ -213,6 +213,12 @@ questions:
                         type: string
                         show_if: [["type", "=", "smb-pv-pvc"]]
                         required: true
+                    - variable: domain
+                      label: Domain (Optional)
+                      description: The domain for the SMB share.
+                      schema:
+                        type: string
+                        show_if: [["type", "=", "smb-pv-pvc"]]
                     - variable: username
                       label: Username
                       description: The username for the SMB share.
@@ -237,27 +243,6 @@ questions:
                         required: true
                         min: 1
                         default: 1
-                    - variable: mountOptions
-                      label: Mount Options
-                      description: Mount options for the SMB share.
-                      schema:
-                        type: list
-                        show_if: [["type", "=", "smb-pv-pvc"]]
-                        items:
-                          - variable: mountOption
-                            label: Mount Option
-                            schema:
-                              type: dict
-                              attrs:
-                                - variable: key
-                                  label: Key
-                                  schema:
-                                    type: string
-                                    required: true
-                                - variable: value
-                                  label: Value
-                                  schema:
-                                    type: string
 
   - variable: resources
     group: Resources Configuration

+ 3 - 5
library/ix-dev/test/syncthing/templates/_persistence.tpl

@@ -48,15 +48,13 @@ persistence:
     hostPath: {{ $storage.hostPath | default "" }}
     server: {{ $storage.server | default "" }}
     share: {{ $storage.share | default "" }}
+    domain: {{ $storage.domain | default "" }}
     username: {{ $storage.username | default "" }}
     password: {{ $storage.password | default "" }}
     size: {{ $size }}
-    {{- with $storage.mountOptions }}
+    {{- if eq $storage.type "smb-pv-pvc" }}
     mountOptions:
-      {{- range $opt := . }}
-      - key: {{ $opt.key | default "" }}
-        value: {{ $opt.value | default "" }}
-      {{- end }}
+      - key: noperm
     {{- end }}
     targetSelector:
       syncthing: