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
Add explicit token for Kubeapps cluster reference #5566
Conversation
Signed-off-by: Rafa Castelblanque <rcastelblanq@vmware.com>
✅ Deploy Preview for kubeapps-dev canceled.
|
Signed-off-by: Rafa Castelblanque <rcastelblanq@vmware.com>
Signed-off-by: Rafa Castelblanque <rcastelblanq@vmware.com>
Signed-off-by: Rafa Castelblanque <rcastelblanq@vmware.com>
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.
Great, thanks for the change. I guess this only is addressing the backend changes, but Anthony's PR (#4613) would still be required, wouldn't it?
Besides, don't we also need to apply these changes in other packages?
For instance: if cluster != ""
(see below)
Anyway, +1ing in case you want to tackle the rest in another PR, if needed,
cluster := request.GetContext().GetCluster()
if cluster != "" && cluster != s.kubeappsCluster {
return nil, status.Errorf(
codes.Unimplemented,
"not supported yet: request.Context.Cluster: [%v]",
cluster)
}
Not really. It is enough with the backend handling the Kubeapps cluster name correctly, even when the cluster is not available in the list. I have tested it and are preparing a CI E2E test to avoid regression on this again.
Not needed neither in this case: if cluster != "" && cluster != s.kubeappsCluster { because:
|
…ist (#5573) ### Description of the change This PR adds an E2E test in CI to avoid regression on #5566 and hence to avoid that #4564 happens again. ### Benefits Kubeapps is usable even if Kubeapps cluster is not among the clusters configured. ### Possible drawbacks N/A ### Applicable issues - fixes #4563 Signed-off-by: Rafa Castelblanque <rcastelblanq@vmware.com>
Possible to get this fix backported? As of https://github.com/vmware-tanzu/kubeapps/releases/tag/v2.4.6 it sounds like you need k8s version > 1.21, but we're on 1.20.X and can't easily upgrade for a while. |
We don't currently do branched releases (where we support previous releases with bug fixes etc.), so your best bet, if you were unable to upgrade your cluster (and have verified that the latest Kubeapps does not work on the older cluster - often we specify that based on the internal k8s client that we import, not because it's not compatible), would be to see if you can backport the fix to your own |
Signed-off-by: Rafa Castelblanque rcastelblanq@vmware.com
Description of the change
Adapted version of the outdated PR #4591. After removing kubeops, there has been a refactor of places changes by the old PR.
It fixes the scenario in which the cluster where Kubeapps is installed is not part of the configured list of clusters.
For example:
For doing so, it uses a token to reference the Kubeapps cluster:
-
.Also empty string
''
is accepted as cluster reference, for allowing payloads in which there is no cluster specified in context.Therefore, if a cluster string is empty or
-
, backend logic assumes that the Kubeapps cluster will be used.Benefits
User can work in a multicluster setups in which the Kubeapps cluster is not part of the allowed clusters.
Possible drawbacks
N/A
Applicable issues
Additional information
Manual tests have been done with Helm plugin (only one working in multicluster so far).
CI E2E test will be done in #4563