-
Notifications
You must be signed in to change notification settings - Fork 352
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: change KameletBinding name to Pipe #4156
Conversation
@oscerd @lburgazzoli @christophd this PR can change other dependencies around Kamelets world. Once we agree if this is okey, we should also promote the API to |
+1 from my side |
no objections on that renaming. The reason for the renaming is a more generic approach where the binding is also there to bind non-Kamelet (Knative, Kafka) resources with each other, is that correct? |
Yes, that's correct. Mind that we'll need to update Yaks configuration to let the tests here to pass. However I'm not sure how we can do this ahead of time as we have a circular reference between Camel K and Yaks. |
I can take care of updating Yaks and releasing a new version that uses Binding. I think it will be a matter of hours to align with that |
@squakez are removing KameletBinding or making it deprecated ? |
As we are moving to a new version (I still need to create either |
the main issue would be that you cannot upgrade an operator to v2 so I think we should either support KameletBinding and Binding for some time or having an automated upgrade strategy (maybe via a webhook) ? @astefanutti WDYT ? |
what about using new Binding for apiVersion |
That's correct. Right now I am not really thinking in any upgrade strategy. A new major installation has to be performed from scratch. I understand this can result in some problem for any running integration, let me open a separate issue to discuss about a possible solution to this problem. |
@lburgazzoli changing resource names in Kubernetes isn't possible (the name field is immutable after creation), which makes existing versioning and conversion mechanisms inapplicable to this case, e.g., for CRD conversion webhook: Practically, simply changing the CRD name will create a new type, and leave the existing CRD as is, along with its instances, which will be ignored by the v2 operator. To provide a smoother migration path, the simplest option would be to support both KameletBinding and Binding resource types as you suggested. It may also be possible to write an ad-hoc conversion controller as a more advanced strategy. |
@squakez YAKS 0.15.0 has been released with support for the new Binding resources (I hope it works). Could you please update the YAKS version in this PR in GitHub workflow action (https://github.com/apache/camel-k/blob/main/.github/actions/e2e-knative-yaks/action.yml#L109). As YAKS needs to support both KameletBinding and Binding for a while you also need to set an env var when running the tests ( The |
I am starting to think that, in order to ease the upgrade from v1 to v2, it really makes sense to keep both @christophd probably we will need to update Yaks again accordingly. Let's wait until this aspect is clarified, and once the other checks are green, we can have a new release of Yaks as well. |
@squakez YAKS 0.15.0 should be able to work with both KameletBindings and Bindings already. It is based on the apiVersion you set via env var. In order to use the new Binding you have to use |
b009567
to
b55f866
Compare
+1 I understand the complexity but I think is quite not realistic that everyone consuming camel-k APIs would be able to migrate it to v2 straight away |
I managed to have both version of APIs, and in theory we are not needing a webhook because
@astefanutti @lburgazzoli any idea where this is coming from? Mind that there is no change at all between |
It seems, for a reason that is yet to be identified, with If the properties:
additionalProperties:
properties:
default:
description: default is a default value for undefined object
fields.
# type: object
x-kubernetes-preserve-unknown-fields: true
deprecated:
type: boolean
description:
type: string
enum:
items:
description: 'JSON represents any valid JSON value. These
types are supported: bool, int64, float64, string, []interface{},
map[string]interface{} and nil.'
# type: object
x-kubernetes-preserve-unknown-fields: true
type: array
example:
description: 'JSON represents any valid JSON value. These
types are supported: bool, int64, float64, string, []interface{},
map[string]interface{} and nil.'
# type: object
x-kubernetes-preserve-unknown-fields: true Interestingly, that was the intent of #1914, with using the Something added those |
7dcc9a9
to
4e545d7
Compare
b3fa195
to
b2e2c72
Compare
We'll keep v1alpha1 in order to simplify any upgrade from Camel K v1 to v2
This will need to be changed to Pipe as soon as the Yaks model is changed.
May I please ask, how should be tested status of KameletBinding/Pipe in case of upgrade scenario? It needs the prior naming for released operator... |
I think the best upgrade strategy is to leave the KameletBinding type to run from v1 to v2. Then, the user should upgrade from KameletBinding to Pipe manually if this is required, ie, stopping the old KameletBinding and starting a new Pipe with the same KLB spec. |
Maybe wouldn't it be useful to have something like a |
It could, but, since we're planning not to add any further development to the CLI, it is probably some work we don't want to do. I think that any conversion should be done manually. We can come out with some utility script for sure, as in theory, a |
With this PR we aim to change the name of
KameletBinding
to a more genericPipe
. We are also deprecating any usage ofKameletBinding
, altough the resource will be reconciled and will work normally. AlsoKamelet
are promoted fromv1alpha1
tov1
and an automatic conversion is realized by k8s.Closes #2625
Release Note