Skip to content

[WIP] CNTRLPLANE-707: Use Calico CNI for management cluster #64839

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 22 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
c3c2114
CNTRLPLANE-705 Build CI to cover Calico CNI for public HCP on AWS
mgencur Apr 16, 2025
4337fa4
CNTRLPLANE-708 Build CI to cover Calico CNI for HCP on baremetal with…
mgencur Apr 17, 2025
705fb2f
Bring Kubevirt changes from Cilium
mgencur May 12, 2025
0dea044
CNTRLPLANE-707 Build CI to cover Calico CNI for HCP on kubevirt
mgencur May 12, 2025
c7cddec
Fix registry metadata
mgencur May 12, 2025
6173129
Do not use Calico for mgmt cluster
mgencur May 13, 2025
dfba33c
Revert "Do not use Calico for mgmt cluster"
mgencur May 13, 2025
ceaa195
Set MTU for network to 1380
mgencur May 13, 2025
0cd45ec
Set MTU also for calico-conf
mgencur May 13, 2025
9907421
Wait longer for debugging purposes
mgencur May 14, 2025
95a121b
Set 1480 explicitly
mgencur May 15, 2025
214ca8b
Use Felix config to set ipipMTU
mgencur May 15, 2025
324112b
Do not use FelixConfiguration as Installation takes precedence anyway
mgencur May 19, 2025
ff580b6
Use IPIPCrossSubnet to avoid encapsulation
mgencur May 19, 2025
834629d
Remove mtu 1380 from hosted cluster
mgencur May 19, 2025
9e16661
Use nightly build that is older than May 15
mgencur May 19, 2025
dcc175a
Use encapsulation None
mgencur May 19, 2025
60a059f
Make jobs
mgencur May 19, 2025
1f357b9
Revert "Use nightly build that is older than May 15"
mgencur May 20, 2025
62aa014
Remove redundant ImageContentSourcePolicy
mgencur May 20, 2025
3bccd15
Try IPIPCrossSubnet
mgencur May 20, 2025
e24b3c6
Use encapsulation: None also for hosted cluster
mgencur May 21, 2025
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 @@ -167,6 +167,14 @@ tests:
LVM_OPERATOR_SUB_CHANNEL: stable-4.18
MCE_VERSION: "2.8"
workflow: hypershift-mce-agent-metal3-conformance-cilium
- as: e2e-agent-connected-calico-ipv4-metal-conformance
minimum_interval: 168h
steps:
cluster_profile: equinix-ocp-hcp
env:
LVM_OPERATOR_SUB_CHANNEL: stable-4.18
MCE_VERSION: "2.8"
workflow: hypershift-mce-agent-metal3-conformance-calico
- as: e2e-kubevirt-metal-ovn
cron: 0 4 1 1 *
steps:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,34 @@ tests:
test:
- chain: hypershift-conformance
workflow: cucushift-installer-rehearse-aws-ipi-cilium-hypershift-private-guest
- as: e2e-aws-conformance-calico
minimum_interval: 168h
steps:
cluster_profile: hypershift
env:
TEST_SKIPS: The default cluster RBAC policy should have correct RBAC rules\|
Cluster scoped load balancer healthcheck port and path should be 10256/healthz\|
Prometheus \[apigroup:image.openshift.io\] when installed on the cluster should
provide named network metrics\| Unidling \[apigroup:apps.openshift.io\]\[apigroup:route.openshift.io\]
should work with UDP\| Unidling with Deployments \[apigroup:route.openshift.io\]
should work with TCP (when fully idled)\| Unidling \[apigroup:apps.openshift.io\]\[apigroup:route.openshift.io\]
should work with TCP (when fully idled)\| Unidling with Deployments \[apigroup:route.openshift.io\]
should work with UDP\| pod should not start for sysctls not on whitelist \[apigroup:k8s.cni.cncf.io\]
net.ipv4.conf.IFNAME.arp_filter\| pod should not start for sysctls not on
whitelist \[apigroup:k8s.cni.cncf.io\] net.ipv4.conf.all.send_redirects\|
sysctl allowlist update should start a pod with custom sysctl only when the
sysctl is added to whitelist
workflow: hypershift-aws-conformance-calico
- as: e2e-kubevirt-metal-conformance-calico
minimum_interval: 168h
steps:
cluster_profile: equinix-ocp-hcp
env:
LVM_OPERATOR_SUB_CHANNEL: stable-4.19
ODF_OPERATOR_SUB_CHANNEL: stable-4.18
ODF_OPERATOR_SUB_SOURCE: redhat-operators-v4-18
REDHAT_OPERATORS_INDEX_TAG: v4.18
workflow: hypershift-kubevirt-baremetalds-conformance-calico
- as: e2e-powervs-ovn
cron: 0 8 * * *
steps:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1475,6 +1475,81 @@ periodics:
- name: result-aggregator
secret:
secretName: result-aggregator
- agent: kubernetes
cluster: build11
decorate: true
decoration_config:
skip_cloning: true
extra_refs:
- base_ref: release-4.18
org: openshift
repo: hypershift
labels:
ci-operator.openshift.io/cloud: equinix-ocp-metal
ci-operator.openshift.io/cloud-cluster-profile: equinix-ocp-hcp
ci-operator.openshift.io/variant: periodics-mce
ci.openshift.io/generator: prowgen
job-release: "4.18"
pj-rehearse.openshift.io/can-be-rehearsed: "true"
minimum_interval: 168h
name: periodic-ci-openshift-hypershift-release-4.18-periodics-mce-e2e-agent-connected-calico-ipv4-metal-conformance
spec:
containers:
- args:
- --gcs-upload-secret=/secrets/gcs/service-account.json
- --image-import-pull-secret=/etc/pull-secret/.dockerconfigjson
- --lease-server-credentials-file=/etc/boskos/credentials
- --report-credentials-file=/etc/report/credentials
- --secret-dir=/secrets/ci-pull-credentials
- --target=e2e-agent-connected-calico-ipv4-metal-conformance
- --variant=periodics-mce
command:
- ci-operator
image: ci-operator:latest
imagePullPolicy: Always
name: ""
resources:
requests:
cpu: 10m
volumeMounts:
- mountPath: /etc/boskos
name: boskos
readOnly: true
- mountPath: /secrets/ci-pull-credentials
name: ci-pull-credentials
readOnly: true
- mountPath: /secrets/gcs
name: gcs-credentials
readOnly: true
- mountPath: /secrets/manifest-tool
name: manifest-tool-local-pusher
readOnly: true
- mountPath: /etc/pull-secret
name: pull-secret
readOnly: true
- mountPath: /etc/report
name: result-aggregator
readOnly: true
serviceAccountName: ci-operator
volumes:
- name: boskos
secret:
items:
- key: credentials
path: credentials
secretName: boskos-credentials
- name: ci-pull-credentials
secret:
secretName: ci-pull-credentials
- name: manifest-tool-local-pusher
secret:
secretName: manifest-tool-local-pusher
- name: pull-secret
secret:
secretName: registry-pull-credentials
- name: result-aggregator
secret:
secretName: result-aggregator
- agent: kubernetes
cluster: build11
decorate: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,81 @@ periodics:
- name: result-aggregator
secret:
secretName: result-aggregator
- agent: kubernetes
cluster: build11
decorate: true
decoration_config:
skip_cloning: true
extra_refs:
- base_ref: release-4.19
org: openshift
repo: hypershift
labels:
ci-operator.openshift.io/cloud: hypershift
ci-operator.openshift.io/cloud-cluster-profile: hypershift
ci-operator.openshift.io/variant: periodics
ci.openshift.io/generator: prowgen
job-release: "4.19"
pj-rehearse.openshift.io/can-be-rehearsed: "true"
minimum_interval: 168h
name: periodic-ci-openshift-hypershift-release-4.19-periodics-e2e-aws-conformance-calico
spec:
containers:
- args:
- --gcs-upload-secret=/secrets/gcs/service-account.json
- --image-import-pull-secret=/etc/pull-secret/.dockerconfigjson
- --lease-server-credentials-file=/etc/boskos/credentials
- --report-credentials-file=/etc/report/credentials
- --secret-dir=/secrets/ci-pull-credentials
- --target=e2e-aws-conformance-calico
- --variant=periodics
command:
- ci-operator
image: ci-operator:latest
imagePullPolicy: Always
name: ""
resources:
requests:
cpu: 10m
volumeMounts:
- mountPath: /etc/boskos
name: boskos
readOnly: true
- mountPath: /secrets/ci-pull-credentials
name: ci-pull-credentials
readOnly: true
- mountPath: /secrets/gcs
name: gcs-credentials
readOnly: true
- mountPath: /secrets/manifest-tool
name: manifest-tool-local-pusher
readOnly: true
- mountPath: /etc/pull-secret
name: pull-secret
readOnly: true
- mountPath: /etc/report
name: result-aggregator
readOnly: true
serviceAccountName: ci-operator
volumes:
- name: boskos
secret:
items:
- key: credentials
path: credentials
secretName: boskos-credentials
- name: ci-pull-credentials
secret:
secretName: ci-pull-credentials
- name: manifest-tool-local-pusher
secret:
secretName: manifest-tool-local-pusher
- name: pull-secret
secret:
secretName: registry-pull-credentials
- name: result-aggregator
secret:
secretName: result-aggregator
- agent: kubernetes
cluster: build11
decorate: true
Expand Down Expand Up @@ -1176,6 +1251,81 @@ periodics:
- name: result-aggregator
secret:
secretName: result-aggregator
- agent: kubernetes
cluster: build11
decorate: true
decoration_config:
skip_cloning: true
extra_refs:
- base_ref: release-4.19
org: openshift
repo: hypershift
labels:
ci-operator.openshift.io/cloud: equinix-ocp-metal
ci-operator.openshift.io/cloud-cluster-profile: equinix-ocp-hcp
ci-operator.openshift.io/variant: periodics
ci.openshift.io/generator: prowgen
job-release: "4.19"
pj-rehearse.openshift.io/can-be-rehearsed: "true"
minimum_interval: 168h
name: periodic-ci-openshift-hypershift-release-4.19-periodics-e2e-kubevirt-metal-conformance-calico
spec:
containers:
- args:
- --gcs-upload-secret=/secrets/gcs/service-account.json
- --image-import-pull-secret=/etc/pull-secret/.dockerconfigjson
- --lease-server-credentials-file=/etc/boskos/credentials
- --report-credentials-file=/etc/report/credentials
- --secret-dir=/secrets/ci-pull-credentials
- --target=e2e-kubevirt-metal-conformance-calico
- --variant=periodics
command:
- ci-operator
image: ci-operator:latest
imagePullPolicy: Always
name: ""
resources:
requests:
cpu: 10m
volumeMounts:
- mountPath: /etc/boskos
name: boskos
readOnly: true
- mountPath: /secrets/ci-pull-credentials
name: ci-pull-credentials
readOnly: true
- mountPath: /secrets/gcs
name: gcs-credentials
readOnly: true
- mountPath: /secrets/manifest-tool
name: manifest-tool-local-pusher
readOnly: true
- mountPath: /etc/pull-secret
name: pull-secret
readOnly: true
- mountPath: /etc/report
name: result-aggregator
readOnly: true
serviceAccountName: ci-operator
volumes:
- name: boskos
secret:
items:
- key: credentials
path: credentials
secretName: boskos-credentials
- name: ci-pull-credentials
secret:
secretName: ci-pull-credentials
- name: manifest-tool-local-pusher
secret:
secretName: manifest-tool-local-pusher
- name: pull-secret
secret:
secretName: registry-pull-credentials
- name: result-aggregator
secret:
secretName: result-aggregator
- agent: kubernetes
cluster: build11
cron: 0 4 * * *
Expand Down
13 changes: 13 additions & 0 deletions ci-operator/step-registry/calico/OWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
approvers:
- vrutkovs
- jtaleric
- nbusseneau
- nathanjsweet
- squeed
- mgencur
reviewers:
- jtaleric
- nathanjsweet
- squeed
- nbusseneau
- mgencur
1 change: 1 addition & 0 deletions ci-operator/step-registry/calico/conf/OWNERS
54 changes: 54 additions & 0 deletions ci-operator/step-registry/calico/conf/calico-conf-commands.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
#!/bin/bash

