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
8e719a47
Commit
8e719a47
authored
Dec 04, 2020
by
Waqar Ahmed
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow using host path or ix volume for persistent data storage
parent
aa33f73f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
68 additions
and
0 deletions
+68
-0
test/nextcloud/2.3.2/questions.yaml
test/nextcloud/2.3.2/questions.yaml
+51
-0
test/nextcloud/2.3.2/templates/_helpers.tpl
test/nextcloud/2.3.2/templates/_helpers.tpl
+14
-0
test/nextcloud/2.3.2/templates/deployment.yaml
test/nextcloud/2.3.2/templates/deployment.yaml
+3
-0
No files found.
test/nextcloud/2.3.2/questions.yaml
View file @
8e719a47
...
@@ -3,6 +3,8 @@ groups:
...
@@ -3,6 +3,8 @@ 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"
description
:
"
Configure
Storage
for
Nextcloud"
questions
:
questions
:
# Image related
# Image related
...
@@ -101,3 +103,52 @@ questions:
...
@@ -101,3 +103,52 @@ questions:
max
:
65535
max
:
65535
default
:
9000
default
:
9000
required
:
true
required
:
true
-
variable
:
configureiXVolume
label
:
"
Configure
iX
Volume"
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
required
:
true
-
variable
:
configureHostPath
label
:
"
Configure
Host
Path
for
storage"
description
:
"
Use
a
path
on
host
for
persistent
data
storage"
group
:
"
Storage
Configuration"
schema
:
type
:
boolean
default
:
false
required
:
true
show_if
:
[[
"
configureiXVolume"
,
"
="
,
false
]]
show_subquestions_if
:
true
subquestions
:
-
variable
:
volumeHostPath
label
:
"
Host
Path"
group
:
"
Storage
Configuration"
schema
:
type
:
hostpath
required
:
true
test/nextcloud/2.3.2/templates/_helpers.tpl
View file @
8e719a47
...
@@ -47,3 +47,17 @@ Create chart name and version as used by the chart label.
...
@@ -47,3 +47,17 @@ Create chart name and version as used by the chart label.
{{- define "nextcloud.chart" -}}
{{- define "nextcloud.chart" -}}
{{- 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
defined
in
volume
*/
}
}
{{- define "configuredHostPath" -}}
{{- if .Values.configureiXVolume -}}
{{- $volDict := first .Values.ixVolumes -}}
{{- $volDict.hostPath -}}
{{- else if .Values.configureHostPath -}}
{{- .Values.volumeHostPath -}}
{{- else -}}
{{- printf "" -}}
{{- end -}}
{{- end -}}
test/nextcloud/2.3.2/templates/deployment.yaml
View file @
8e719a47
...
@@ -328,6 +328,9 @@ spec:
...
@@ -328,6 +328,9 @@ spec:
{{
- if .Values.persistence.enabled
}}
{{
- if .Values.persistence.enabled
}}
persistentVolumeClaim
:
persistentVolumeClaim
:
claimName
:
{{
if .Values.persistence.existingClaim
}}{{
.Values.persistence.existingClaim
}}{{
- else
}}{{
template "nextcloud.fullname" .
}}
-nextcloud{{- end }}
claimName
:
{{
if .Values.persistence.existingClaim
}}{{
.Values.persistence.existingClaim
}}{{
- else
}}{{
template "nextcloud.fullname" .
}}
-nextcloud{{- end }}
{{
- else if ne (include "configuredHostPath" .) ""
}}
hostPath
:
path
:
{{
template "configuredHostPath" .
}}
{{
- else
}}
{{
- else
}}
emptyDir
:
{}
emptyDir
:
{}
{{
- end
}}
{{
- end
}}
...
...
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