-
Notifications
You must be signed in to change notification settings - Fork 344
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
Don't write to platform spec to allow upgrades #1127
Don't write to platform spec to allow upgrades #1127
Conversation
@nicolaferraro, just thinking out loud, would using the
|
Yeah, I've thought to the last-applied-config as well, but semantically in Kube it serves to a different purpose. Having it as an annotation also make it difficult to understand the content when you inspect it. It's also difficult, in case one changes with I think we've done a similar thing to this PR also in Integration (e.g. you see many fields, like dependencies in both |
Totally agree with this. |
Looks much nicer now:
|
pkg/cmd/install.go
Outdated
@@ -25,6 +25,7 @@ import ( | |||
|
|||
"github.com/apache/camel-k/pkg/util/registry" | |||
"go.uber.org/multierr" | |||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1" |
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.
nit: use the metav1
alias as it's used elsewhere.
LGTM! |
72433b1
to
76a66b5
Compare
Without this, upgrades to newer versions are not possible, as we used to encode even defaults in the platform specs, but defaults change in every new version (e.g. for instance the default Camel version).
I've moved the full platform config in a
fullConfig
field in thestatus
, to allow it to be inspected and at the same time to allow the users to set their preference only on what matters for them.A typical platform on Minikube now looks like:
Note that only the relevant information (registry address and kind) are present in spec, all other values are computed in the status.
The
fullConfig
is kept in sync by the platform controller.Release Note