-
Notifications
You must be signed in to change notification settings - Fork 81
upgrade cmd: using ICPS to compare changes between current install and target install. #671
Conversation
Relates to this one: BTW, is there any ETA for merging? Is there anything I can help with? |
Hey Bohdan, can you elaborate why this is related to istio/istio#19398? |
@elfinhe Because you can't use exiting IstioControlPlane API to control telemetry components (like istio) AND some parameters from Helm are not supported (I've provided values.kiali.tolerations as an example). I might be wrong though, checking this PR right now. |
@nick4fake thanks, this PR is addressing some upgrade-specific validation issue, i.e., choosing which part in ICPS to validate for upgrade. so I think it is not related. In #19398, I think Xinnan will do something to fix the helm values issue. |
@elfinhe Understood, I've created a separate issue |
cmd/mesh/upgrade.go
Outdated
if diff == "" { | ||
l.logAndPrintf("Upgrade check: Values unchanged. The target values are identical to the current values.\n") | ||
l.logAndPrintf("Upgrade check: ICPS unchanged. The target values are identical to the current values.\n") | ||
} else { | ||
l.logAndPrintf("Upgrade check: Warning!!! The following values will be changed as part of upgrade. "+ | ||
"If you have not overridden these values, they will change in your cluster. Please double check they are correct:\n%s", diff) |
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.
"If you have not overridden these values" doesn't seem to be applicable anymore because this is exactly what we're checking for.
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.
Fixed.
cmd/mesh/upgrade.go
Outdated
// It separately returns a string which represents just the overlay values in the returned ICPS. | ||
func genOverlayICPS(filename string, force bool) (string, *v1alpha2.IstioControlPlaneSpec, error) { | ||
// genOverlayICPS reads an ICPS from filename and returns the YAML of it | ||
func genOverlayICPS(filename string) (string, error) { |
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.
Is this function still necessary? We seem to be just reading a file and returning the contents, not generating anything.
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.
Fixed.
032e88d
to
dfeecbc
Compare
In response to a cherrypick label: #671 failed to apply on top of branch "release-1.4":
|
Fix: istio/istio#19135
Before this change, we used the values in Values API from the configmap of istio-sidecar-injector and the generated ICPS Values section, as the source of old and new installation configurations, which can cause some problems described in istio/istio#19135.
This PR switches the comparison from Values-based to ICPS-based.
Related: istio/istio#19451
I also get the kubectl outputs back at cmd/mesh/manifest-common.go:L85, which was removed by mistake, I think.