Commit 7f3adb2 1 parent f7de703 commit 7f3adb2 Copy full SHA for 7f3adb2
File tree 3 files changed +50
-1
lines changed
3 files changed +50
-1
lines changed Original file line number Diff line number Diff line change @@ -31,16 +31,34 @@ status:
31
31
fromEnv: e
32
32
---
33
33
apiVersion: render.crossplane.io/v1beta1
34
- kind: Context
35
34
fields:
36
35
apiextensions.crossplane.io/environment:
36
+ apiVersion: internal.crossplane.io/v1alpha1
37
+ array:
38
+ - " 1"
39
+ - " 2"
40
+ complex:
41
+ a: b
42
+ c:
43
+ d: e
44
+ f: " 1"
45
+ kind: Environment
46
+ nestedEnvUpdate:
47
+ hello: world
48
+ update: environment
49
+ newkey:
50
+ apiVersion: internal.crossplane.io/v1alpha1
51
+ hello: world
37
52
kind: Environment
53
+ other-context-key:
38
54
apiVersion: internal.crossplane.io/v1alpha1
39
55
complex:
40
56
a: b
41
57
c:
42
58
d: e
43
59
f: " 1"
60
+ kind: Environment
61
+ kind: Context
44
62
```
45
63
46
64
## Debugging This Function
Original file line number Diff line number Diff line change @@ -32,12 +32,18 @@ spec:
32
32
apiVersion: meta.gotemplating.fn.crossplane.io/v1alpha1
33
33
kind: Context
34
34
data:
35
+ # update existing EnvironmentConfig by using the "apiextensions.crossplane.io/environment" key
35
36
"apiextensions.crossplane.io/environment":
36
37
update: environment
37
38
nestedEnvUpdate:
38
39
hello: world
40
+ array:
41
+ - "1"
42
+ - "2"
43
+ # read existing context and move it to another key
39
44
"other-context-key":
40
45
complex: {{ index .context "apiextensions.crossplane.io/environment" "complex" | toYaml | nindent 6 }}
46
+ # Create a new Context key and populate it with data
41
47
newkey:
42
48
hello: world
43
49
---
Original file line number Diff line number Diff line change
1
+ ---
2
+ apiVersion : apiextensions.crossplane.io/v1
3
+ kind : CompositeResourceDefinition
4
+ metadata :
5
+ name : xrs.example.crossplane.io
6
+ spec :
7
+ group : example.crossplane.io
8
+ names :
9
+ kind : XR
10
+ plural : xrs
11
+ connectionSecretKeys :
12
+ - test
13
+ versions :
14
+ - name : v1
15
+ served : true
16
+ referenceable : true
17
+ schema :
18
+ openAPIV3Schema :
19
+ type : object
20
+ properties :
21
+ status :
22
+ type : object
23
+ properties :
24
+ fromEnv :
25
+ type : string
You can’t perform that action at this time.
0 commit comments