Skip to content

Conversation

@tmshort
Copy link
Contributor

@tmshort tmshort commented Dec 11, 2025

In order to fully support multiple replicas, we need to be able to run our tests in a multi-node environment, but we don't always want to run in a multi-node test environment.

Update the experimental-e2e to run a 2-node kind cluster (both control- plane).

Update the kind-load recipe to directly load a docker image via load docker-image, since load image-archive has issues with multi-node clusters.

Description

Reviewer Checklist

  • API Go Documentation
  • Tests: Unit Tests (and E2E Tests, if appropriate)
  • Comprehensive Commit Messages
  • Links to related GitHub Issue(s)

@tmshort tmshort requested a review from a team as a code owner December 11, 2025 19:35
@netlify
Copy link

netlify bot commented Dec 11, 2025

Deploy Preview for olmv1 ready!

Name Link
🔨 Latest commit 32e6211
🔍 Latest deploy log https://app.netlify.com/projects/olmv1/deploys/693b37316eef120008fe89cd
😎 Deploy Preview https://deploy-preview-2382--olmv1.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@openshift-ci
Copy link

openshift-ci bot commented Dec 11, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign kevinrizza for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@codecov
Copy link

codecov bot commented Dec 11, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 73.02%. Comparing base (6aa4040) to head (32e6211).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2382      +/-   ##
==========================================
+ Coverage   72.87%   73.02%   +0.14%     
==========================================
  Files          98      100       +2     
  Lines        7581     7641      +60     
==========================================
+ Hits         5525     5580      +55     
- Misses       1622     1624       +2     
- Partials      434      437       +3     
Flag Coverage Δ
e2e 44.78% <ø> (+0.12%) ⬆️
experimental-e2e 49.34% <ø> (+0.05%) ⬆️
unit 57.11% <ø> (+0.28%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

In order to fully support multiple replicas, we need to be able to run
our tests in a multi-node environment, but we don't _always_ want to
run in a multi-node test environment.

Update the experimental-e2e to run a 2-node kind cluster (both control-
plane).

Update the `kind-load` recipe to directly load a docker image via
`load docker-image`, since `load image-archive` has issues with
multi-node clusters.

Signed-off-by: Todd Short <tshort@redhat.com>
@@ -0,0 +1,45 @@
apiVersion: kind.x-k8s.io/v1alpha4
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: kind-config-experimental.yaml sounds to me like some sort of experimental kind config, but actually it is just a two-node config. Perhaps we could reflect that in the filename?

BTW, does this file need to be in the project root?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's the same location as the other kind config; keep similar files together.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does this file need to be in the project root

Now that there are multiple kind config files at play, it makes sense to me to bury this in a subdirectory somewhere.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's fair, and easy.

extraMounts:
- hostPath: ./hack/kind-config/containerd/certs.d
containerPath: /etc/containerd/certs.d
- role: control-plane
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we do not need another control-plane node, a worker node could be just fine. Furthermore, each control plane node runs a copy of control plane pods (etcd, apiserver, scheduler, controller-manager) doubling the resources consumed by kind. Additional worker node keeps the resource usage on previous level.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is on purpose,. operator-controller and catalogd are supposed to run only on control-plane nodes; not worker nodes. It's part of what we want to test. This is also only for the experimental-e2e, so it's not used for normal run-time.

@joelanford
Copy link
Member

Update the kind-load recipe to directly load a docker image via load docker-image, since load image-archive has issues with multi-node clusters.

The reason we use the archive variant for image loading is to support contributors that use podman instead of docker. Will this change break their workflows?

@tmshort
Copy link
Contributor Author

tmshort commented Dec 12, 2025

The reason we use the archive variant for image loading is to support contributors that use podman instead of docker. Will this change break their workflows?

I know, but the load image-archive command doesn't work with multi-node kind (at least it wasn't in my setup).
I have docker and podman installed, and it works. But you're right, it fails with just podman, despite "enabling experimental podman provider":

/home/tshort/go/bin/kind-v0.30.0 load docker-image quay.io/operator-framework/operator-controller:devel --name operator-controller-e2e
enabling experimental podman provider
ERROR: image: "quay.io/operator-framework/operator-controller:devel" not present locally
make: *** [Makefile:390: kind-load] Error 1
tshort@cube:~/git/operator-framework/operator-controller (multi-node-kind >)$ podman images | grep operator-controller
quay.io/operator-framework/operator-controller  devel                                 18e72de2e0e1  7 minutes ago  83.4 MB

Issues: kubernetes-sigs/kind#3105 (closed and dup'd to: kubernetes-sigs/kind#2038)

@tmshort
Copy link
Contributor Author

tmshort commented Dec 12, 2025

The reason we use the archive variant for image loading is to support contributors that use podman instead of docker. Will this change break their workflows?

And now I'm trying without my changes, and it's failing with just podman... So, it looks as though we're already broken...

/home/tshort/go/bin/kind-v0.30.0 export kubeconfig --name operator-controller-e2e
enabling experimental podman provider
Set kubectl context to "kind-operator-controller-e2e"
podman save quay.io/operator-framework/operator-controller:devel | /home/tshort/go/bin/kind-v0.30.0 load image-archive /dev/stdin --name operator-controller-e2e
enabling experimental podman provider
ERROR: failed to load image: command "podman exec --privileged -i operator-controller-e2e-control-plane ctr --namespace=k8s.io images import --all-platforms --digests --snapshotter=fuse-overlayfs -" failed with error: exit status 1
Command Output: ctr: unable to initialize unpacker: no unpack platforms defined: invalid argument
make: *** [Makefile:385: kind-load] Error 1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants