mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-06-12 09:24:23 +00:00
doc: add description for new user about vars
This commit is contained in:
@@ -25,6 +25,7 @@ containers:
|
|||||||
livenessProbe:
|
livenessProbe:
|
||||||
httpGet:
|
httpGet:
|
||||||
path: /healthz
|
path: /healthz
|
||||||
|
# it enables the parser to lookup this field
|
||||||
port: $(APP_PORT)
|
port: $(APP_PORT)
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -59,6 +60,9 @@ vars:
|
|||||||
apiVersion: apps/v1
|
apiVersion: apps/v1
|
||||||
fieldref:
|
fieldref:
|
||||||
fieldpath: spec.template.spec.restartPolicy
|
fieldpath: spec.template.spec.restartPolicy
|
||||||
|
# it exports a value as `APP_PORT`
|
||||||
|
# from `ConfigMap` named `my-config`
|
||||||
|
# in `data.MY_PORT`
|
||||||
- name: APP_PORT
|
- name: APP_PORT
|
||||||
objref:
|
objref:
|
||||||
kind: ConfigMap
|
kind: ConfigMap
|
||||||
@@ -76,6 +80,7 @@ Define the linkage of the consuming resource(s) and the field(s) inside.
|
|||||||
```yaml
|
```yaml
|
||||||
# linkage.yaml
|
# linkage.yaml
|
||||||
varReference:
|
varReference:
|
||||||
|
# the path of resource(s) that you want the parser to lookup
|
||||||
- path: spec/template/spec/containers/livenessProbe/httpGet/port
|
- path: spec/template/spec/containers/livenessProbe/httpGet/port
|
||||||
kind: Deployment
|
kind: Deployment
|
||||||
```
|
```
|
||||||
|
|||||||
Reference in New Issue
Block a user