更新模板中函数备注信息

This commit is contained in:
2025-03-13 15:23:42 +08:00
parent 136d42a31e
commit 6754237844
13 changed files with 103 additions and 37 deletions
+12 -12
View File
@@ -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) }}