Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
11b7e2f
update all fields on CreateOrUpdateACLsOps, especially for nil values,
npinaeva Mar 13, 2023
18dcd72
rename aclType to aclPipelineType, add aclDirection type to separate
npinaeva Mar 29, 2023
f89913e
Start using new ExternalIDs for ACLs. Multicast.
npinaeva Mar 24, 2023
cb4c4b3
Allow from node ACL:
npinaeva Mar 29, 2023
2aab19e
Update gress policy ACLs to use new dbIndex.
npinaeva Mar 29, 2023
28396ad
Update DefaultDeny ACLs to have new dbIDs.
npinaeva Mar 29, 2023
d75cee1
Update EgressFirewall ACLs to have new dbIndex.
npinaeva Mar 29, 2023
447b11b
Finalize new ACL dbIndex usage:
npinaeva Jan 3, 2023
448cfc1
Update e2e tests for acl logging with the new acl names.
npinaeva Mar 27, 2023
ab51224
vendor: bump containernetworking/plugins to v1.2.0
cathy-zhou Mar 29, 2023
fc17f7e
Separate make modelgen from make codegen
tssurya Mar 28, 2023
0254d0f
Merge pull request #3334 from npinaeva/acls-new-indexes
trozet Apr 5, 2023
9d216fc
Use PrimaryID as a client index for ACL.
npinaeva Apr 6, 2023
b7afb8a
optimize deleteStaleNetpolPeerAddrSets to iterate over all acls only …
npinaeva Apr 3, 2023
ffdcf1b
delete getNewLocalPolicyPorts log
npinaeva Apr 3, 2023
2a89def
services: Don't try to list/cleanup templates when OVN doesn't suppor…
dceara Apr 6, 2023
c1cf2db
Make `pokeEndpoint` not failing in case of error
zeeke Dec 20, 2022
0b3196b
Merge pull request #3523 from dceara/fix-no-template-support
trozet Apr 7, 2023
87b62db
Merge pull request #3522 from npinaeva/netpol-perf-fixes
trozet Apr 7, 2023
9e21b3a
Merge pull request #3521 from npinaeva/acl-use-client-index
trozet Apr 7, 2023
d9d6187
Updating endpoints when using allocateLBNP=0, lgw mode fails
tssurya Mar 28, 2023
b14eb72
Small cleanups to log messages and test suite name
dcbw Apr 11, 2023
bff6a06
allow the use of the regular addressset in testing
JacobTanenbaum Apr 10, 2023
8e696e5
Merge pull request #3505 from tssurya/fix-etp-local-e2e-flake
trozet Apr 11, 2023
2d6b870
Add compact mode support to kind.sh
pliurh Mar 22, 2023
fd69b62
Add compact-mode test to CI
pliurh Mar 29, 2023
e069c2b
Remove the local gw node-ip migration lane from CI
pliurh Apr 7, 2023
71232c9
Add -scm to the output of kind.sh --help
pliurh Apr 11, 2023
c9ef83b
Merge pull request #3511 from cathy-zhou/nextip
trozet Apr 11, 2023
0c79228
clustermanager: update node annotations on dual->single stack convers…
dcbw Apr 10, 2023
bf3da15
Ensure VF representor is not managed by OVS before renaming.
aserdean Feb 7, 2023
b101015
Merge pull request #3496 from pliurh/single_node
trozet Apr 12, 2023
357e79b
remove the fakeaddressset code from egress_firewall_test.go
JacobTanenbaum Apr 10, 2023
0a1d68b
Merge pull request #3285 from naserdean/ensure_vf_not_in_ovs_before_r…
trozet Apr 12, 2023
030a4ee
Add info about -me flag to kind helper
tssurya Apr 3, 2023
3395e83
Add unit test to check multicast+long ns name work
tssurya Mar 7, 2023
8e519c1
Merge pull request #3470 from tssurya/fix-default-deny-extIDKeys
trozet Apr 13, 2023
f7469b5
Automatically copy yamls as j2 files
tssurya Apr 4, 2023
3d68454
Merge pull request #3507 from tssurya/separate-make-modegen
trozet Apr 14, 2023
978e4d9
Make --gateway-nexthop support dual-stack
pliurh Apr 14, 2023
09f7548
Improve e2e test assertion message
zeeke Apr 13, 2023
dde7ea8
Serve NodePort services on every `host-addresses`
zeeke Dec 20, 2022
2adc58f
Convert unstortedList() to sets.List()
bpickard22 Apr 12, 2023
f46c944
Merge pull request #3524 from dcbw/dual-single-downgrade
trozet Apr 14, 2023
b7c5ff7
Merge pull request #3532 from pliurh/single_node
trozet Apr 14, 2023
ad052c1
Use loadbalancer.Name as client index
npinaeva Apr 17, 2023
faae59a
Merge pull request #3533 from npinaeva/client-index-lb
jcaamano Apr 17, 2023
6a119d1
Merge pull request #3529 from bpickard22/unsorted-lists-fix
trozet Apr 17, 2023
a053d08
Merge pull request #3525 from JacobTanenbaum/startRemoveFakeAddressSet
trozet Apr 17, 2023
c6dc8e2
Detect bridge name when 'gateway-interface' is specified
pliurh Apr 18, 2023
b37a99e
Add Scalable Functions support
DmytroLinkin Sep 8, 2022
8bd9b3e
Fix ETP iptables for shared gateway mode
zeeke Apr 7, 2023
7bc2e16
Merge pull request #3328 from zeeke/ocpbugs-4485
trozet Apr 21, 2023
f3f0f75
Merge pull request #3537 from pliurh/single_node
trozet Apr 21, 2023
c55c557
Temporary fix for metallb issue
jcaamano Apr 21, 2023
92f45bd
Merge pull request #3545 from jcaamano/metallb-fix
trozet Apr 24, 2023
8f3bf5a
Merge remote-tracking branch 'ovnorg-origin/44-commit-metalb-merge' i…
tssurya Jun 1, 2023
3b57312
Fix cleanupStalePodSNATs if no podIPs are found
tssurya May 31, 2023
2390d0f
Fix unit test for localWithFallback
May 26, 2023
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
5 changes: 4 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ jobs:
- {"target": "control-plane", "ha": "noHA", "gateway-mode": "shared", "ipfamily": "ipv4", "disable-snat-multiple-gws": "noSnatGW", "second-bridge": "2br", "separate-cluster-manager": "false"}
- {"target": "multi-homing", "ha": "noHA", "gateway-mode": "local", "ipfamily": "ipv4", "disable-snat-multiple-gws": "SnatGW", "second-bridge": "1br", "separate-cluster-manager": "false"}
- {"target": "node-ip-migration", "ha": "noHA", "gateway-mode": "shared", "ipfamily": "ipv6", "disable-snat-multiple-gws": "SnatGW", "second-bridge": "1br", "separate-cluster-manager": "true"}
- {"target": "node-ip-migration", "ha": "noHA", "gateway-mode": "local", "ipfamily": "ipv4", "disable-snat-multiple-gws": "SnatGW", "second-bridge": "1br", "separate-cluster-manager": "false"}
- {"target": "compact-mode", "ha": "noHA", "gateway-mode": "local", "ipfamily": "ipv4", "disable-snat-multiple-gws": "snatGW", "second-bridge": "1br", "separate-cluster-manager": "false"}
needs: [ build-pr ]
env:
JOB_NAME: "${{ matrix.target }}-${{ matrix.ha }}-${{ matrix.gateway-mode }}-${{ matrix.ipfamily }}-${{ matrix.disable-snat-multiple-gws }}-${{ matrix.second-bridge }}"
Expand All @@ -394,6 +394,7 @@ jobs:
KIND_IPV6_SUPPORT: "${{ matrix.ipfamily == 'IPv6' || matrix.ipfamily == 'dualstack' }}"
ENABLE_MULTI_NET: "${{ matrix.target == 'multi-homing' }}"
OVN_SEPARATE_CLUSTER_MANAGER: "${{ matrix.separate-cluster-manager == 'true' }}"
OVN_COMPACT_MODE: "${{ matrix.target == 'compact-mode' }}"
steps:

