Skip to content

Commit 4cb9162

Browse files
author
Huanle Han
committed
Merge remote-tracking branch 'origin/release-0.5-2020' into release-0.5-best
2 parents 6d2607b + f286ead commit 4cb9162

2 files changed

Lines changed: 17 additions & 1 deletion

File tree

pkg/provider/ipvsdr/ipvsdr.go

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -313,6 +313,7 @@ func (f *ipvsdr) generateDeployment(lb *lbapi.LoadBalancer) *appsv1.Deployment {
313313
terminationGracePeriodSeconds := int64(30)
314314
hostNetwork := true
315315
dnsPolicy := v1.DNSClusterFirstWithHostNet
316+
hostPathFileOrCreate := v1.HostPathFileOrCreate
316317
replicas, _ := lbutil.CalculateReplicas(lb)
317318
privileged := true
318319
maxSurge := intstr.FromInt(0)
@@ -448,6 +449,11 @@ func (f *ipvsdr) generateDeployment(lb *lbapi.LoadBalancer) *appsv1.Deployment {
448449
MountPath: "/lib/modules",
449450
ReadOnly: true,
450451
},
452+
{
453+
Name: "xtables-lock",
454+
MountPath: "/run/xtables.lock",
455+
ReadOnly: false,
456+
},
451457
},
452458
},
453459
},
@@ -460,6 +466,15 @@ func (f *ipvsdr) generateDeployment(lb *lbapi.LoadBalancer) *appsv1.Deployment {
460466
},
461467
},
462468
},
469+
{
470+
Name: "xtables-lock",
471+
VolumeSource: v1.VolumeSource{
472+
HostPath: &v1.HostPathVolumeSource{
473+
Path: "/run/xtables.lock",
474+
Type: &hostPathFileOrCreate,
475+
},
476+
},
477+
},
463478
},
464479
},
465480
},

pkg/proxy/nginx/config.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,8 @@ func (f *nginx) updateIfHasUnmanagedConfig(lb *lbapi.LoadBalancer, cm *v1.Config
178178

179179
var unmanagedConifgs map[string]string
180180
// we consider that configs may contains unmanaged config only if cm is not marked (oldExternalConfigMaps is empty).
181-
if len(oldExternalConfigMaps) == 0 {
181+
if len(oldExternalConfigMaps) == 0 ||
182+
(len(oldExternalConfigMaps) == 1 && oldExternalConfigMaps[0] == "") {
182183
unmanagedConifgs = mapDel(cm.Data, defaultConfig, managedConfig)
183184
}
184185

0 commit comments

Comments
 (0)