更新模板中函数备注信息
This commit is contained in:
+12
-12
@@ -3,9 +3,9 @@
|
||||
调用:
|
||||
{{ include "common.secrets.name" (dict "existingSecret" .Values.path.to.the.existingSecret "defaultNameSuffix" "mySuffix" "context" $) }}
|
||||
参数:
|
||||
- existingSecret - 字符串(可选)。用户定义的已存在的 Secret。
|
||||
- defaultNameSuffix - 字符串(可选)。用于相同部署时的 Secret 前缀。
|
||||
- context - 字典(必须)。父级上下文信息。
|
||||
- existingSecret: 字符串(可选)。用户定义的已存在的 Secret。允许该值为用户定义的 Secret 的名称字符串。
|
||||
- defaultNameSuffix: 字符串(可选)。用于相同部署时的 Secret 前缀。
|
||||
- context: 字典(必须)。父级上下文信息。
|
||||
*/}}
|
||||
{{- define "common.secrets.name" -}}
|
||||
{{- $name := (include "common.names.fullname" .context) -}}
|
||||
@@ -32,8 +32,8 @@
|
||||
调用:
|
||||
{{ include "common.secrets.key" (dict "existingSecret" .Values.path.to.the.existingSecret "key" "keyName") }}
|
||||
参数:
|
||||
- existingSecret - 字符串(可选)。用户定义的已存在的 Secret。
|
||||
- key - 字符串(必须)。键名。
|
||||
- existingSecret: 字符串(可选)。用户定义的已存在的 Secret。允许该值为用户定义的 Secret 的名称字符串。
|
||||
- key: 字符串(必须)。键名。
|
||||
*/}}
|
||||
{{- define "common.secrets.key" -}}
|
||||
{{- $key := .key -}}
|
||||
@@ -136,10 +136,10 @@ The order in which this function returns a secret password:
|
||||
调用:
|
||||
{{ include "common.secrets.lookup" (dict "secret" "secret-name" "key" "keyName" "defaultValue" .Values.myValue "context" $) }}
|
||||
参数:
|
||||
- secret - 字符串(必须)。存储密码的 Secret 的名字。
|
||||
- key - 字符串(必须)。Secret 中键的名字。
|
||||
- defaultValue - 字符串(必须)。 `values.yaml`配置文件中该键对应的路径,如:"mysql.password"。获取第一个定义的值。
|
||||
- context - 上下文(必须)。 父级上下文信息。
|
||||
- secret: 字符串(必须)。存储密码的 Secret 的名字。
|
||||
- key: 字符串(必须)。Secret 中键的名字。
|
||||
- defaultValue: 字符串(必须)。 `values.yaml`配置文件中该键对应的路径,如:"mysql.password"。获取第一个定义的值。
|
||||
- context: 上下文(必须)。 父级上下文信息。
|
||||
*/}}
|
||||
{{- define "common.secrets.lookup" -}}
|
||||
{{- $value := "" -}}
|
||||
@@ -155,12 +155,12 @@ The order in which this function returns a secret password:
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
检测是否已存在一个旧版本的 secret定义(true/false)。
|
||||
检测是否已存在一个旧版本的 Secret定义(true/false)。
|
||||
调用:
|
||||
{{ include "common.secrets.exists" (dict "secret" "secret-name" "context" $) }}
|
||||
参数:
|
||||
- secret - 字符串(必须)。用于存放密码的 Secret 的名字。
|
||||
- context - 上下文(必须)。父级上下文信息。
|
||||
- secret: 字符串(必须)。用于存放密码的 Secret 的名字。
|
||||
- context: 上下文(必须)。父级上下文信息。
|
||||
*/}}
|
||||
{{- define "common.secrets.exists" -}}
|
||||
{{- $secret := (lookup "v1" "Secret" (include "common.names.namespace" .context) .secret) }}
|
||||
|
||||
Reference in New Issue
Block a user