-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Know what changes in the scaffolds for Golang operators or SDK bundle generate command are required to use kustomize v4 (make bundle does not work with) #5898
Comments
@camilamacedo86 During the triage meeting we felt it would be good to add needs discussion so that this issue can be used to discuss what changes we will need to make throughout Operator SDK to support Kustomize v4. We felt it would allow getting as much input as possible and deciding what the next steps that need to be taken are. I am planning to spend some time looking into this and putting together my thoughts in a comment later. |
Hi @everettraven, Thank you for sharing it with me. That is great you will look at that. I just would like to share that the idea of this task is we identify what/why the make bundle when webhooks are scaffold with kustomize v4 does not work first then we can move with the other steps. Se can use the CLI API to know what plugin key was used to do the scaffold and then perform the code that works with. (For example, as we do with the legacy layout go/v2, see: here). We will probably need to use it in the helper's plugin. |
I spent a bit of time this morning looking into this a little bit more. From what I can tell, this seems to be related to the ordering in which the patches are occurring when using I need to do a little bit more digging when I have a bit more time, but from what I can tell so far this may need to be a change to the I will post more updates here as I find out more. |
I could analyse this one and find why the By running operator-sdk/testdata/go/v3/memcached-operator/config/manifests/kustomization.yaml Lines 9 to 27 in 87cdc50
However, the second container with 4.5.5 is the
NOTE It is not a breaking change described in the Kustomize Release Notes. They do not have a migration guide from v3 to v4 but I could not find it on docs either. c/c @everettraven |
Verified that this works as expected after the PR @camilamacedo86 mentioned in the above comment The default Closing since this is now resolved. Thanks @camilamacedo86 for resolving this! |
Investigation
Describe the problem you need a feature to resolve.
For we are able to support Apple Silicon we need to have the kustomize bin v3 for darwin/arm64 (kubernetes-sigs/kustomize#4612) which seems that will not be provided because v3 is deprecated more than one year ago OR are able to move forward to use kustomize v4.
According to the kustomize release notes, https://github.com/kubernetes-sigs/kustomize/releases/tag/kustomize%2Fv4.0.0 would be possible to use the kustomize v4 with the current scaffold (only the use of special URLs in the resource would be impacted but we do not use it). The other changes introduced with v4 would be a problem only if we begin to change the scaffold (for example move from vars to replacement and then we would begin to generate a new syntax by calling create api/webhooks)
However, the documentation is not very clear about what exactly stops working when we move from v3 to v4. Or how to migrate from v3 to v4.
Therefore, by trying to check SDK with kustomize v4 it breaks the Golang/v3 scaffold when Webhooks are scaffold.
The kustomize syntax used to remove the cert-manager from the CSV fails:
Describe the solution you'd like.
Know what changes in the scaffolds for Golang-based language are required to use kustomize v4.
How to reproduce the scenario:
a) Update the Makefile of the Memcached sample
operator-sdk/testdata/go/v3/memcached-operator/Makefile
Line 166 in 87cdc50
b) Then, run make bundle
You will check the error:
/language go
The text was updated successfully, but these errors were encountered: