diff --git a/library/ix-dev/community/zerotier/Chart.yaml b/library/ix-dev/community/zerotier/Chart.yaml index 64845826a0..e42de6010c 100644 --- a/library/ix-dev/community/zerotier/Chart.yaml +++ b/library/ix-dev/community/zerotier/Chart.yaml @@ -3,7 +3,7 @@ description: Securely connect any device, anywhere. annotations: title: Zerotier type: application -version: 1.0.21 +version: 1.0.22 apiVersion: v2 appVersion: 1.14.0 kubeVersion: '>=1.16.0-0' diff --git a/library/ix-dev/community/zerotier/questions.yaml b/library/ix-dev/community/zerotier/questions.yaml index 51289ee94f..b548e2a397 100644 --- a/library/ix-dev/community/zerotier/questions.yaml +++ b/library/ix-dev/community/zerotier/questions.yaml @@ -3,6 +3,8 @@ groups: description: Configure Zerotier - name: Network Configuration description: Configure Network for Zerotier + - name: Storage Configuration + description: Configure Storage for Zerotier - name: Resources Configuration description: Configure Resources for Zerotier @@ -92,6 +94,155 @@ questions: type: boolean default: false + - variable: zerotierStorage + label: "" + group: Storage Configuration + schema: + type: dict + attrs: + - variable: additionalStorages + label: Additional Storage + description: Additional storage for Zerotier. + schema: + type: list + default: [] + items: + - variable: storageEntry + label: Storage Entry + schema: + type: dict + attrs: + - variable: type + label: Type + description: | + ixVolume: Is dataset created automatically by the system.
+ Host Path: Is a path that already exists on the system.
+ SMB Share: Is a SMB share that is mounted to a persistent volume claim. + schema: + type: string + required: true + default: "ixVolume" + immutable: true + enum: + - value: "hostPath" + description: Host Path (Path that already exists on the system) + - value: "ixVolume" + description: ixVolume (Dataset created automatically by the system) + - value: "smb-pv-pvc" + description: SMB Share (Mounts a persistent volume claim to a SMB share) + - variable: readOnly + label: Read Only + description: Mount the volume as read only. + schema: + type: boolean + default: false + - variable: mountPath + label: Mount Path + description: The path inside the container to mount the storage. + schema: + type: path + required: true + - variable: hostPathConfig + label: Host Path Configuration + schema: + type: dict + show_if: [["type", "=", "hostPath"]] + attrs: + - variable: aclEnable + label: Enable ACL + description: Enable ACL for the dataset. + schema: + type: boolean + default: false + - variable: acl + label: ACL Configuration + schema: + type: dict + show_if: [["aclEnable", "=", true]] + attrs: [] + $ref: + - "normalize/acl" + - variable: hostPath + label: Host Path + description: The host path to use for storage. + schema: + type: hostpath + show_if: [["aclEnable", "=", false]] + required: true + - variable: ixVolumeConfig + label: ixVolume Configuration + description: The configuration for the ixVolume dataset. + schema: + type: dict + show_if: [["type", "=", "ixVolume"]] + $ref: + - "normalize/ixVolume" + attrs: + - variable: aclEnable + label: Enable ACL + description: Enable ACL for the dataset. + schema: + type: boolean + default: false + - variable: datasetName + label: Dataset Name + description: The name of the dataset to use for storage. + schema: + type: string + required: true + immutable: true + default: "storage_entry" + - variable: aclEntries + label: ACL Configuration + schema: + type: dict + show_if: [["aclEnable", "=", true]] + attrs: [] + - variable: smbConfig + label: SMB Share Configuration + description: The configuration for the SMB Share. + schema: + type: dict + show_if: [["type", "=", "smb-pv-pvc"]] + attrs: + - variable: server + label: Server + description: The server for the SMB share. + schema: + type: string + required: true + - variable: share + label: Share + description: The share name for the SMB share. + schema: + type: string + required: true + - variable: domain + label: Domain (Optional) + description: The domain for the SMB share. + schema: + type: string + - variable: username + label: Username + description: The username for the SMB share. + schema: + type: string + required: true + - variable: password + label: Password + description: The password for the SMB share. + schema: + type: string + required: true + private: true + - variable: size + label: Size (in Gi) + description: The size of the volume quota. + schema: + type: int + required: true + min: 1 + default: 1 - variable: resources group: Resources Configuration label: "" diff --git a/library/ix-dev/community/zerotier/templates/_zerotier.tpl b/library/ix-dev/community/zerotier/templates/_zerotier.tpl index 64cb602875..debdcdd6bb 100644 --- a/library/ix-dev/community/zerotier/templates/_zerotier.tpl +++ b/library/ix-dev/community/zerotier/templates/_zerotier.tpl @@ -86,4 +86,13 @@ persistence: zerotier: zerotier: mountPath: /dev/net/tun + {{- range $idx, $storage := .Values.zerotierStorage.additionalStorages }} + {{ printf "zerotier-%v:" (int $idx) }} + enabled: true + {{- include "ix.v1.common.app.storageOptions" (dict "storage" $storage) | nindent 4 }} + targetSelector: + zerotier: + zerotier: + mountPath: {{ $storage.mountPath }} + {{- end }} {{- end -}} diff --git a/library/ix-dev/community/zerotier/values.yaml b/library/ix-dev/community/zerotier/values.yaml index 1516299059..5a4a0733c0 100644 --- a/library/ix-dev/community/zerotier/values.yaml +++ b/library/ix-dev/community/zerotier/values.yaml @@ -17,3 +17,6 @@ zerotierConfig: zerotierNetwork: hostNetwork: false + +zerotierStorage: + additionalStorages: []