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

Schemaless properties not supported in CEL template #162

Open
MisterMX opened this issue Dec 9, 2024 · 0 comments
Open

Schemaless properties not supported in CEL template #162

MisterMX opened this issue Dec 9, 2024 · 0 comments
Labels
kind/bug Something isn't working

Comments

@MisterMX
Copy link

MisterMX commented Dec 9, 2024

Description

Observed Behavior:

When building an object in an RG that has an unstructured property marked with x-kubernetes-preserve-unknown-fields: true in the CRD schema, Kro fails the validation with an error:

failed to build resource 'vcluster': failed to extract CEL expressions from schema for resource vcluster: error getting field schema for path spec.forProvider.values.syncer: schema not found for field syncer

The template looks as follows:

spec:
  templates:
    - id: vcluster
      template:
        apiVersion: helm.crossplane.io/v1beta1
        kind: Release
        spec:
          forProvider:
            values: # <-- unstructured
              syncer:
                extraArgs:
                  - ${"--out-kube-config-server=https://" + schema.metadata.namespace + "." + schema.metadata.name + ".svc"}
                  - ${"--tls-san=" + schema.metadata.namespace + "." + schema.metadata.name + ".svc"}

In our case we are trying to create Release object from Crossplane provider-helm.

Expected Behavior:

The release should be created without any error messages, as any kind of property can be put at spec.forProvider.values.

Reproduction Steps (Please include ResourceGroup and Instances files):

  • Install provider-helm CRDs
  • Create RG with template above.

Versions:

  • kro version: v0.1.0
  • Kubernetes Version (kubectl version): v1.29.2 (kind)

Involved Controllers:
n.a.

Error Logs (if applicable)**:
n.a.

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Which option describes the most your issue?

No response

@MisterMX MisterMX added the kind/bug Something isn't working label Dec 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant