$ kubectl get clusterrolebinding | grep admin-binding
provider-kubernetes-admin-binding ClusterRole/cluster-admin 64m
kcl-function-admin-binding ClusterRole/cluster-admin 58m
provider-helm-admin-binding ClusterRole/cluster-admin 58m
crossplane-admin-binding ClusterRole/cluster-admin 3m37s
$ kubectl apply -f xrd-claim.yaml -f function-kcl.yaml
$ kubectl apply -f resource.yaml
$ kubectl get composite
NAME SYNCED READY COMPOSITION AGE
test-yyy-wb9mg False example 15m
$ kubectl describe composite
....
Status:
Conditions:
Last Transition Time: 2024-05-07T11:35:15Z
Message: cannot compose resources: cannot update composite resource spec.resourceRefs: failed to create typed patch object (/test-yyy-wb9mg; crossplane.io/v1beta1, Kind=XExample): .spec.resourceRefs[0].namespace: field not declared in schema
Reason: ReconcileError
Status: False
Type: Synced
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Normal SelectComposition 16m defined/compositeresourcedefinition.apiextensions.crossplane.io Successfully selected composition: example
Normal SelectComposition 16m defined/compositeresourcedefinition.apiextensions.crossplane.io Selected composition revision: example-a6fcde9
Warning ComposeResources 7s (x22 over 16m) defined/compositeresourcedefinition.apiextensions.crossplane.io cannot compose resources: cannot update composite resource spec.resourceRefs: failed to create typed patch object (/test-yyy-wb9mg; crossplane.io/v1beta1, Kind=XExample): .spec.resourceRefs[0].namespace: field not declared in schema
Created
May 7, 2024 11:53
-
-
Save metacoma/0e29bc1c81dbdd6bb2ea0ca9bb71aeab to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: apiextensions.crossplane.io/v1 | |
kind: Composition | |
metadata: | |
name: example | |
spec: | |
compositeTypeRef: | |
apiVersion: crossplane.io/v1beta1 | |
kind: XExample | |
mode: Pipeline | |
pipeline: | |
- step: normal | |
functionRef: | |
name: kcl-function | |
input: | |
apiVersion: krm.kcl.dev/v1alpha1 | |
kind: KCLRun | |
spec: | |
source: | | |
items = [ | |
{ | |
apiVersion = "v1" | |
kind = "ConfigMap" | |
metadata.name = "test-configmap" | |
metadata.namespace = "default" | |
data = { | |
foo = "bar" | |
} | |
} | |
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: crossplane.io/v1beta1 | |
kind: Example | |
metadata: | |
name: test-yyy | |
spec: | |
name: "team-d" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: apiextensions.crossplane.io/v1 | |
kind: CompositeResourceDefinition | |
metadata: | |
name: xexamples.crossplane.io | |
spec: | |
group: crossplane.io | |
names: | |
kind: XExample | |
plural: xexamples | |
claimNames: | |
kind: Example | |
plural: examples | |
versions: | |
- name: v1beta1 | |
served: true | |
referenceable: true | |
schema: | |
openAPIV3Schema: | |
type: object | |
properties: | |
spec: | |
type: object | |
properties: | |
name: | |
type: string |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment