-
Notifications
You must be signed in to change notification settings - Fork 546
fix: returning an error when vcluster config schema changed #3386
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
Conversation
3b4afd9 to
c35abd0
Compare
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.
Sorry, but I don't think this solution is what we need here. There is a bigger fundamental problem which is that we try to parse the config when deleting a vCluster again. privateNodes is just one example that now broke, but adding such complexity for an edge cases is not what we should do here. The solution is to fix that we error out when deleting a vCluster, not sure why parsing the vCluster config there is needed anyways.
The config parsing in the cli was introduced because of the CleanUpNamespace, which depends on the If we remove the config parsing, the cleanup function would need to run unconditionally which should be fine, since the function already checks whether managed namespaces exist.
I understand that you're essentially saying we should not rely on the vCluster config when managing resources from cli, but rather on the resource specs themselves, which were generated based on that config is that correct? |
|
@mfranczy yes then lets do it like this, don't parse the vCluster config anymore or just parse the Yes the CLI needs to be vCluster version independent and that also means independent of the vCluster config |
Removing the entire vcluster config parsing logic and replacing it with parsing a generic unstructured to get the sync.toHost.namespaces.enabled
Removing the entire vcluster config parsing logic and replacing it with parsing a generic unstructured to get the sync.toHost.namespaces.enabled Co-authored-by: José Silva <[email protected]> (cherry picked from commit 4fd9823)
Removing the entire vcluster config parsing logic and replacing it with parsing a generic unstructured to get the sync.toHost.namespaces.enabled Co-authored-by: José Silva <[email protected]> (cherry picked from commit 4fd9823)
Removing the entire vcluster config parsing logic and replacing it with parsing a generic unstructured to get the sync.toHost.namespaces.enabled Co-authored-by: José Silva <[email protected]> (cherry picked from commit 4fd9823)
💚 All backports created successfully
Questions ?Please refer to the Backport tool documentation and see the Github Action logs for details |
Removing the entire vcluster config parsing logic and replacing it with parsing a generic unstructured to get the sync.toHost.namespaces.enabled Co-authored-by: José Silva <[email protected]> (cherry picked from commit 4fd9823)
💚 All backports created successfully
Questions ?Please refer to the Backport tool documentation and see the Github Action logs for details |
What issue type does this pull request address? (keep at least one, remove the others)
/kind bugfix
What does this pull request do? Which issues does it resolve? (use
resolves #<issue_number>if possible)resolves ENG-9408
Please provide a short message that should be published in the vcluster release notes
Fixed an issue where vcluster was not being deleted due to the schema difference between vcluster v0.29 and v0.30
What else do we need to know?
Note
Switch deletion to parse Helm values dynamically and check
sync.toHost.namespaces.enabledviaunstructuredto conditionally run namespace cleanup without relying on old config schema.map[string]anyand useunstructured.NestedBoolto readsync.toHost.namespaces.enabled.CleanupSyncedNamespaces(...)on the detected flag, defaulting to disabled on parse errors.config.Configschema and import; addunstructuredimport and debug logs for parse/lookup errors.Written by Cursor Bugbot for commit db2244a. This will update automatically on new commits. Configure here.