From cf1aafb121c7a972e39aba379425f5547ac28b8c Mon Sep 17 00:00:00 2001 From: Alpha Date: Tue, 20 Oct 2020 13:06:31 +0800 Subject: [PATCH] doc: add description for new user about `vars` --- site/content/en/api-reference/kustomization/vars/_index.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/site/content/en/api-reference/kustomization/vars/_index.md b/site/content/en/api-reference/kustomization/vars/_index.md index d5e776f43..4cf74015c 100644 --- a/site/content/en/api-reference/kustomization/vars/_index.md +++ b/site/content/en/api-reference/kustomization/vars/_index.md @@ -25,6 +25,7 @@ containers: livenessProbe: httpGet: path: /healthz + # it enables the parser to lookup this field port: $(APP_PORT) ``` @@ -59,6 +60,9 @@ vars: apiVersion: apps/v1 fieldref: fieldpath: spec.template.spec.restartPolicy +# it exports a value as `APP_PORT` +# from `ConfigMap` named `my-config` +# in `data.MY_PORT` - name: APP_PORT objref: kind: ConfigMap @@ -76,6 +80,7 @@ Define the linkage of the consuming resource(s) and the field(s) inside. ```yaml # linkage.yaml varReference: + # the path of resource(s) that you want the parser to lookup - path: spec/template/spec/containers/livenessProbe/httpGet/port kind: Deployment ```