Commit b66cfab 1 parent f024a44 commit b66cfab Copy full SHA for b66cfab
File tree 1 file changed +24
-0
lines changed
1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change
1
+ { {/*
2
+ Function: common.getKeyValue
3
+ Description:
4
+ Retrieves a value from the Helm chart' s values.yaml file based on a prioritized key lookup.
5
+ The function searches for a value in the following order:
6
+ 1. An override key (`keyPathOverride`).
7
+ 2. A global key (`global.keyPath`).
8
+ 3. A default key (`defaults.keyPath`).
9
+ If none of these keys exist, it returns an empty string.
10
+
11
+ Parameters:
12
+ - .key: The path to the key being retrieved.
13
+ - .Values: The values object passed to the Helm template.
14
+
15
+ Dependencies:
16
+ - Uses helper functions "common.hasNestedKey" and "common.getNestedValue" to check
17
+ the existence of nested keys and retrieve their values.
18
+
19
+ Usage:
20
+ This function is intended to prioritize overrides and global configurations
21
+ in a Helm chart' s values.yaml file while providing default fallback values.
22
+
23
+ */} }
24
+
1
25
{ {- define " common.getKeyValue" -} }
2
26
{ {- $keyPath := .key -} }
3
27
{ {- $values := .Values -} }
You can’t perform that action at this time.
0 commit comments