Skip to content

Commit

Permalink
Merge branch 'master' into migration
Browse files Browse the repository at this point in the history
  • Loading branch information
pliurh committed Sep 23, 2020
2 parents 81fcbeb + fb76143 commit 111cf18
Show file tree
Hide file tree
Showing 9 changed files with 210 additions and 50 deletions.
2 changes: 1 addition & 1 deletion Dockerfile.rhel7
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM registry.svc.ci.openshift.org/ocp/builder:rhel-8-golang-openshift-4.6 AS builder
FROM registry.svc.ci.openshift.org/ocp/builder:rhel-8-golang-1.15-openshift-4.6 AS builder
WORKDIR /go/src/github.com/openshift/cluster-network-operator
COPY . .
RUN hack/build-go.sh; \
Expand Down
12 changes: 10 additions & 2 deletions bindata/network/kuryr/005-daemon.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,14 @@ spec:
priorityClassName: system-node-critical
initContainers:
- name: block-mcs
image: {{ .CNIPluginsImage }}
securityContext:
privileged: true
image: {{ .DaemonImage }}
command:
- /bin/sh
- -c
- |
#!/bin/sh
set -x -e
# Block MCS
Expand All @@ -48,6 +47,12 @@ spec:
ip6tables -A OUTPUT -p tcp -m tcp --dport 22624 -j REJECT || true
ip6tables -A FORWARD -p tcp -m tcp --dport 22623 -j REJECT || true
ip6tables -A FORWARD -p tcp -m tcp --dport 22624 -j REJECT || true
volumeMounts:
# for the iptables wrapper
- mountPath: /host
name: host-slash
readOnly: true
mountPropagation: HostToContainer
containers:
- name: kuryr-cni
image: {{ .DaemonImage }}
Expand Down Expand Up @@ -103,6 +108,9 @@ spec:
- name: metrics-port
containerPort: 9655
volumes:
- name: host-slash
hostPath:
path: /
- name: bin
hostPath:
path: {{.CNIBinDir}}
Expand Down
2 changes: 1 addition & 1 deletion bindata/network/openshift-sdn/001-crd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@ spec:
- type
type: object
type: array
maxItems: 50
maxItems: 1000
required:
- egress
type: object
Expand Down
13 changes: 13 additions & 0 deletions bindata/network/ovn-kubernetes/004-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,23 @@ data:
service-cidrs="{{.OVN_service_cidr}}"
ovn-config-namespace="openshift-ovn-kubernetes"
apiserver="{{.K8S_APISERVER}}"
{{- if .OVNHybridOverlayEnable }}
no-hostsubnet-nodes="kubernetes.io/os=windows"
{{- end }}

[ovnkubernetesfeature]
enable-egress-ip=true

