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

Issue with using function-cidr in a pipeline #32

Closed
anessi opened this issue May 30, 2024 · 5 comments · Fixed by #33
Closed

Issue with using function-cidr in a pipeline #32

anessi opened this issue May 30, 2024 · 5 comments · Fixed by #33

Comments

@anessi
Copy link
Contributor

anessi commented May 30, 2024

I tried to use this function in a minimalistic pipeline using the following snippet (metadata removed):

apiVersion: apiextensions.crossplane.io/v1
kind: Composition
spec:
  mode: Pipeline
  pipeline:
    # https://github.com/upbound/function-cidr/blob/main/package/input/cidr.fn.crossplane.io_parameters.yaml
    # https://github.com/upbound/function-cidr/blob/main/apis/composition.yaml
    - step: cidr-subnets
      functionRef:
        name: function-cidr
      input:
        apiVersion: cidr.fn.crossplane.io/v1beta1
        kind: Parameters
        cidrFunc: cidrsubnets
        prefix: 10.0.0.0/20
        newBits:
          - 1
          - 1
    - step: ready
      functionRef:
        name: function-auto-ready

However I get the following error:

    message: 'cannot compose resources: pipeline step "cidr-subnets" returned a fatal result: invalid Function input: parameters: Required value: cidrFunc is required'

When I run the examples in the repo locally using make render it works fine with Docker.

I'm using version v0.4.0 of function-cidr with crossplane v1.15.2-up.1.

Do you have any idea what is going wrong here?

@anessi
Copy link
Contributor Author

anessi commented Jun 5, 2024

This issue has been fixed in the referenced PR. Happy to get feedback on this.
The function is available at https://marketplace.upbound.io/account/anessi/function-cidr

@willjw1
Copy link

willjw1 commented Jun 27, 2024

Would love to have this fix merged in and a new version of function-cidr released where I could use this. I tried to click on the above link and it didn't take me anywhere.

@anessi
Copy link
Contributor Author

anessi commented Jul 1, 2024

@willjw1 : I guess in that case the above link only works after login (did not realize this, sorry).
However, you should be able to use:

apiVersion: pkg.crossplane.io/v1beta1
kind: Function
metadata:
  name: function-cidr
spec:
  package: xpkg.upbound.io/anessi/function-cidr:v0.5.4

to pull my version. Will look at the comments on the PR today and hopefully this can be merged soon.

@willjw1
Copy link

willjw1 commented Jul 24, 2024

Any movement? Would still be great to have this in?

@anessi
Copy link
Contributor Author

anessi commented Jul 29, 2024

@willjw1 : the PR #33 is waiting for approval and merge by a maintainer

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

Successfully merging a pull request may close this issue.

2 participants