crossplane-contrib / function-patch-and-transform

A patch & transform composition function
https://crossplane.io
Apache License 2.0
23 stars 24 forks source link

How to enable DEBUG log level for Composite Function? #121

Closed jingav closed 4 months ago

jingav commented 4 months ago

Hi there,

In the Crossplane v1.13, it was possible to enable debugging for Composite Functions when enabling them.

helm install crossplane --namespace crossplane-system crossplane-stable/crossplane \
    --create-namespace \
    --set "args='{--debug,--enable-composition-functions}'" \
    --set "xfn.enabled=true" \
    --set "xfn.args='{--debug}'"

https://web.archive.org/web/20230924000034/https://docs.crossplane.io/v1.13/concepts/composition-functions/

This does not seem to apply for Crossplane from v1.14 onwards.

      - args:
          - --enable-composition-revisions
          - --enable-environment-configs
          - --enable-composition-webhook-schema-validation
          - --enable-usages
          - --enable-ssa-claims
          # - --poll-interval=15s
          # - --enable-realtime-compositions
          - --enable-composition-functions=true # default
          - --enable-composition-functions-extra-resources=true # default
          - --debug
      - xfn:
          args:
            - --debug

Is there a way how to enable it again?

We would like to see DEBUG level in the logs. k logs -n crossplane-system function-patch-and-transform-3160a4debc89-6df6c75d89-s628t -f

Thank you, Jindra

negz commented 4 months ago

When you deploy the function, use a DeploymentRuntimeConfig to specify the --debug flag.

This isn't documented for function packages specifically, but it's the same as a provider package - see:

https://docs.crossplane.io/v1.16/concepts/providers/#runtime-configuration