Skip to content
This repository was archived by the owner on Dec 11, 2023. It is now read-only.

Commit 991e884

Browse files
author
odacremolbap
committed
update docs with fromSpec structure
1 parent 1ef0584 commit 991e884

File tree

13 files changed

+132
-133
lines changed

13 files changed

+132
-133
lines changed

docs/reference/registration.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -167,29 +167,29 @@ The default behavior is to create parameters from each spec element (arrays will
167167

168168
```yaml
169169
parameterConfiguration:
170-
specToEnvs:
170+
fromSpec:
171171
- path: spec.bar
172-
render:
172+
toEnv:
173173
name: FOO_BAR
174174
```
175175

176176
- [x] Add default value to element when not informed.
177177

178178
```yaml
179179
parameterConfiguration:
180-
specToEnvs:
180+
fromSpec:
181181
- path: spec.bar
182-
render:
182+
toEnv:
183183
defaultValue: hello scoby
184184
```
185185

186186
- [x] Generate secret parameter from element.
187187

188188
```yaml
189189
parameterConfiguration:
190-
specToEnvs:
190+
fromSpec:
191191
- path: spec.credentials
192-
render:
192+
toEnv:
193193
name: FOO_CREDENTIALS
194194
valueFromSecret:
195195
name: spec.credentials.name
@@ -200,9 +200,9 @@ The default behavior is to create parameters from each spec element (arrays will
200200

201201
```yaml
202202
parameterConfiguration:
203-
specToEnvs:
203+
fromSpec:
204204
- path: spec.preferences
205-
render:
205+
toEnv:
206206
valueFromConfigmap:
207207
name: spec.preferences.name
208208
key: spec.preferences.key
@@ -212,9 +212,9 @@ The default behavior is to create parameters from each spec element (arrays will
212212

213213
```yaml
214214
parameterConfiguration:
215-
specToEnvs:
215+
fromSpec:
216216
- path: spec.destination
217-
render:
217+
toEnv:
218218
name: K_SINK
219219
valueFromBuiltInFunc:
220220
name: resolveAddress
@@ -228,9 +228,9 @@ Secrets and ConfigMaps can be mounted as a volume inside the workload. The regis
228228

229229
```yaml
230230
parameterConfiguration:
231-
specToVolumes:
231+
fromSpec:
232232
- path: spec.userList
233-
render:
233+
toVolume:
234234
name: userfile
235235
mountPath: /opt/user.lst
236236
valueFromConfigMap:
@@ -244,9 +244,9 @@ Secrets and ConfigMaps can be mounted as a volume inside the workload. The regis
244244

245245
```yaml
246246
parameterConfiguration:
247-
specToEnvs:
247+
fromSpec:
248248
- path: spec.destination
249-
render:
249+
toEnv:
250250
name: K_SINK
251251
valueFromBuiltInFunc:
252252
name: resolveAddress

docs/samples/01.kuard/03.param.skip/01.kuard-registration.yaml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,8 @@ spec:
1515
repo: gcr.io/kuar-demo/kuard-amd64:blue
1616

1717
parameterConfiguration:
18-
specToEnvs:
18+
fromSpec:
1919
# Skip variable2 from generating a parameter for the workload
2020
- path: spec.variable2
21-
render:
22-
skip: true
21+
skip: true
2322

docs/samples/01.kuard/04.param.rename/01.kuard-registration.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ spec:
1515
repo: gcr.io/kuar-demo/kuard-amd64:blue
1616

1717
parameterConfiguration:
18-
specToEnvs:
18+
fromSpec:
1919
# Use a specific env var key for variable2
2020
- path: spec.variable2
21-
render:
21+
toEnv:
2222
name: KUARD_VARIABLE_TWO
2323

docs/samples/01.kuard/05.param.value/01.kuard-registration.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ spec:
1515
repo: gcr.io/kuar-demo/kuard-amd64:blue
1616

1717
parameterConfiguration:
18-
specToEnvs:
18+
fromSpec:
1919
# Set a default value for variable2
2020
- path: spec.variable2
21-
render:
21+
toEnv:
2222
defaultValue: new variable2 value

docs/samples/01.kuard/06.param.secret/01.kuard-registration.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ spec:
1616
repo: gcr.io/kuar-demo/kuard-amd64:blue
1717

1818
parameterConfiguration:
19-
specToEnvs:
19+
fromSpec:
2020
# Reference a secret
2121
- path: spec.refToSecret
22-
render:
22+
toEnv:
2323
name: FOO_CREDENTIALS
2424
valueFromSecret:
2525
name: spec.refToSecret.secretName

docs/samples/01.kuard/07.param.configmap/01.kuard-registration.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ spec:
1616
repo: gcr.io/kuar-demo/kuard-amd64:blue
1717

1818
parameterConfiguration:
19-
specToEnvs:
19+
fromSpec:
2020
# Reference a ConfigMap
2121
- path: spec.refToConfigMap
22-
render:
22+
toEnv:
2323
valueFromConfigMap:
2424
name: spec.refToConfigMap.configName
2525
key: spec.refToConfigMap.configKey

docs/samples/01.kuard/08.param.addressable/01.kuard-registration.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ spec:
1616
repo: gcr.io/kuar-demo/kuard-amd64:blue
1717

1818
parameterConfiguration:
19-
specToEnvs:
19+
fromSpec:
2020
# Resolve an address
2121
- path: spec.refToAddress
22-
render:
22+
toEnv:
2323
name: FOO_SINK
2424
valueFromBuiltInFunc:
2525
name: resolveAddress

docs/samples/02.webhooksource/02.webhooksource-registration.yaml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,36 +28,36 @@ spec:
2828
- name: K_LOGGING_CONFIG
2929
value: "{}"
3030

31-
specToEnvs:
31+
fromSpec:
3232
- path: spec.eventType
33-
render:
33+
toEnv:
3434
name: WEBHOOK_EVENT_TYPE
3535

3636
- path: spec.eventSource
37-
render:
37+
toEnv:
3838
name: WEBHOOK_EVENT_SOURCE
3939

4040
- path: spec.basicAuthUsername
41-
render:
41+
toEnv:
4242
name: WEBHOOK_BASICAUTH_USERNAME
4343

4444
- path: spec.basicAuthPassword
45-
render:
45+
toEnv:
4646
name: WEBHOOK_BASICAUTH_PASSWORD
4747
valueFromSecret:
4848
name: spec.basicAuthPassword.valueFromSecret.name
4949
key: spec.basicAuthPassword.valueFromSecret.key
5050

5151
- path: spec.eventExtensionAttributes.from
52-
render:
52+
toEnv:
5353
name: WEBHOOK_EVENT_EXTENSION_ATTRIBUTES_FROM
5454

5555
- path: spec.corsAllowOrigin
56-
render:
56+
toEnv:
5757
name: WEBHOOK_CORS_ALLOW_ORIGIN
5858

5959
- path: spec.sink
60-
render:
60+
toEnv:
6161
name: K_SINK
6262
valueFromBuiltInFunc:
6363
name: resolveAddress

docs/samples/03.kafkasource/02.kafkasource-registration.yaml

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -22,69 +22,69 @@ spec:
2222
- name: K_LOGGING_CONFIG
2323
value: "{}"
2424

25-
specToEnvs:
25+
fromSpec:
2626
- path: spec.bootstrapServers
27-
render:
27+
toEnv:
2828
name: BOOTSTRAP_SERVERS
2929

3030
- path: spec.topic
31-
render:
31+
toEnv:
3232
name: TOPIC
3333

3434
- path: spec.groupID
35-
render:
35+
toEnv:
3636
name: GROUP_ID
3737

3838
- path: spec.auth.saslEnable
39-
render:
39+
toEnv:
4040
name: SASL_ENABLE
4141

4242
- path: spec.auth.securityMechanism
43-
render:
43+
toEnv:
4444
name: SECURITY_MECHANISMS
4545

4646
- path: spec.auth.tlsEnable
47-
render:
47+
toEnv:
4848
name: TLS_ENABLE
4949

5050
- path: spec.auth.tls.skipVerify
51-
render:
51+
toEnv:
5252
name: SKIP_VERIFY
5353

5454
- path: spec.auth.tls.ca
55-
render:
55+
toEnv:
5656
name: CA
5757
valueFromSecret:
5858
name: spec.auth.tls.ca.valueFromSecret.name
5959
key: spec.auth.tls.ca.valueFromSecret.key
6060

6161
- path: spec.auth.tls.clientCert
62-
render:
62+
toEnv:
6363
name: CLIENT_CERT
6464
valueFromSecret:
6565
name: spec.auth.tls.clientCert.valueFromSecret.name
6666
key: spec.auth.tls.clientCert.valueFromSecret.key
6767

6868
- path: spec.auth.tls.clientKey
69-
render:
69+
toEnv:
7070
name: CLIENT_KEY
7171
valueFromSecret:
7272
name: spec.auth.tls.clientKey.valueFromSecret.name
7373
key: spec.auth.tls.clientKey.valueFromSecret.key
7474

7575
- path: spec.auth.username
76-
render:
76+
toEnv:
7777
name: USERNAME
7878

7979
- path: spec.auth.password
80-
render:
80+
toEnv:
8181
name: PASSWORD
8282
valueFromSecret:
8383
name: spec.auth.password.valueFromSecret.name
8484
key: spec.auth.password.valueFromSecret.key
8585

8686
- path: spec.sink
87-
render:
87+
toEnv:
8888
name: K_SINK
8989
valueFromBuiltInFunc:
9090
name: resolveAddress

docs/samples/04.httppollersource/02.httppollersource-registration.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,18 +26,18 @@ spec:
2626
- name: K_LOGGING_CONFIG
2727
value: "{}"
2828

29-
specToEnvs:
29+
fromSpec:
3030
- path: spec.eventType
31-
render:
31+
toEnv:
3232
name: HTTPPOLLER_EVENT_TYPE
3333

3434
- path: spec.eventSource
35-
render:
35+
toEnv:
3636
name: HTTPPOLLER_EVENT_SOURCE
3737

3838

3939
- path: spec.sink
40-
render:
40+
toEnv:
4141
name: K_SINK
4242
valueFromBuiltInFunc:
4343
name: resolveAddress

0 commit comments

Comments
 (0)