-
Notifications
You must be signed in to change notification settings - Fork 16
🚧 WIP: hypershift integration #116
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
base: main
Are you sure you want to change the base?
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: ironcladlou The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
re: adding a dependency on the Hypershift API, I had totally missed and forgotten that I actually made the API a submodule long ago for this very reason. Thanks, old me |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #116 +/- ##
========================================
- Coverage 8.61% 8.24% -0.38%
========================================
Files 14 14
Lines 731 764 +33
========================================
Hits 63 63
- Misses 659 692 +33
Partials 9 9
🚀 New features to boost your workflow:
|
|
@ironcladlou: The following tests failed, say
Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
|
The next architectural thing I'll be playing with is the assumption the controller currently makes that the GoAlert secret needs projected into a customer cluster, which is an assumption coupled to the implementation details of the ROSA Classic topology. For hypershift, the operator will be running on a management cluster hosting the control planes, and would be generating GoAlert Service endpoints to be consumed by a management cluster process responsible for e.g. syncing AlertManager configs for the co-located hosted clusters. So Hive syncsets wouldn't be involved at all. Now that I've said written that out, it makes me wonder if there's really a need to make the API flexible at all. I don't know of a use case where we would run a single GoAlert Operator on a cluster that's managing both hypershift and hive clusterdeployments. In practice we would only ever run it on a hive cluster or a management cluster, period. To me this says the overall behavior could instead be modal instead of API driven. For example, keep the existing API, but drive whether to process ClusterDeployments or HostedClusters based on an operator mode (e.g. Tomorrow I'm going to make a commit to demonstrate that and see how it compares. |
🚧 WIP: hypershift integration 🚧
Opening this exploratory PR early so others can get an idea of where my mind is going and discuss.
The idea is to make a backwards-compatible change to the API to support mapping
goalertintegrationsto different cluster representations: Hiveclusterdeploymentsand Hypershifthostedcluster. Internally, I'm refactoring the reconciliation logic to decouple from the Hive API and instead work with theclient.Objectinterface, using the concrete cluster API types only where needed (e.g. for extracting metadata for the cluster name, ID, etc.)Since the hypershift API is still external to
openshift/api, to use those concrete types we'll have to importgithub.com/openshift/hypershiftwhich may end up forcing an upgrade to the k8s and controller-runtime versions (which I think may introduce more refactoring, we'll see).I'll also probably introduce some tests for the reconciler (using a fake client) as needed.
Update 1: re: adding a dependency on the Hypershift API, I had totally missed and forgotten that I actually made the API a submodule long ago for this very reason. Thanks, old me: openshift/hypershift@d7c2eed
Update 2: The next architectural thing I'll be playing with is the assumption the controller currently makes that the GoAlert secret needs projected into a customer cluster, which is an assumption coupled to the implementation details of the ROSA Classic topology. For hypershift, the operator will be running on a management cluster hosting the control planes, and would be generating GoAlert Service endpoints to be consumed by a management cluster process responsible for e.g. syncing AlertManager configs for the co-located hosted clusters. So Hive syncsets wouldn't be involved at all.
Now that I've said written that out, it makes me wonder if there's really a need to make the API flexible at all. I don't know of a use case where we would run a single GoAlert Operator on a cluster that's managing both hypershift and hive clusterdeployments. In practice we would only ever run it on a hive cluster or a management cluster, period. To me this says the overall behavior could instead be modal instead of API driven. For example, keep the existing API, but drive whether to process ClusterDeployments or HostedClusters based on an operator mode (e.g.
--cluster-mode=[hive|hypershift]). That would simply a few things.Tomorrow I'm going to make a commit to demonstrate that and see how it compares.