Skip to content

Commit 069c5fd

Browse files
committed
add story4 details
1 parent 504e805 commit 069c5fd

File tree

1 file changed

+54
-2
lines changed

1 file changed

+54
-2
lines changed

proposals/22-03-value-in-the-structured-data.md

Lines changed: 54 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -391,7 +391,7 @@ replacements:
391391
kind: ConfigMap
392392
name: prometheus-config
393393
fieldPaths:
394-
- prometheus\.yml
394+
- data.prometheus\.yml
395395
options:
396396
format: 'yaml'
397397
formatPath: '/global/external_labels/prometheus_env'
@@ -434,11 +434,63 @@ A few times, an application on your cluster requires to set json format config f
434434
435435
##### Example
436436
```yaml
437+
## source
438+
apiVersion: cloud.google.com/v1
439+
kind: BackendConfig
440+
metadata:
441+
name: debug-backend-config
442+
spec:
443+
securityPolicy:
444+
name: "debug-security-policy"
445+
---
446+
apiVersion: v1
447+
kind: Service
448+
metadata:
449+
name: appA-svc
450+
annotations:
451+
cloud-provider/backend-config: '{"ports": {"appA":"gke-default-backend-config"}}'
452+
spec:
453+
ports:
454+
- name: appA
455+
port: 1234
456+
protocol: TCP
457+
targetPort: 8080
458+
```
459+
460+
```yaml
461+
## replacement
462+
replacements:
463+
- source:
464+
kind: BackendConfig
465+
name: debug-backend-config
466+
fieldPath: metadata.name
467+
targets:
468+
- select:
469+
kind: ConServicefigMap
470+
name: appA-svc
471+
fieldPaths:
472+
- metadata.annotations.cloud-provider/backend-config
473+
options:
474+
format: 'json'
475+
formatPath: '/ports/appA'
476+
```
477+
478+
```yaml
479+
## expected
480+
apiVersion: cloud.google.com/v1
481+
kind: BackendConfig
482+
metadata:
483+
name: debug-backend-config
484+
spec:
485+
securityPolicy:
486+
name: "debug-security-policy"
487+
---
437488
apiVersion: v1
438489
kind: Service
439490
metadata:
491+
name: appA-svc
440492
annotations:
441-
cloud-provider/backend-config: '{"ports": {"appA":"referrence_from_appA"}}'
493+
cloud-provider/backend-config: '{"ports": {"appA":"debug-backend-config"}}'
442494
spec:
443495
ports:
444496
- name: appA

0 commit comments

Comments
 (0)