Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions bindata/network/ovn-kubernetes/ovnkube-master.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
# The ovnkube control-plane components

# The pod disruption budget ensures that we keep a raft quorum
apiVersion: policy/v1beta1
kind: PodDisruptionBudget
metadata:
name: ovn-raft-quorum-guard
namespace: openshift-ovn-kubernetes
spec:
minAvailable: {{.OVN_MIN_AVAILABLE}}
selector:
matchLabels:
name: ovnkube-master

---

kind: DaemonSet
apiVersion: apps/v1
metadata:
Expand Down Expand Up @@ -95,6 +111,7 @@ spec:
requests:
cpu: 100m
memory: 300Mi
terminationMessagePolicy: FallbackToLogsOnError

# nbdb: the northbound, or logical network object DB. In raft mode
- name: nbdb
Expand Down Expand Up @@ -159,6 +176,10 @@ spec:
sleep 2
done
fi
readinessProbe:
initialDelaySeconds: 30
tcpSocket:
port: {{.OVN_NB_PORT}}
env:
- name: OVN_LOG_LEVEL
value: info
Expand Down Expand Up @@ -188,6 +209,7 @@ spec:
containerPort: {{.OVN_NB_PORT}}
- name: nb-db-raft-port
containerPort: {{.OVN_NB_RAFT_PORT}}
terminationMessagePolicy: FallbackToLogsOnError

# sbdb: The southbound, or flow DB. In raft mode
- name: sbdb
Expand Down Expand Up @@ -253,6 +275,10 @@ spec:
sleep 2
done
fi
readinessProbe:
initialDelaySeconds: 30

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Question, I am not sure how readinessProbes impact hostNetwork pods. But will ovnkube-node be able to communicate with its depedencies in ovnkube-master during the first 30 seconds while ovnkube-master is not ready? Otherwise I suspect we might have a lot of errors logged in those pods (if they don't even CrashLoop?)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very good question. In this case, that won't be an issue, because we're not using a Service / Endpoints. Basically, only Ready pods can show up in a Service. However, we talk directly to the pods, so that's not an issue here.

tcpSocket:
port: {{.OVN_SB_PORT}}
env:
- name: OVN_LOG_LEVEL
value: info
Expand All @@ -278,6 +304,7 @@ spec:
containerPort: {{.OVN_SB_PORT}}
- name: sb-db-raft-port
containerPort: {{.OVN_SB_RAFT_PORT}}
terminationMessagePolicy: FallbackToLogsOnError

# ovnkube master: convert kubernetes objects in to nbdb logical network components
- name: ovnkube-master
Expand Down Expand Up @@ -381,6 +408,7 @@ spec:
ports:
- name: metrics-port
containerPort: 9102
terminationMessagePolicy: FallbackToLogsOnError

nodeSelector:
node-role.kubernetes.io/master: ""
Expand Down
1 change: 1 addition & 0 deletions bindata/network/ovn-kubernetes/ovnkube-node.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,7 @@ spec:
containerPort: 9101
securityContext:
privileged: true
terminationMessagePolicy: FallbackToLogsOnError
volumeMounts:
# for the iptables wrapper
- mountPath: /host
Expand Down
1 change: 1 addition & 0 deletions pkg/network/ovn_kubernetes.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ func renderOVNKubernetes(conf *operv1.NetworkSpec, bootstrapResult *bootstrap.Bo
data.Data["OVN_NB_RAFT_PORT"] = OVN_NB_RAFT_PORT
data.Data["OVN_SB_RAFT_PORT"] = OVN_SB_RAFT_PORT
data.Data["OVN_NODES"] = strings.Join(bootstrapResult.OVN.OVNMasterNodes, " ")
data.Data["OVN_MIN_AVAILABLE"] = len(bootstrapResult.OVN.OVNMasterNodes)/2 + 1

var ippools string
for _, net := range conf.ClusterNetwork {
Expand Down