-
Notifications
You must be signed in to change notification settings - Fork 1
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
feat: xfn v1beta implementation #1
Conversation
Signed-off-by: Philippe Scorsolini <[email protected]>
Signed-off-by: Philippe Scorsolini <[email protected]>
To test it:
Now, given an image FROM alpine:3.18
RUN apk add --no-cache jq
ENTRYPOINT ["/bin/sh", "-c", "jq '.desired.composite.resource.labels |= {\"labelizer.xfn.crossplane.io/processed\": \"true\"} + .'"] If we run the following command:
We get back:
Which is indeed the desired output. |
Signed-off-by: Philippe Scorsolini <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@phisco If it's not too hard to do, could you "refactor" this PR such that it starts with a plain copy of the code from c/c in one commit, with your changes as an overlay in separate commits? This will make it easier to just review the changes.
"github.com/crossplane/crossplane/apis/apiextensions/fn/proto/v1beta1" | ||
|
||
"github.com/upbound/xfn-oci/cmd/xfn-oci/internal/config" | ||
v1beta12 "github.com/upbound/xfn-oci/internal/container" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this being imported as v1beta12
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess the IDE picked that name at some point, I will review import aliases once I rebase it on top of #2.
"github.com/google/go-containerregistry/pkg/name" | ||
"github.com/google/uuid" | ||
runtime "github.com/opencontainers/runtime-spec/specs-go" | ||
proto2 "google.golang.org/protobuf/proto" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this proto2
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same as above
I did a few more changes than the minimum required ones, but I think I still have a branch with both the implementation working with just a switch, so I can definitely try to make it more understandable. |
Initial move of xfn from the in-tree implementation, only implementing the new v1beta1 interface.