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
c2fb3d5d
Commit
c2fb3d5d
authored
Feb 03, 2021
by
Waqar Ahmed
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove common method for volume configuration based on old format
parent
58a796ab
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
66 deletions
+0
-66
library/common/2101.0.0/templates/lib/storage/_ixvolumes.tpl
library/common/2101.0.0/templates/lib/storage/_ixvolumes.tpl
+0
-14
library/common/2101.0.0/templates/lib/storage/_volume.tpl
library/common/2101.0.0/templates/lib/storage/_volume.tpl
+0
-52
No files found.
library/common/2101.0.0/templates/lib/storage/_ixvolumes.tpl
View file @
c2fb3d5d
...
@@ -9,17 +9,3 @@ Retrieve host path from ix volumes based on dataset name
...
@@ -9,17 +9,3 @@ Retrieve host path from ix volumes based on dataset name
{{- end -}}
{{- end -}}
{{- end }}
{{- end }}
{{- end -}}
{{- end -}}
{
{
/*
Retrieve
host
path
from
ix
volumes
based
on
a
key
*/
}
}
{{- define "common.storage.configuredHostPath" -}}
{{- $values := . -}}
{{- if $values.hostPathEnabled -}}
{{- include "common.schema.validateKeys" (dict "values" $values "checkKeys" (list "pathField")) -}}
{{- $values.pathField -}}
{{- else -}}
{{- include "common.schema.validateKeys" (dict "values" $values "checkKeys" (list "datasetName" "ixVolumes")) -}}
{{- include "common.storage.retrieveHostPathFromiXVolume" (dict "datasetName" $values.datasetName "ixVolumes" $values.ixVolumes) -}}
{{- end -}}
{{- end -}}
library/common/2101.0.0/templates/lib/storage/_volume.tpl
deleted
100644 → 0
View file @
58a796ab
{{
/*
Retrieve
volume
configuration
This
expects
a
dictionary
in
the
following
format
:
{
"name"
:
string
,
"emptyDirVolumes"
:
boolean
,
"ixVolumes"
:
list
,
"hostPathEnabled"
:
boolean
,
"pathField"
:
string
,
"datasetName"
:
string
,
}
*/
}
}
{{- define "common.storage.volumeConfig" -}}
{{- $values := . -}}
{{- include "common.schema.validateKeys" (dict "values" $values "checkKeys" (list "name")) -}}
{{- if $values.emptyDirVolumes -}}
- name: {{ $values.name }}
emptyDir: {}
{{- else -}}
- name: {{ $values.name }}
hostPath:
path: {{ template "common.storage.configuredHostPath" $values }}
{{- end -}}
{{- end -}}
{
{
/*
Retrieve
configuration
for
volumes
This
expects
a
dictionary
to
be
provided
in
the
following
format
:
{
"ixVolumes"
:
list
,
"volumes"
:
[
{
"name"
:
string
,
"emptyDirVolumes"
:
boolean
,
"hostPathEnabled"
:
boolean
,
"pathField"
:
string
,
"datasetName"
:
string
,
}
] ( list of dicts )
}
*/}}
{{- define "common.storage.volumesConfiguration" -}}
{{- $values := . -}}
{{- include "common.schema.validateKeys" (dict "values" $values "checkKeys" (list "ixVolumes" "volumes")) -}}
{{- range $vol := $values.volumes -}}
{{- $_ := set $vol "ixVolumes" $values.ixVolumes -}}
{{- include "common.storage.volumeConfig" $vol | nindent 0 -}}
{{- 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