Skip to content

Commit

Permalink
move readOnly one level up
Browse files Browse the repository at this point in the history
  • Loading branch information
stavros-k committed Nov 1, 2023
1 parent 6be6199 commit b2220cc
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 34 deletions.
12 changes: 6 additions & 6 deletions library/common/templates/app_functions/_storageEntry.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -17,29 +17,29 @@
{{- $size = (printf "%vGi" $storage.size) -}}
{{- end -}}

{{- if $storage.readOnly -}}
{{- $readOnly = true -}}
{{- end -}}

{{/* hostPath */}}
{{- if eq $storage.type "hostPath" -}}
{{- if not $storage.hostPathConfig -}}
{{- fail (printf "Storage - Expected [hostPathConfig] to not be empty") -}}
{{- end -}}

{{- if $storage.hostPathConfig.readOnly -}}
{{- $readOnly = true -}}
{{- end -}}
{{- if $storage.hostPathConfig.aclEnable -}}
{{- $hostPath = $storage.hostPathConfig.acl.path -}}
{{- else -}}
{{- $hostPath = $storage.hostPathConfig.hostPath -}}
{{- end -}}
{{- end -}}

{{/* ixVolume */}}
{{- if eq $storage.type "ixVolume" -}}
{{- if not $storage.ixVolumeConfig -}}
{{- fail (printf "Storage Expected [ixVolumeConfig] to not be empty") -}}
{{- end -}}

{{- if $storage.ixVolumeConfig.readOnly -}}
{{- $readOnly = true -}}
{{- end -}}
{{- $datasetName = $storage.ixVolumeConfig.datasetName -}}
{{- end }}

Expand Down
Binary file modified library/ix-dev/community/searxng/charts/common-1.2.1.tgz
Binary file not shown.
34 changes: 6 additions & 28 deletions library/ix-dev/community/searxng/questions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -114,12 +114,6 @@ questions:
$ref:
- "normalize/ixVolume"
attrs:
- variable: readOnly
label: Read Only
description: Mount the dataset as read only.
schema:
type: boolean
default: false
- variable: aclEnable
label: Enable ACL
description: Enable ACL for the dataset.
Expand Down Expand Up @@ -148,12 +142,6 @@ questions:
type: dict
show_if: [["type", "=", "hostPath"]]
attrs:
- variable: readOnly
label: Read Only
description: Mount the host path as read only.
schema:
type: boolean
default: false
- variable: aclEnable
label: Enable ACL
description: Enable ACL for the dataset.
Expand Down Expand Up @@ -205,32 +193,30 @@ questions:
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
# FIXME: Needs migration from hostPath -> hostPathConfig.hostPath
- variable: hostPathConfig
label: hostPathConfig
schema:
type: dict
show_if: [["type", "=", "hostPath"]]
attrs:
- variable: readOnly
label: Read Only
description: Mount the host path as read only.
schema:
type: boolean
default: false
- variable: aclEnable
label: Enable ACL
description: Enable ACL for the dataset.
schema:
type: boolean
default: false
# If aclEnable is true, hostPathConfig.acl.path
- variable: acl
label: ACL Configuration
schema:
Expand All @@ -239,15 +225,13 @@ questions:
attrs: []
$ref:
- "normalize/acl"
# If aclEnable is false, hostPathConfig.hostPath
- variable: hostPath
label: Host Path
description: The host path to use for storage.
schema:
type: hostpath
show_if: [["aclEnable", "=", false]]
required: true
# FIXME: Needs migration from datasetName -> ixVolumeConfig.datasetName
- variable: ixVolumeConfig
label: ixVolume Configuration
description: The configuration for the ixVolume dataset.
Expand All @@ -257,12 +241,6 @@ questions:
$ref:
- "normalize/ixVolume"
attrs:
- variable: readOnly
label: Read Only
description: Mount the dataset as read only.
schema:
type: boolean
default: false
- variable: aclEnable
label: Enable ACL
description: Enable ACL for the dataset.
Expand Down

0 comments on commit b2220cc

Please sign in to comment.