- name: Free up disk space
Expand Down Expand Up @@ -448,6 +449,8 @@ jobs:
make -C test control-plane WHAT="Multi Homing"
elif [ "${{ matrix.target }}" == "node-ip-migration" ]; then
make -C test control-plane WHAT="Node IP address migration"
elif [ "${{ matrix.target }}" == "compact-mode" ]; then
SINGLE_NODE_CLUSTER="true" make -C test shard-network
else
make -C test ${{ matrix.target }}
fi
Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,8 @@ that can be brought up locally and within a few minutes.

[Debugging OVN](./docs/debugging.md)

[Exposed metrics](./docs/metrics.md)

The golang based [ovn kubernetes go-controller](./go-controller/README.md) is a reliable way to
deploy the OVN SDN using kubernetes clients and watchers based on golang. Contains `ovnkube` and
`ovn-k8s-cni-overlay` build and usage instructions.
Expand Down Expand Up @@ -207,6 +209,8 @@ cluster network.
[ovnkube-trace](./docs/ovnkube-trace.md) a tool to trace packet simulations between points in an
ovn-kubernetes driven cluster.

[ACLs used by ovn-k and their priorities](./docs/acls.md)

# OVN Kubernetes Basics
A good resource to get started with understanding `ovn-kubernetes` is the following recording and slides, which run through the basic architecture and functionality of the system.
[slides](https://docs.google.com/presentation/d/1ZtwP3t6uNAU0g4S7IbqSxPg2bmQW-pPGyMW2ZNj9Nrg/edit?usp=sharing)
Expand Down
18 changes: 16 additions & 2 deletions contrib/kind.sh
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ usage() {
echo " [-nl |--node-loglevel <num>] [-ml|--master-loglevel <num>]"
echo " [-dbl|--dbchecker-loglevel <num>] [-ndl|--ovn-loglevel-northd <loglevel>]"
echo " [-nbl|--ovn-loglevel-nb <loglevel>] [-sbl|--ovn-loglevel-sb <loglevel>]"
echo " [-cl |--ovn-loglevel-controller <loglevel>]"
echo " [-cl |--ovn-loglevel-controller <loglevel>] [-me|--multicast-enabled]"
echo " [-ep |--experimental-provider <name>] |"
echo " [-eb |--egress-gw-separate-bridge] |"
echo " [-lr |--local-kind-registry |"
Expand All @@ -110,6 +110,7 @@ usage() {
echo " [-cn | --cluster-name |"
echo " [-ehp|--egress-ip-healthcheck-port <num>]"
echo " [-is | --ipsec]"
echo " [-cm | --compact-mode]"
echo " [--isolated]"
echo " [-h]]"
echo ""
Expand All @@ -118,6 +119,8 @@ usage() {
echo "-kt | --keep-taint Do not remove taint components."
echo " DEFAULT: Remove taint components."
echo "-ha | --ha-enabled Enable high availability. DEFAULT: HA Disabled."
echo "-scm | --separate-cluster-manager Separate cluster manager from ovnkube-master and run as a separate container within ovnkube-master deployment."
echo "-me | --multicast-enabled Enable multicast. DEFAULT: Disabled."
echo "-ho | --hybrid-enabled Enable hybrid overlay. DEFAULT: Disabled."
echo "-ds | --disable-snat-multiple-gws Disable SNAT for multiple gws. DEFAULT: Disabled."
echo "-dp | --disable-pkt-mtu-check Disable checking packet size greater than MTU. Default: Disabled"
Expand Down Expand Up @@ -157,6 +160,7 @@ usage() {
echo "-ehp | --egress-ip-healthcheck-port TCP port used for gRPC session by egress IP node check. DEFAULT: 9107 (Use "0" for legacy dial to port 9)."
echo "-is | --ipsec Enable IPsec encryption (spawns ovn-ipsec pods)"
echo "-sm | --scale-metrics Enable scale metrics"
echo "-cm | --compact-mode Enable compact mode, ovnkube master and node run in the same process."
echo "--isolated Deploy with an isolated environment (no default gateway)"
echo "--delete Delete current cluster"
echo "--deploy Deploy ovn kubernetes without restarting kind"
Expand Down Expand Up @@ -307,6 +311,8 @@ parse_args() {
;;
-sm | --scale-metrics ) OVN_METRICS_SCALE_ENABLE=true
;;
-cm | --compact-mode ) OVN_COMPACT_MODE=true
;;
--isolated ) OVN_ISOLATED=true
;;
-mne | --multi-network-enable ) shift
Expand Down Expand Up @@ -537,6 +543,10 @@ set_default_params() {
fi
ENABLE_MULTI_NET=${ENABLE_MULTI_NET:-false}
OVN_SEPARATE_CLUSTER_MANAGER=${OVN_SEPARATE_CLUSTER_MANAGER:-false}
OVN_COMPACT_MODE=${OVN_COMPACT_MODE:-false}
if [ "$OVN_COMPACT_MODE" == true ]; then
KIND_NUM_WORKER=0
fi
}

detect_apiserver_url() {
Expand Down Expand Up @@ -791,7 +801,8 @@ create_ovn_kube_manifests() {
--v6-join-subnet="${JOIN_SUBNET_IPV6}" \
--ex-gw-network-interface="${OVN_EX_GW_NETWORK_INTERFACE}" \
--multi-network-enable="${ENABLE_MULTI_NET}" \
--ovnkube-metrics-scale-enable="${OVN_METRICS_SCALE_ENABLE}"
--ovnkube-metrics-scale-enable="${OVN_METRICS_SCALE_ENABLE}" \
--compact-mode="${OVN_COMPACT_MODE}"
popd
}

Expand Down Expand Up @@ -875,6 +886,9 @@ install_metallb() {
fi
git clone https://github.com/metallb/metallb.git
pushd metallb
# temporary fix for metallb issue
# https://github.com/metallb/metallb/commit/fdf92741c7fac20eedf3caa0aa922f9ff0f0e7dd#r110009241
git reset --hard f5ba918
pip install -r dev-env/requirements.txt
inv dev-env -n ovn -b frr -p bgp
docker network create --driver bridge clientnet
Expand Down
9 changes: 9 additions & 0 deletions dist/images/daemonset.sh
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,9 @@ while [ "$1" != "" ]; do
--stateless-netpol-enable)
OVN_STATELESS_NETPOL_ENABLE=$VALUE
;;
--compact-mode)
COMPACT_MODE=$VALUE
;;

*)
echo "WARNING: unknown parameter \"$PARAM\""
Expand Down Expand Up @@ -432,8 +435,11 @@ ovnkube_metrics_scale_enable=${OVNKUBE_METRICS_SCALE_ENABLE}
echo "ovnkube_metrics_scale_enable: ${ovnkube_metrics_scale_enable}"
ovn_stateless_netpol_enable=${OVN_STATELESS_NETPOL_ENABLE}
echo "ovn_stateless_netpol_enable: ${ovn_stateless_netpol_enable}"
ovnkube_compact_mode_enable=${COMPACT_MODE:-"false"}
echo "ovnkube_compact_mode_enable: ${ovnkube_compact_mode_enable}"

ovn_image=${ovnkube_image} \
ovnkube_compact_mode_enable=${ovnkube_compact_mode_enable} \
ovn_image_pull_policy=${image_pull_policy} \
ovn_unprivileged_mode=${ovn_unprivileged_mode} \
ovn_gateway_mode=${ovn_gateway_mode} \
Expand Down Expand Up @@ -476,6 +482,7 @@ ovn_image=${ovnkube_image} \
# ovnkube node for dpu-host daemonset
# TODO: we probably dont need all of these when running on dpu host
ovn_image=${image} \
ovnkube_compact_mode_enable=${ovnkube_compact_mode_enable} \
ovn_image_pull_policy=${image_pull_policy} \
kind=${KIND} \
ovn_unprivileged_mode=${ovn_unprivileged_mode} \
Expand Down Expand Up @@ -536,6 +543,8 @@ ovn_image=${ovnkube_image} \
ovn_gateway_mode=${ovn_gateway_mode} \
ovn_ex_gw_networking_interface=${ovn_ex_gw_networking_interface} \
ovn_stateless_netpol_enable=${ovn_netpol_acl_enable} \
ovnkube_compact_mode_enable=${ovnkube_compact_mode_enable} \
ovn_unprivileged_mode=${ovn_unprivileged_mode} \
j2 ../templates/ovnkube-master.yaml.j2 -o ${output_dir}/ovnkube-master.yaml

ovn_image=${image} \
Expand Down
16 changes: 15 additions & 1 deletion dist/images/ovnkube.sh
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,8 @@ ovnkube_metrics_scale_enable=${OVNKUBE_METRICS_SCALE_ENABLE:-false}
ovn_encap_ip=${OVN_ENCAP_IP:-}

ovn_ex_gw_network_interface=${OVN_EX_GW_NETWORK_INTERFACE:-}
# OVNKUBE_COMPACT_MODE_ENABLE indicate if ovnkube run master and node in one process
ovnkube_compact_mode_enable=${OVNKUBE_COMPACT_MODE_ENABLE:-false}

# Determine the ovn rundir.
if [[ -f /usr/bin/ovn-appctl ]]; then
Expand Down Expand Up @@ -1020,9 +1022,18 @@ ovn-master() {
fi
echo "ovn_stateless_netpol_enable_flag: ${ovn_stateless_netpol_enable_flag}"

echo "=============== ovn-master ========== MASTER ONLY"
init_node_flags=
if [[ ${ovnkube_compact_mode_enable} == "true" ]]; then
init_node_flags="--init-node ${K8S_NODE} --nodeport"
echo "init_node_flags: ${init_node_flags}"
echo "=============== ovn-master ========== MASTER and NODE"
else
echo "=============== ovn-master ========== MASTER ONLY"
fi

/usr/bin/ovnkube \
--init-master ${K8S_NODE} \
${init_node_flags} \
--cluster-subnets ${net_cidr} --k8s-service-cidr=${svc_cidr} \
--nb-address=${ovn_nbdb} --sb-address=${ovn_sbdb} \
--gateway-mode=${ovn_gateway_mode} \
Expand Down Expand Up @@ -1055,6 +1066,9 @@ ovn-master() {

echo "=============== ovn-master ========== running"
wait_for_event attempts=3 process_ready ovnkube-master
if [[ ${ovnkube_compact_mode_enable} == "true" ]] && [[ ${ovnkube_node_mode} != "dpu" ]]; then
setup_cni
fi

process_healthy ovnkube-master
exit 9
Expand Down
69 changes: 64 additions & 5 deletions dist/templates/ovnkube-master.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@ spec:
serviceAccountName: ovn
hostNetwork: true
dnsPolicy: Default

{% if ovnkube_compact_mode_enable=="true" and ovn_unprivileged_mode=="no" %}
hostPID: true
{% endif %}
# required to be scheduled on a linux node with node-role.kubernetes.io/control-plane label and
# only one instance of ovnkube-master pod per node
affinity:
Expand Down Expand Up @@ -125,12 +127,22 @@ spec:
- name: ovnkube-master
image: "{{ ovn_image | default('docker.io/ovnkube/ovn-daemonset:latest') }}"
imagePullPolicy: "{{ ovn_image_pull_policy | default('IfNotPresent') }}"

{% if ovnkube_compact_mode_enable=="true" %}
command: ["/root/ovnkube.sh", "ovn-master"]

securityContext:
runAsUser: 0

{% if ovn_unprivileged_mode=="no" -%}
privileged: true
{% else %}
capabilities:
add:
- NET_ADMIN
{% endif %}
{% else %}
command: ["/root/ovnkube.sh", "ovn-master"]
securityContext:
runAsUser: 0
{% endif %}
terminationMessagePolicy: FallbackToLogsOnError
volumeMounts:
# Run directories where we need to be able to access sockets
Expand All @@ -146,7 +158,29 @@ spec:
- mountPath: /ovn-cert
name: host-ovn-cert
readOnly: true

{% if ovnkube_compact_mode_enable=="true" %}
# Common mounts
# for the iptables wrapper
- mountPath: /host
name: host-slash
readOnly: true
# CNI related mounts which we take over
- mountPath: /opt/cni/bin
name: host-opt-cni-bin
- mountPath: /etc/cni/net.d
name: host-etc-cni-netd
- mountPath: /var/run/netns
name: host-netns
mountPropagation: HostToContainer
- mountPath: /etc/openvswitch/
name: host-var-lib-ovs
readOnly: true
- mountPath: /etc/ovn/
name: host-var-lib-ovs
readOnly: true
- mountPath: /var/run/ovn-kubernetes
name: host-var-run-ovn-kubernetes
{% endif %}
resources:
requests:
cpu: 100m
Expand All @@ -166,6 +200,8 @@ spec:
value: "{{ ovnkube_config_duration_enable }}"
- name: OVNKUBE_METRICS_SCALE_ENABLE
value: "{{ ovnkube_metrics_scale_enable }}"
- name: OVNKUBE_COMPACT_MODE_ENABLE
value: "{{ ovnkube_compact_mode_enable }}"
- name: OVN_NET_CIDR
valueFrom:
configMapKeyRef:
Expand Down Expand Up @@ -252,5 +288,28 @@ spec:
hostPath:
path: /etc/ovn
type: DirectoryOrCreate
{% if ovnkube_compact_mode_enable=="true" %}
- name: host-slash
hostPath:
path: /
- name: host-opt-cni-bin
hostPath:
path: /opt/cni/bin
- name: host-etc-cni-netd
hostPath:
path: /etc/cni/net.d
- name: host-netns
hostPath:
path: /var/run/netns
- name: host-run-ovs
hostPath:
path: /run/openvswitch
- name: host-var-lib-ovs
hostPath:
path: /var/lib/openvswitch
- name: host-var-run-ovn-kubernetes
hostPath:
path: /var/run/ovn-kubernetes
{% endif %}
tolerations:
- operator: "Exists"
4 changes: 2 additions & 2 deletions dist/templates/ovnkube-node.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ spec:
dnsPolicy: Default
{{ "hostPID: true" if ovn_unprivileged_mode=="no" }}
containers:

{% if ovnkube_compact_mode_enable=="false" %}
- name: ovnkube-node
image: "{{ ovn_image | default('docker.io/ovnkube/ovn-daemonset:latest') }}"
imagePullPolicy: "{{ ovn_image_pull_policy | default('IfNotPresent') }}"
Expand Down Expand Up @@ -228,7 +228,7 @@ spec:
initialDelaySeconds: 30
timeoutSeconds: 30
periodSeconds: 60

{% endif %}
{% if ovnkube_app_name=="ovnkube-node" -%}
- name: ovn-controller
image: "{{ ovn_image | default('docker.io/ovnkube/ovn-daemonset:latest') }}"
Expand Down
Loading