Skip to content

Commit

Permalink
Merge pull request #2154 from JacobTanenbaum/release-4.14-OCPBUGS-18281
Browse files Browse the repository at this point in the history
[release-4.14] OCPBUGS-18281: only 2 master nodes are required for ovn-kubernetes
  • Loading branch information
openshift-merge-bot[bot] committed Feb 14, 2024
2 parents b7ebd94 + 3276879 commit 837a9e1
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ spec:
selector:
matchLabels:
app: ovnkube-control-plane
replicas: {{.OvnkubeMasterReplicas}}
{{ if (gt .OvnkubeMasterReplicas 1)}}
replicas: {{.ClusterManagerReplicas}}
{{ if (gt .ClusterManagerReplicas 1)}}
strategy:
type: RollingUpdate
rollingUpdate:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ metadata:
This deployment launches the ovn-kubernetes controller (control-plane) networking components.
release.openshift.io/version: "{{.ReleaseVersion}}"
spec:
replicas: {{.OvnkubeMasterReplicas}}
replicas: {{.ClusterManagerReplicas}}
selector:
matchLabels:
app: ovnkube-control-plane
Expand Down
8 changes: 7 additions & 1 deletion pkg/network/ovn_kubernetes.go
Original file line number Diff line number Diff line change
Expand Up @@ -409,8 +409,14 @@ func renderOVNKubernetes(conf *operv1.NetworkSpec, bootstrapResult *bootstrap.Bo
data.Data["OVN_MULTI_NETWORK_POLICY_ENABLE"] = true
}

commonManifestDir := filepath.Join(manifestDir, "network/ovn-kubernetes/common")
//there only needs to be two cluster managers
clusterManagerReplicas := 2
if len(bootstrapResult.OVN.MasterAddresses) < 2 {
clusterManagerReplicas = len(bootstrapResult.OVN.MasterAddresses)
}
data.Data["ClusterManagerReplicas"] = clusterManagerReplicas

commonManifestDir := filepath.Join(manifestDir, "network/ovn-kubernetes/common")
cmPaths := []string{
filepath.Join(commonManifestDir, "008-script-lib.yaml"),
}
Expand Down

0 comments on commit 837a9e1

Please sign in to comment.