You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a composition which is configured to inject kubernetes secret by using "credentials" config. Upon loading this secret inside my composite function, fetching the credential data by using "resource.get_credentials()", I 'm receiving below error:
crossplane: error: cannot render composite resource: cannot run pipeline step "postInstallActivities": rpc error: code = Unknown desc = Unexpected <class 'ValueError'>: Field apiextensions.fn.proto.v1.RunFunctionRequest.credentials does not have presence.
While the RunFunctionRequest has the credential field in it, but looks like there is change in the schema.
Below is the RunFunctionRequest struct: observed { composite { resource { fields { key: "spec" value { struct_value { } } } } } } } desired { } context { } credentials { key: "app1" value { credential_data { data { key: "init_key" value: "redacted" } } } } credentials { key: "app2" value { credential_data { data { key: "init_key" value: "redacted" } } } }
Expected Behavior: "resource.get_credentials()" should properly fetch the Credentials from the RunFunctionRequest and return credential type and data.
How can we reproduce it?
Configure a composition to run a composite function and enable config = credentials to reference the secret.
`apiVersion: apiextensions.crossplane.io/v1
kind: Composition
metadata:
name: postInstall
spec:
compositeTypeRef:
apiVersion: product.example.org/v1
kind: postInstall
mode: Pipeline
pipeline:
What happened?
I have a composition which is configured to inject kubernetes secret by using "credentials" config. Upon loading this secret inside my composite function, fetching the credential data by using "resource.get_credentials()", I 'm receiving below error:
While the RunFunctionRequest has the credential field in it, but looks like there is change in the schema.
Below is the RunFunctionRequest struct:
observed { composite { resource { fields { key: "spec" value { struct_value { } } } } } } } desired { } context { } credentials { key: "app1" value { credential_data { data { key: "init_key" value: "redacted" } } } } credentials { key: "app2" value { credential_data { data { key: "init_key" value: "redacted" } } } }
Expected Behavior: "resource.get_credentials()" should properly fetch the Credentials from the RunFunctionRequest and return credential type and data.
How can we reproduce it?
Configure a composition to run a composite function and enable config = credentials to reference the secret.
`apiVersion: apiextensions.crossplane.io/v1
kind: Composition
metadata:
name: postInstall
spec:
compositeTypeRef:
apiVersion: product.example.org/v1
kind: postInstall
mode: Pipeline
pipeline:
functionRef:
name: function-post-install
credentials:
source: Secret
secretRef:
namespace: app1
name: app1-secret
source: Secret
secretRef:
namespace: app2
name: app2-secret`
Develop a composite function to instantiate Credentials with - 'resource.get_credentials(req, "app1")'
In an ideal case, the Credentials should be instantiated with type and data.
What environment did it happen in?
Function version: v0.6.0
The text was updated successfully, but these errors were encountered: