mirror of https://github.com/kubernetes/kops.git
Apply: Migration from CSA to SSA: set the operation to Apply
If we don't, the (kops,Update) managed blocks are treated as different from the (kops,Apply) block. This causes conflicts when the two blocks specific incompatible values. Issue #14520 (I believe it is the fix!)
This commit is contained in:
parent
46d33317a4
commit
32cb151419
|
@ -191,6 +191,11 @@ func createManagedFieldPatch(currentObject *unstructured.Unstructured) ([]byte,
|
|||
fixedManagedField := managedField.DeepCopy()
|
||||
if managedField.Manager == "kubectl-edit" || managedField.Manager == "kubectl-client-side-apply" {
|
||||
fixedManagedField.Manager = "kops"
|
||||
fixedManagedField.Operation = "Apply"
|
||||
}
|
||||
// In case we have a kops & Update manager
|
||||
if fixedManagedField.Manager == "kops" && fixedManagedField.Operation == "Update" {
|
||||
fixedManagedField.Operation = "Apply"
|
||||
}
|
||||
fixedManagedFields = append(fixedManagedFields, *fixedManagedField)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue