Skip to content
Merged
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,9 @@ spec:
```

### Configuring OVNKubernetes
OVNKubernetes supports the following configuration options, all of which are optional:
OVNKubernetes supports the following configuration options, all of which are optional and once set at cluster creation, they can't be changed:
* `MTU`: The MTU to use for the geneve overlay. The default is the MTU of the node that the cluster-network-operator is first run on, minus 100 bytes for geneve overhead. If the nodes in your cluster don't all have the same MTU then you may need to set this explicitly.
* `genevePort`: The UDP port to use for the Geneve overlay. The default is 6081.

These configuration flags are only in the Operator configuration object.

Expand All @@ -144,6 +145,7 @@ spec:
type: OVNKubernetes
ovnKubernetesConfig:
mtu: 1400
genevePort: 6081
```

Additionally, you can configure per-node verbosity for ovn-kubernetes. This is useful
Expand Down Expand Up @@ -366,7 +368,7 @@ spec:
The operator is expected to run as a pod (via a Deployment) inside a kubernetes cluster. It will retrieve the configuration above and reconcile the desired configuration. A suitable manifest for running the operator is located in `manifests/`.

## Unsafe changes
Most network changes are unsafe to roll out to a production cluster. Therefore, the network operator will stop reconciling if it detects that an unsafe change has been requested.
Most network changes are unsafe to roll out to a production cluster. Therefore, the network operator will stop reconciling if it detects that an unsafe change has been requested.

### Safe changes to apply:
It is safe to edit the following fields in the Operator configuration:
Expand Down
24 changes: 19 additions & 5 deletions bindata/network/ovn-kubernetes/004-config.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,25 @@
---
# The network cidr and service cidr are set in the ovn-config configmap
# The ovnconfig config file. Used by both node and master processes.
kind: ConfigMap
apiVersion: v1
metadata:
name: ovn-config
name: ovnkube-config
namespace: openshift-ovn-kubernetes
data:
net_cidr: {{.OVN_cidr}}
svc_cidr: {{.OVN_service_cidr}}
k8s_apiserver: "{{.K8S_APISERVER}}"
ovnkube.conf: |-
[default]
mtu="{{.MTU}}"
cluster-subnets="{{.OVN_cidr}}"
encap-port="{{.GenevePort}}"

[kubernetes]
service-cidr="{{.OVN_service_cidr}}"
ovn-config-namespace="openshift-ovn-kubernetes"
apiserver="{{.K8S_APISERVER}}"

[logging]
logfile="/dev/stdout"

[gateway]
mode=local
nodeport=true
2 changes: 1 addition & 1 deletion bindata/network/ovn-kubernetes/005-service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ metadata:
namespace: openshift-ovn-kubernetes
spec:
selector:
name: ovnkube-master
app: ovnkube-master
ports:
- name: north
port: {{.OVN_NB_PORT}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ spec:
message: |
there is no running ovn-kubernetes master
expr: |
absent(up{job="ovn-kubernetes-master",namespace="openshift-ovn-kubernetes"} ==1)
absent(up{job="ovnkube-master",namespace="openshift-ovn-kubernetes"} ==1)
for: 10m
labels:
severity: warning
Expand Down
10 changes: 6 additions & 4 deletions bindata/network/ovn-kubernetes/monitor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
labels:
name: ovnkube-master
app: ovnkube-master
annotations:
networkoperator.openshift.io/ignore-errors: ""
name: monitor-ovn-master
Expand All @@ -18,19 +18,20 @@ spec:
- openshift-ovn-kubernetes
selector:
matchLabels:
name: ovnkube-master
app: ovnkube-master
---
apiVersion: v1
kind: Service
metadata:
labels:
name: ovnkube-master
app: ovnkube-master
name: ovn-kubernetes-master
namespace: openshift-ovn-kubernetes
spec:
selector:
name: ovnkube-master
app: ovnkube-master
clusterIP: None
publishNotReadyAddresses: true
ports:
- name: metrics
port: 9102
Expand Down Expand Up @@ -72,6 +73,7 @@ spec:
selector:
app: ovnkube-node
clusterIP: None
publishNotReadyAddresses: true
ports:
- name: metrics
port: 9101
Expand Down
Loading