Skip to content

Update network-services-operator with multicluster support, migrate e2e tests to Chainsaw #9

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

Merged
merged 4 commits into from
Mar 14, 2025

Conversation

joshlreese
Copy link
Contributor

Multicluster support

This PR introduces the use of the (currently experimental) multicluster-runtime library that brings the ability to attach an operator to multiple clusters with minimal changes to reconciler code. A new cluster-discovery-mode flag has been introduced, and supports the following options:

  • single: Default behavior. The operator will behave as it does today, attaching to a single cluster.
  • kind: The operator will leverage the kind library to discover kind clusters, and engage each one. I expect this to be useful in e2e tests as we move forward.
  • datum: The operator will list Project resources in the API server that the default kubeconfig interacts with, and engages a cluster for each Project found. Currently it is expected that the project control plane is available via the path /apis/resourcemanager.datumapis.com/v1alpha/projects/{project_name}/control-plane on the same host that the main kubeconfig attaches to.

An initial implementation of a multicluster-runtime Provider for Datum which watches Project resources is included in this PR. As that library stabilizes, we'll move it out to another location that other Datum operators can use.

Note

The multicluster-runtime dependency is currently referencing a fork. As changes are merged
in to multicluster-runtime, such as kubernetes-sigs/multicluster-runtime#18, the dependency on the fork will be removed.

End to end tests

End to end tests have been replaced with Chainsaw. I referenced the opentelemetry-operator project's use of chainsaw in the Makefile and GitHub action changes.

…anage resources from many control planes.

A Datum provider is introduced that discovers Datum Projects and registers them
as clusters. This will eventually be moved out into a shared library.

Ginkgo test scaffolding has been removed, as we'll be leveraging Chainsaw.
Existing tests will be ported in a future iteration.

These changes depend on
kubernetes-sigs/multicluster-runtime#17, as well as
other changes to support kind clusters that do not have a prefix of "fleet-" in
the name that have not yet been published.
@joshlreese joshlreese requested a review from scotwells March 13, 2025 22:42
@joshlreese joshlreese linked an issue Mar 13, 2025 that may be closed by this pull request
scotwells
scotwells previously approved these changes Mar 14, 2025
Copy link
Contributor

@scotwells scotwells left a comment

Choose a reason for hiding this comment

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

Left one minor comment. Overall looks like this will work great. Love the documentation that's automatically generated off of the chainsaw tests. 🚀

…nd added CRD documentation generated via 'make api-docs'
@joshlreese joshlreese merged commit 4078046 into main Mar 14, 2025
5 of 7 checks passed
@joshlreese joshlreese deleted the init-multicluster branch March 19, 2025 17:13
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.

Update network-services-operator to be multi-cluster aware
2 participants