Correctly populate storage fields
This commit is contained in:
@@ -3,7 +3,7 @@ groups:
|
|||||||
description: "Image to be used for container"
|
description: "Image to be used for container"
|
||||||
- name: "Nextcloud Configuration"
|
- name: "Nextcloud Configuration"
|
||||||
description: "Configuration details for Nextcloud workload"
|
description: "Configuration details for Nextcloud workload"
|
||||||
- name: "Storage Configuration"
|
- name: "Storage"
|
||||||
description: "Configure Storage for Nextcloud"
|
description: "Configure Storage for Nextcloud"
|
||||||
- name: "Container Configuration"
|
- name: "Container Configuration"
|
||||||
description: "Configure nextcloud container parameters"
|
description: "Configure nextcloud container parameters"
|
||||||
@@ -109,96 +109,78 @@ questions:
|
|||||||
default: 9000
|
default: 9000
|
||||||
required: true
|
required: true
|
||||||
|
|
||||||
- variable: configureiXVolume
|
- variable: nextcloudDataHostPathEnabled
|
||||||
label: "Configure iX Volume"
|
label: "Configure Host Path for Nextcloud data"
|
||||||
group: "Storage Configuration"
|
|
||||||
description: "Use iX Volume for persistent storage"
|
|
||||||
schema:
|
|
||||||
type: boolean
|
|
||||||
default: true
|
|
||||||
required: true
|
|
||||||
show_subquestions_if: true
|
|
||||||
subquestions:
|
|
||||||
- variable: volume
|
|
||||||
label: "Configure iXVolume"
|
|
||||||
group: "Storage Configuration"
|
|
||||||
schema:
|
|
||||||
type: dict
|
|
||||||
$ref:
|
|
||||||
- "normalize/ixVolume"
|
|
||||||
attrs:
|
|
||||||
- variable: mountPath
|
|
||||||
label: "Mount Path"
|
|
||||||
description: "Path where the volume will be mounted inside the pod"
|
|
||||||
schema:
|
|
||||||
type: path
|
|
||||||
editable: false
|
|
||||||
default: "/var/www"
|
|
||||||
- variable: datasetName
|
|
||||||
label: "Dataset Name"
|
|
||||||
schema:
|
|
||||||
type: string
|
|
||||||
default: "nextcloud_data"
|
|
||||||
editable: false
|
|
||||||
|
|
||||||
- variable: configureHostPath
|
|
||||||
label: "Configure Host Path for storage"
|
|
||||||
description: "Use a path on host for persistent data storage"
|
|
||||||
group: "Storage Configuration"
|
|
||||||
schema:
|
schema:
|
||||||
type: boolean
|
type: boolean
|
||||||
default: false
|
default: false
|
||||||
required: true
|
|
||||||
show_if: [["configureiXVolume", "=", false]]
|
|
||||||
show_subquestions_if: true
|
show_subquestions_if: true
|
||||||
subquestions:
|
subquestions:
|
||||||
- variable: volumeHostPath
|
- variable: nextcloudHostPath
|
||||||
label: "Host Path"
|
label: "Specify HostPath for Nextcloud data"
|
||||||
group: "Storage Configuration"
|
|
||||||
schema:
|
schema:
|
||||||
type: hostpath
|
type: hostpath
|
||||||
|
|
||||||
- variable: postgresql
|
- variable: nextcloudDataVolume
|
||||||
label: "Configure Postgresql"
|
label: "Configure iXVolume"
|
||||||
group: "Postgresql Configuration"
|
|
||||||
schema:
|
schema:
|
||||||
type: dict
|
type: dict
|
||||||
|
$ref:
|
||||||
|
- "normalize/ixVolume"
|
||||||
|
show_if: [["nextcloudDataHostPathEnabled", "=", false]]
|
||||||
attrs:
|
attrs:
|
||||||
- variable: backupVolume
|
- variable: mountPath
|
||||||
label: "Backup Volume"
|
label: "Mount Path"
|
||||||
|
description: "Path where the volume will be mounted inside the pod"
|
||||||
schema:
|
schema:
|
||||||
type: dict
|
type: path
|
||||||
$ref:
|
editable: false
|
||||||
- "normalize/ixVolume"
|
default: "/var/www"
|
||||||
attrs:
|
- variable: datasetName
|
||||||
- variable: mountPath
|
label: "Dataset Name"
|
||||||
label: "Mount Path"
|
|
||||||
schema:
|
|
||||||
type: path
|
|
||||||
editable: false
|
|
||||||
default: "/postgres_backups"
|
|
||||||
- variable: datasetName
|
|
||||||
label: "Dataset Name"
|
|
||||||
schema:
|
|
||||||
type: string
|
|
||||||
default: "ix-postgres_backups"
|
|
||||||
editable: false
|
|
||||||
- variable: dataVolume
|
|
||||||
label: "Postgresql Data Volume"
|
|
||||||
schema:
|
schema:
|
||||||
type: dict
|
type: string
|
||||||
$ref:
|
default: "ix-nextcloud_data"
|
||||||
- "normalize/ixVolume"
|
editable: false
|
||||||
attrs:
|
|
||||||
- variable: mountPath
|
- variable: postgresBackupVolume
|
||||||
label: "Mount Path"
|
label: "Postgres Backup Volume"
|
||||||
schema:
|
group: "Storage"
|
||||||
type: path
|
schema:
|
||||||
editable: false
|
type: dict
|
||||||
default: "/var/lib/postgresql/data"
|
$ref:
|
||||||
- variable: datasetName
|
- "normalize/ixVolume"
|
||||||
label: "Dataset Name"
|
attrs:
|
||||||
schema:
|
- variable: mountPath
|
||||||
type: string
|
label: "Mount Path"
|
||||||
default: "ix-postgres_data"
|
schema:
|
||||||
editable: false
|
type: path
|
||||||
|
editable: false
|
||||||
|
default: "/postgres_backups"
|
||||||
|
- variable: datasetName
|
||||||
|
label: "Dataset Name"
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
default: "ix-postgres_backups"
|
||||||
|
editable: false
|
||||||
|
|
||||||
|
- variable: postgresDataVolume
|
||||||
|
label: "Postgresql Data Volume"
|
||||||
|
group: "Storage"
|
||||||
|
schema:
|
||||||
|
type: dict
|
||||||
|
$ref:
|
||||||
|
- "normalize/ixVolume"
|
||||||
|
attrs:
|
||||||
|
- variable: mountPath
|
||||||
|
label: "Mount Path"
|
||||||
|
schema:
|
||||||
|
type: path
|
||||||
|
editable: false
|
||||||
|
default: "/var/lib/postgresql/data"
|
||||||
|
- variable: datasetName
|
||||||
|
label: "Dataset Name"
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
default: "ix-postgres_data"
|
||||||
|
editable: false
|
||||||
|
|||||||
@@ -57,20 +57,20 @@ Retrieve host path from ix volumes based on dataset name
|
|||||||
{{- if eq $.datasetName $dsName -}}
|
{{- if eq $.datasetName $dsName -}}
|
||||||
{{- $hostPathConfiguration.hostPath -}}
|
{{- $hostPathConfiguration.hostPath -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- end }}
|
{{- end -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
{{/*
|
{{/*
|
||||||
Retrieve host path defined in volume
|
Retrieve host path defined in volume
|
||||||
*/}}
|
*/}}
|
||||||
{{- define "configuredHostPath" -}}
|
{{- define "configuredHostPath" -}}
|
||||||
{{- if .Values.configureiXVolume -}}
|
{{- if .Values.emptyDirVolumes -}}
|
||||||
{{- $volDict := dict "datasetName" $.Values.volume.datasetName "ixVolumes" $.Values.ixVolumes -}}
|
|
||||||
{{- include "retrieveHostPathFromiXVolume" $volDict -}}
|
|
||||||
{{- else if .Values.configureHostPath -}}
|
|
||||||
{{- .Values.volumeHostPath -}}
|
|
||||||
{{- else -}}
|
|
||||||
{{- printf "" -}}
|
{{- printf "" -}}
|
||||||
|
{{- else if .Values.nextcloudDataHostPathEnabled -}}
|
||||||
|
{{- required "Please specify a host path for nextcloud" .Values.nextcloudHostPath -}}
|
||||||
|
{{- else -}}
|
||||||
|
{{- $volDict := dict "datasetName" $.Values.nextcloudDataVolume.datasetName "ixVolumes" $.Values.ixVolumes -}}
|
||||||
|
{{- include "retrieveHostPathFromiXVolume" $volDict -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
@@ -78,7 +78,7 @@ Retrieve host path defined in volume
|
|||||||
Retrieve backup postgresql host path defined in volume
|
Retrieve backup postgresql host path defined in volume
|
||||||
*/}}
|
*/}}
|
||||||
{{- define "configuredBackupPostgresHostPath" -}}
|
{{- define "configuredBackupPostgresHostPath" -}}
|
||||||
{{- $volDict := dict "datasetName" $.Values.postgresql.backupVolume.datasetName "ixVolumes" $.Values.ixVolumes -}}
|
{{- $volDict := dict "datasetName" $.Values.postgresBackupVolume.datasetName "ixVolumes" $.Values.ixVolumes -}}
|
||||||
{{- include "retrieveHostPathFromiXVolume" $volDict -}}
|
{{- include "retrieveHostPathFromiXVolume" $volDict -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
@@ -86,7 +86,7 @@ Retrieve backup postgresql host path defined in volume
|
|||||||
Retrieve postgresql data host path defined in volume
|
Retrieve postgresql data host path defined in volume
|
||||||
*/}}
|
*/}}
|
||||||
{{- define "configuredPostgresHostPath" -}}
|
{{- define "configuredPostgresHostPath" -}}
|
||||||
{{- $volDict := dict "datasetName" $.Values.postgresql.dataVolume.datasetName "ixVolumes" $.Values.ixVolumes -}}
|
{{- $volDict := dict "datasetName" $.Values.postgresDataVolume.datasetName "ixVolumes" $.Values.ixVolumes -}}
|
||||||
{{- include "retrieveHostPathFromiXVolume" $volDict -}}
|
{{- include "retrieveHostPathFromiXVolume" $volDict -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
|
|||||||
@@ -13,13 +13,5 @@ nextcloud:
|
|||||||
datadir: /var/www/html/data
|
datadir: /var/www/html/data
|
||||||
strategy: "Recreate"
|
strategy: "Recreate"
|
||||||
|
|
||||||
postgresql:
|
|
||||||
backupVolume:
|
|
||||||
mountPath: "/postgres_backups"
|
|
||||||
datasetName: "ix-postgres_backups"
|
|
||||||
dataVolume:
|
|
||||||
mountPath: "/var/lib/postgresql/data"
|
|
||||||
datasetName: "ix-postgres_data"
|
|
||||||
|
|
||||||
service:
|
service:
|
||||||
nodePort: 9000
|
nodePort: 9000
|
||||||
|
|||||||
Reference in New Issue
Block a user