Skip to content
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,32 @@ oc adm policy add-scc-to-user privileged -z cilium -n cilium
oc adm policy add-scc-to-user privileged -z cilium-operator -n cilium
oc adm policy add-scc-to-user privileged -z cilium-envoy -n cilium

# Overriding the default 0.3.1 cniVersion to workaround https://redhat.atlassian.net/browse/OCPBUGS-86033
oc apply -f - <<'EOF'
apiVersion: v1
kind: ConfigMap
metadata:
name: cilium-cni-override
namespace: cilium
data:
cilium-override.conf: |
{
"cniVersion": "0.4.0",
"name": "portmap",
"plugins": [
{
"type": "cilium-cni",
"enable-debug": true,
"log-file": "/var/run/cilium/cilium-cni.log"
},
{
"type": "portmap",
"capabilities": {"portMappings": true}
}
]
}
EOF

# Note: In order to test with a development version, use:
# --repository oci://quay.io/cilium-charts-dev/cilium --version <version>
# where <version> is a tag from https://quay.io/repository/cilium-charts-dev/cilium
Expand All @@ -64,9 +90,13 @@ cilium install \
--set cni.confPath=/var/run/multus/cni/net.d \
--set sessionAffinity=true \
--set endpointRoutes.enabled="true" \
--set cni.chainingMode=portmap \
--set tunnelPort=4789 \
--set clusterHealthPort=9940 \
--set socketLB.enabled=true
--set socketLB.enabled=true \
--set cni.readCniConf=/etc/cilium-cni/cilium-override.conf \
--set extraVolumes[0].name=cni-override \
--set extraVolumes[0].configMap.name=cilium-cni-override \
--set extraVolumeMounts[0].name=cni-override \
--set extraVolumeMounts[0].mountPath=/etc/cilium-cni

cilium status --namespace cilium --wait
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ if [[ -f "${SHARED_DIR}/nested_kubeconfig" ]]; then
fi

OCP_VERSION=$(oc get clusterversion version -o jsonpath='{.status.desired.version}' | cut -d. -f1-2)
if [ "$OCP_VERSION" != "4.22" ]; then
echo "OCP version ${OCP_VERSION} is not 4.22, skipping NetworkPolicy workarounds"
if [[ "$OCP_VERSION" != "4.22" && "$OCP_VERSION" != "5.0" ]]; then
echo "OCP version ${OCP_VERSION}, skipping NetworkPolicy workarounds"
exit 0
fi

Expand Down