[gateway]
mode=local
nodeport=true
{{ if .OVNHybridOverlayEnable }}
[hybridoverlay]
enabled=true
{{- if .OVNHybridOverlayNetCIDR }}
cluster-subnets="{{.OVNHybridOverlayNetCIDR}}"
{{- end }}
{{- if .OVNHybridOverlayVXLANPort}}
hybrid-overlay-vxlan-port="{{.OVNHybridOverlayVXLANPort}}"
{{- end }}
{{- end }}
16 changes: 2 additions & 14 deletions bindata/network/ovn-kubernetes/ovnkube-master.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -528,24 +528,13 @@ spec:
set +o allexport
fi
hybrid_overlay_flags=
if [[ -n "{{.OVNHybridOverlayEnable }}" ]]; then
hybrid_overlay_flags="--enable-hybrid-overlay --no-hostsubnet-nodes=kubernetes.io/os=windows"
if [[ -n "{{.OVNHybridOverlayNetCIDR}}" ]]; then
hybrid_overlay_flags="${hybrid_overlay_flags} --hybrid-overlay-cluster-subnets={{.OVNHybridOverlayNetCIDR}}"
fi
if [[ -n "{{.OVNHybridOverlayVXLANPort}}" ]]; then
hybrid_overlay_flags="${hybrid_overlay_flags} --hybrid-overlay-vxlan-port={{.OVNHybridOverlayVXLANPort}}"
fi
fi
gateway_mode_flags=
# Check to see if ovs is provided by the node. This is only for upgrade from 4.5->4.6 or
# openshift-sdn to ovn-kube conversion
if grep -q OVNKubernetes /etc/systemd/system/ovs-configuration.service ; then
gateway_mode_flags="--gateway-mode shared --gateway-interface br-ex"
gateway_mode_flags="--gateway-mode local --gateway-interface br-ex"
else
gateway_mode_flags="--gateway-mode local"
gateway_mode_flags="--gateway-mode local --gateway-interface none"
fi
# start nbctl daemon for caching
Expand All @@ -564,7 +553,6 @@ spec:
--config-file=/run/ovnkube-config/ovnkube.conf \
--ovn-empty-lb-events \
--loglevel "${OVN_KUBE_LOG_LEVEL}" \
${hybrid_overlay_flags} \
--metrics-bind-address "127.0.0.1:29102" \
${gateway_mode_flags} \
--sb-address "{{.OVN_SB_DB_LIST}}" \
Expand Down
15 changes: 2 additions & 13 deletions bindata/network/ovn-kubernetes/ovnkube-node.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -119,24 +119,14 @@ spec:
done
echo "I$(date "+%m%d %H:%M:%S.%N") - starting ovnkube-node db_ip ${db_ip}"
hybrid_overlay_flags=
if [[ -n "{{.OVNHybridOverlayEnable}}" ]]; then
hybrid_overlay_flags="--enable-hybrid-overlay --no-hostsubnet-nodes=kubernetes.io/os=windows"
if [[ -n "{{.OVNHybridOverlayNetCIDR}}" ]]; then
hybrid_overlay_flags="${hybrid_overlay_flags} --hybrid-overlay-cluster-subnets={{.OVNHybridOverlayNetCIDR}}"
fi
if [[ -n "{{.OVNHybridOverlayVXLANPort}}" ]]; then
hybrid_overlay_flags="${hybrid_overlay_flags} --hybrid-overlay-vxlan-port={{.OVNHybridOverlayVXLANPort}}"
fi
fi
gateway_mode_flags=
# Check to see if ovs is provided by the node. This is only for upgrade from 4.5->4.6 or
# openshift-sdn to ovn-kube conversion
if grep -q OVNKubernetes /etc/systemd/system/ovs-configuration.service ; then
gateway_mode_flags="--gateway-mode shared --gateway-interface br-ex"
gateway_mode_flags="--gateway-mode local --gateway-interface br-ex"
else
gateway_mode_flags="--gateway-mode local"
gateway_mode_flags="--gateway-mode local --gateway-interface none"
fi
exec /usr/bin/ovnkube --init-node "${K8S_NODE}" \
Expand All @@ -153,7 +143,6 @@ spec:
--config-file=/run/ovnkube-config/ovnkube.conf \
--loglevel "${OVN_KUBE_LOG_LEVEL}" \
--inactivity-probe="${OVN_CONTROLLER_INACTIVITY_PROBE}" \
${hybrid_overlay_flags} \
${gateway_mode_flags} \
--metrics-bind-address "127.0.0.1:29103"
env:
Expand Down
1 change: 1 addition & 0 deletions manifests/0000_70_cluster-network-operator_01_pki_crd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ spec:
plural: operatorpkis
singular: operatorpki
scope: Namespaced
preserveUnknownFields: false
validation:
openAPIV3Schema:
description: "OperatorPKI is a simple certificate authority. It is not intended
Expand Down
4 changes: 2 additions & 2 deletions pkg/network/ovn_kubernetes.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,10 @@ func renderOVNKubernetes(conf *operv1.NetworkSpec, bootstrapResult *bootstrap.Bo
} else {
data.Data["OVNHybridOverlayVXLANPort"] = ""
}
data.Data["OVNHybridOverlayEnable"] = "true"
data.Data["OVNHybridOverlayEnable"] = true
} else {
data.Data["OVNHybridOverlayNetCIDR"] = ""
data.Data["OVNHybridOverlayEnable"] = ""
data.Data["OVNHybridOverlayEnable"] = false
data.Data["OVNHybridOverlayVXLANPort"] = ""
}

Expand Down

0 comments on commit 111cf18

Please sign in to comment.