mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-03 01:06:27 +00:00
fix inconsistency in updating hns policy
This commit is contained in:
parent
c1ad6e961a
commit
524de768bb
@ -517,7 +517,7 @@ func CleanupLeftovers() (encounteredError bool) {
|
||||
|
||||
func (svcInfo *serviceInfo) cleanupAllPolicies(endpoints []*endpointsInfo) {
|
||||
Log(svcInfo, "Service Cleanup", 3)
|
||||
if svcInfo.policyApplied {
|
||||
// Skip the svcInfo.policyApplied check to remove all the policies
|
||||
svcInfo.deleteAllHnsLoadBalancerPolicy()
|
||||
// Cleanup Endpoints references
|
||||
for _, ep := range endpoints {
|
||||
@ -526,7 +526,6 @@ func (svcInfo *serviceInfo) cleanupAllPolicies(endpoints []*endpointsInfo) {
|
||||
|
||||
svcInfo.policyApplied = false
|
||||
}
|
||||
}
|
||||
|
||||
func (svcInfo *serviceInfo) deleteAllHnsLoadBalancerPolicy() {
|
||||
// Remove the Hns Policy corresponding to this service
|
||||
|
Loading…
Reference in New Issue
Block a user