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
0ab705bc
Commit
0ab705bc
authored
Jan 31, 2021
by
Waqar Ahmed
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Separate common chart specific values in another variable
parent
15ef56b8
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
library/common/templates/lib/chart/_names.tpl
library/common/templates/lib/chart/_names.tpl
+6
-6
No files found.
library/common/templates/lib/chart/_names.tpl
View file @
0ab705bc
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
Expand
the
name
of
the
chart
.
Expand
the
name
of
the
chart
.
*/
}}
*/
}}
{{- define "common.names.name" -}}
{{- define "common.names.name" -}}
{{- $values :=
.
-}}
{{- $values :=
(.common | default dict)
-}}
{{- $name := (default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-") }}
{{- $name := (default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-") }}
{{- if hasKey $values "nameSuffix" -}}
{{- if hasKey $values "nameSuffix" -}}
{{- $name = (printf "%v-%v" $name $values.nameSuffix) -}}
{{- $name = (printf "%v-%v" $name $values.nameSuffix) -}}
...
@@ -16,11 +16,11 @@ We truncate at 63 chars because some Kubernetes name fields are limited to this
...
@@ -16,11 +16,11 @@ We truncate at 63 chars because some Kubernetes name fields are limited to this
If
release
name
contains
chart
name
it
will
be
used
as
a
full
name
.
If
release
name
contains
chart
name
it
will
be
used
as
a
full
name
.
*/
}
}
*/
}
}
{{- define "common.names.fullname" -}}
{{- define "common.names.fullname" -}}
{{- $values :=
.
-}}
{{- $values :=
(.common | default dict)
-}}
{{- if
$v
alues.fullnameOverride }}
{{- if
.V
alues.fullnameOverride }}
{{-
$v
alues.fullnameOverride | trunc 63 | trimSuffix "-" }}
{{-
.V
alues.fullnameOverride | trunc 63 | trimSuffix "-" }}
{{- else }}
{{- else }}
{{- $name := default .Chart.Name
$v
alues.nameOverride }}
{{- $name := default .Chart.Name
.V
alues.nameOverride }}
{{- if hasKey $values "nameSuffix" -}}
{{- if hasKey $values "nameSuffix" -}}
{{- $name = (printf "%v-%v" $name $values.nameSuffix) -}}
{{- $name = (printf "%v-%v" $name $values.nameSuffix) -}}
{{ end -}}
{{ end -}}
...
@@ -53,7 +53,7 @@ Determine release name
...
@@ -53,7 +53,7 @@ Determine release name
This
will
add
a
suffix
to
the
release
name
if
nameSuffix
is
set
This
will
add
a
suffix
to
the
release
name
if
nameSuffix
is
set
*/
}
}
*/
}
}
{{- define "common.names.releaseName" -}}
{{- define "common.names.releaseName" -}}
{{- $values :=
.
-}}
{{- $values :=
(.common | default dict)
-}}
{{- if hasKey $values "nameSuffix" -}}
{{- if hasKey $values "nameSuffix" -}}
{{- printf "%v-%v" .Release.Name $values.nameSuffix -}}
{{- printf "%v-%v" .Release.Name $values.nameSuffix -}}
{{- else -}}
{{- else -}}
...
...
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