Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document composition function credentials #762

Open
negz opened this issue Apr 29, 2024 · 2 comments
Open

Document composition function credentials #762

negz opened this issue Apr 29, 2024 · 2 comments
Assignees

Comments

@negz
Copy link
Member

negz commented Apr 29, 2024

crossplane/crossplane#5543 adds the ability to pass credentials to a composition function.

apiVersion: apiextensions.crossplane.io/v1
kind: Composition
metadata:
  name: parent
spec:
  compositeTypeRef:
    apiVersion: nop.example.org/v1alpha1
    kind: XNopResource
  mode: Pipeline
  pipeline:
  - step: example
    functionRef:
      name: function-needs-a-secret
    credentials:
    - name: credentials-for-something
      source: Secret
      secretRef:
        namespace: crossplane-system
        name: super-secret
@negz negz self-assigned this Apr 29, 2024
@jbw976
Copy link
Member

jbw976 commented Jun 28, 2024

Here's a demo repo that shows how to use credentials with functions - could be useful for writing the documentation.

https://github.com/jbw976/demo-xfn-creds/

@ytsarev
Copy link
Member

ytsarev commented Dec 10, 2024

There is also a related render capability extension crossplane/crossplane#5976 and https://github.com/cychiang/function-print-secrets/tree/main/example that is useful for testing out constructs like

crossplane render example/xr.yaml example/composition.yaml example/functions.yaml --function-credentials=example/secrets/default.yaml -r

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants