-
Notifications
You must be signed in to change notification settings - Fork 65
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
Drop v1alpha1 or add conversion webhooks #213
Comments
We faced a problem with the provider-helm in one environment, we using a few old v1alpha1 releases. |
|
IIUC, the problem here is different than what crossplane/crossplane#4402 solves. We bumped from v1alpha1 to v1beta1 and marked v1beta1 as the storage version and have both versions in the version list different than what was happening on Crossplane side. I suspect the problem here is still having |
The info was more that if we drop v1alpha1 we need to do something - we see in resourceRefs v1beta1 - so something is strange with fields we only have in v1beta1 when the resource was initial created as v1alpha1 - i guess in etcd the resource is still v1alpha1 ? |
|
Assuming a recent enough provider-helm is running, I would be surprised if that is the case since we are marking v1beta1 as the storage version. Having some reproduction steps would be helpful to dig further on my side, currently, I don't have much idea on what is going on TBH. |
@turkenh remember we set storage version v1beta1 lot of releases ago - what happen with users still using v1alpha1 before this time and want to switch to v1beta1 ? |
This looks like an instance of the misunderstanding of Kube versions in the helm provider types, i.e. what I tweeted in https://twitter.com/the_sttts/status/1771257423614836820. In code, these https://github.com/crossplane-contrib/provider-helm/blob/master/apis/release/v1beta1/types.go#L77 This is "forbidden" in Kube API versions. |
We had an async chat with @sttts, and now I have a better understanding of what he means. For this specific case, though, I would like to better understand what is really going on before taking an action. |
https://github.com/haarchri/issue-helm-213 create release first with v1alpha1 https://github.com/haarchri/issue-helm-213/blob/main/apis/composition.yaml#L22 reproduce the issue:
|
Thanks @haarchri! I believe this is something happening with function pipeline only which uses Server Side Apply. In the release object managed fields, I see we still have
I see the following options here:
None of the options are exclusive to each other, but any of them would fix the issue. A 4th option is running a manual migration as follows (which could be used as a workaround): # assuming it is the 0th element, not sure if it is always the case. Update the index otherwise.
kubectl patch releases.helm.crossplane.io <release-name> --type='json' -p='[{"op": "replace", "path": "/metadata/managedFields/0/apiVersion", "value": "helm.crossplane.io/v1beta1"}]' |
If we were voting I would +1 both:
🚀 |
What problem are you facing?
When debugging a composition I was getting the following error.
cannot compose resources: cannot apply composed resource "spotinstance-controller": failed to create typed patch object (/jc01-fqjml-5m4c8; helm.crossplane.io/v1alpha1, Kind=Release): .spec.forProvider.skipCreateNamespace: field not declared in schema
This was confusing since the CRD on the cluster clearly had the field. What I did not immediately recognize was that we were using v1alpha1 in the patch and transform not v1beta1.
@haarchri thanks for your keen 👁️
How could Crossplane help solve your problem?
Drop v1alpha1
The text was updated successfully, but these errors were encountered: