Skip to content

Commit

Permalink
add migration example for toFieldPath
Browse files Browse the repository at this point in the history
Signed-off-by: lsviben <[email protected]>
  • Loading branch information
lsviben committed Jan 29, 2024
1 parent 15a1199 commit e591f32
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions examples/object/deprecated/patches-from-resource.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
apiVersion: kubernetes.crossplane.io/v1alpha1
kind: Object
metadata:
name: foo
spec:
references:
# Use patchesFrom to patch field from other k8s resource to this object
- patchesFrom:
apiVersion: v1
kind: ConfigMap
name: bar
namespace: default
fieldPath: data.sample-key
toFieldPath: data.sample-key-from-bar
forProvider:
manifest:
apiVersion: v1
kind: ConfigMap
metadata:
namespace: default
data:
sample-key: sample-value
providerConfigRef:
name: kubernetes-provider
---
apiVersion: v1
kind: ConfigMap
metadata:
name: bar
namespace: default
data:
sample-key: sample-value

0 comments on commit e591f32

Please sign in to comment.