set -xeuo pipefail

if [[ -f "${SHARED_DIR}/install-config.yaml" ]]; then
sed -i "s/networkType: .*/networkType: Calico/" "${SHARED_DIR}/install-config.yaml"
fi

cat > "${SHARED_DIR}/manifest_cluster-network-03-config.yml" << EOF
apiVersion: operator.openshift.io/v1
kind: Network
metadata:
name: cluster
spec:
clusterNetwork:
- cidr: 10.128.0.0/14
hostPrefix: 23
networkType: Calico
serviceNetwork:
- 172.30.0.0/16
EOF

calico_dir=/tmp/calico
mkdir $calico_dir

wget -qO- "https://github.com/projectcalico/calico/releases/download/v${CALICO_VERSION}/ocp.tgz" | \
tar xvz --strip-components=1 -C $calico_dir

# Install namespaces, operator, custom resources Installation and ApiServer.
while IFS= read -r src; do
cp "$src" "${SHARED_DIR}/manifest_$(basename "$src")"
done <<< "$(find $calico_dir -name "00*" -o -name "02*")"

# Install API Server
cp "${calico_dir}/01-cr-apiserver.yaml" "${SHARED_DIR}/manifest_01-cr-apiserver.yaml"

# Install Calico with specific setting for node address auto-detection.
# The specific setting is required as some tests create NetworkAttachmentDefinitions
# which add network interfaces to the host. Calico then incorrectly chooses this interface
# and breaks connectivity between nodes.
cat > "${SHARED_DIR}/manifest_01-cr-installation.yaml" << EOF
apiVersion: operator.tigera.io/v1
kind: Installation
metadata:
name: default
spec:
variant: Calico
calicoNetwork:
nodeAddressAutodetectionV4:
kubernetes: NodeInternalIP
ipPools:
- cidr: 10.128.0.0/14
encapsulation: None
EOF
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"path": "calico/conf/calico-conf-ref.yaml",
"owners": {
"approvers": [
"vrutkovs",
"jtaleric",
"nbusseneau",
"nathanjsweet",
"squeed",
"mgencur"
],
"reviewers": [
"jtaleric",
"nathanjsweet",
"squeed",
"nbusseneau",
"mgencur"
]
}
}
Loading