Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
Charts
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
魏国强
Charts
Commits
7a148e5a
Commit
7a148e5a
authored
Dec 05, 2020
by
Waqar Ahmed
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Properly configure postgres host path
parent
0beb16ff
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
22 additions
and
10 deletions
+22
-10
test/nextcloud/2.3.2/questions.yaml
test/nextcloud/2.3.2/questions.yaml
+2
-1
test/nextcloud/2.3.2/templates/_helpers.tpl
test/nextcloud/2.3.2/templates/_helpers.tpl
+18
-6
test/nextcloud/2.3.2/templates/deployment.yaml
test/nextcloud/2.3.2/templates/deployment.yaml
+0
-1
test/nextcloud/2.3.2/templates/postgres-deployment.yaml
test/nextcloud/2.3.2/templates/postgres-deployment.yaml
+2
-2
No files found.
test/nextcloud/2.3.2/questions.yaml
View file @
7a148e5a
...
@@ -138,7 +138,8 @@ questions:
...
@@ -138,7 +138,8 @@ questions:
label
:
"
Dataset
Name"
label
:
"
Dataset
Name"
schema
:
schema
:
type
:
string
type
:
string
required
:
true
default
:
"
nextcloud_data"
editable
:
false
-
variable
:
configureHostPath
-
variable
:
configureHostPath
label
:
"
Configure
Host
Path
for
storage"
label
:
"
Configure
Host
Path
for
storage"
...
...
test/nextcloud/2.3.2/templates/_helpers.tpl
View file @
7a148e5a
...
@@ -48,13 +48,25 @@ Create chart name and version as used by the chart label.
...
@@ -48,13 +48,25 @@ Create chart name and version as used by the chart label.
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{- end -}}
{
{
/*
Retrieve
host
path
from
ix
volumes
based
on
dataset
name
*/
}
}
{{- define "retrieveHostPathFromiXVolume" -}}
{{- range $index, $hostPathConfiguration := $.ixVolumes }}
{{- $dsName := base $hostPathConfiguration.hostPath -}}
{{- if eq $.datasetName $dsName -}}
{{- $hostPathConfiguration.hostPath -}}
{{- end -}}
{{- end }}
{{- end -}}
{
{
/*
{
{
/*
Retrieve
host
path
defined
in
volume
Retrieve
host
path
defined
in
volume
*/
}
}
*/
}
}
{{- define "configuredHostPath" -}}
{{- define "configuredHostPath" -}}
{{- if .Values.configureiXVolume -}}
{{- if .Values.configureiXVolume -}}
{{- $volDict :=
first
.Values.ixVolumes -}}
{{- $volDict :=
dict "datasetName" $.Values.volume.datasetName "ixVolumes" $
.Values.ixVolumes -}}
{{-
$volDict.hostPath
-}}
{{-
include "retrieveHostPathFromiXVolume" $volDict
-}}
{{- else if .Values.configureHostPath -}}
{{- else if .Values.configureHostPath -}}
{{- .Values.volumeHostPath -}}
{{- .Values.volumeHostPath -}}
{{- else -}}
{{- else -}}
...
@@ -66,16 +78,16 @@ Retrieve host path defined in volume
...
@@ -66,16 +78,16 @@ 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" -}}
{{- $
backupVolDict := first .Values.postgresql.backupVolume
-}}
{{- $
volDict := dict "datasetName" $.Values.postgresql.backupVolume.datasetName "ixVolumes" $.Values.ixVolumes
-}}
{{-
$backupVolDict.hostPath
-}}
{{-
include "retrieveHostPathFromiXVolume" $volDict
-}}
{{- end -}}
{{- end -}}
{
{
/*
{
{
/*
Retrieve
postgresql
data
host
path
defined
in
volume
Retrieve
postgresql
data
host
path
defined
in
volume
*/
}
}
*/
}
}
{{- define "configuredPostgresHostPath" -}}
{{- define "configuredPostgresHostPath" -}}
{{- $
dataVolDict := first .Values.postgresql.dataVolume
-}}
{{- $
volDict := dict "datasetName" $.Values.postgresql.dataVolume.datasetName "ixVolumes" $.Values.ixVolumes
-}}
{{-
$dataVolDict.hostPath
-}}
{{-
include "retrieveHostPathFromiXVolume" $volDict
-}}
{{- end -}}
{{- end -}}
{
{
/*
{
{
/*
...
...
test/nextcloud/2.3.2/templates/deployment.yaml
View file @
7a148e5a
...
@@ -57,7 +57,6 @@ spec:
...
@@ -57,7 +57,6 @@ spec:
secretKeyRef
:
secretKeyRef
:
name
:
db-details
name
:
db-details
key
:
db-password
key
:
db-password
{{
- end
}}
-
name
:
NEXTCLOUD_ADMIN_USER
-
name
:
NEXTCLOUD_ADMIN_USER
valueFrom
:
valueFrom
:
secretKeyRef
:
secretKeyRef
:
...
...
test/nextcloud/2.3.2/templates/postgres-deployment.yaml
View file @
7a148e5a
...
@@ -50,7 +50,7 @@ spec:
...
@@ -50,7 +50,7 @@ spec:
volumes
:
volumes
:
-
name
:
postgres-data
-
name
:
postgres-data
hostPath
:
hostPath
:
path
:
"
/mnt/evo/ix-applications/releases/nextcloud/volumes/ix_volumes/ix-postgres_data"
path
:
{{
template "configuredPostgresHostPath" .
}}
-
name
:
postgres-backup
-
name
:
postgres-backup
hostPath
:
hostPath
:
path
:
"
/mnt/evo/ix-applications/releases/nextcloud/volumes/ix_volumes/ix-postgres_backups"
path
:
{{
template "configuredBackupPostgresHostPath" .
}}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment