Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/release-0.5-2020' into release-0…
Browse files Browse the repository at this point in the history
….5-best
  • Loading branch information
Huanle Han committed Jul 28, 2020
2 parents 6d2607b + f286ead commit 4cb9162
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
15 changes: 15 additions & 0 deletions pkg/provider/ipvsdr/ipvsdr.go
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,7 @@ func (f *ipvsdr) generateDeployment(lb *lbapi.LoadBalancer) *appsv1.Deployment {
terminationGracePeriodSeconds := int64(30)
hostNetwork := true
dnsPolicy := v1.DNSClusterFirstWithHostNet
hostPathFileOrCreate := v1.HostPathFileOrCreate
replicas, _ := lbutil.CalculateReplicas(lb)
privileged := true
maxSurge := intstr.FromInt(0)
Expand Down Expand Up @@ -448,6 +449,11 @@ func (f *ipvsdr) generateDeployment(lb *lbapi.LoadBalancer) *appsv1.Deployment {
MountPath: "/lib/modules",
ReadOnly: true,
},
{
Name: "xtables-lock",
MountPath: "/run/xtables.lock",
ReadOnly: false,
},
},
},
},
Expand All @@ -460,6 +466,15 @@ func (f *ipvsdr) generateDeployment(lb *lbapi.LoadBalancer) *appsv1.Deployment {
},
},
},
{
Name: "xtables-lock",
VolumeSource: v1.VolumeSource{
HostPath: &v1.HostPathVolumeSource{
Path: "/run/xtables.lock",
Type: &hostPathFileOrCreate,
},
},
},
},
},
},
Expand Down
3 changes: 2 additions & 1 deletion pkg/proxy/nginx/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,8 @@ func (f *nginx) updateIfHasUnmanagedConfig(lb *lbapi.LoadBalancer, cm *v1.Config

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

Expand Down

0 comments on commit 4cb9162

Please sign in to comment.