-
Notifications
You must be signed in to change notification settings - Fork 25
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
Add State to ControlPlane.Spec.Crossplane for managing the crossplane state #103
Conversation
8846930
to
fec342e
Compare
fec342e
to
eabb9bd
Compare
…iation/pause policies Signed-off-by: Sergen Yalçın <[email protected]>
eabb9bd
to
fdb1a8e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Gave it a quick look. Need to check the one pager for a deeper review
// ReconciliationPolicy specifies the reconciliation policies on the | ||
// crossplane and the workloads that work on the ControlPlane |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe smt like this:
// ReconciliationPolicy specifies the reconciliation policies on the | |
// crossplane and the workloads that work on the ControlPlane | |
// ReconciliationPolicy specifies the reconciliation policies of the | |
// ControlPlane's Crossplane and providers |
Not sure if there are any other workloads then the provider?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lsviben The idea is pausing all crossplane and provider reconciliations on the CP not other ones. So, these workloads were mentioned.
// ControlPlane | ||
// +kubebuilder:validation:Enum=None;AllCrossplane | ||
// +kubebuilder:default=None | ||
PausedControllers string `json:"pausedControllers,omitempty"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PausePolicy
as an alterative to PausedControllers
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Controller is not a concept in the product, neither in Crossplane.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
like spec.crossplane.state: Paused | Running
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And I have a possible 🔴 here: do we know what comes next with simulations? Do we have to stop providers one-by-one? Or keep Crossplane running, but disable all providers? We at least need a plan for that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To be clear, this is not an API we're building for Simulation work, as discussed here, rather something independent. I agree that there could be overlaps, and we should better find an API that could serve for both purposes, but don't think we should we should block this work with simulation work.
Probably @negz is the best person to comment here on whether this API could be needed/useful for simulations or something totally independent.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right now I'm "pausing" providers by using a DeploymentRuntimeConfig to scale them to zero replicas. This applies to all providers in the simulated control plane.
In a simulation there's no reason that I can think of to run the provider controller at all. So we want Crossplane core controllers to run, but not provider controllers.
In the design doc I discuss a ConnectedSimulation
, which would run all MRs observe only. If we build that, it'll need Providers to run and will need to manipulate their management policy, rather than pausing them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Implemented this -> spec.crossplane.state: Paused | Running
Thanks @sttts for the suggestion.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Have approved.
// ControlPlane | ||
// +kubebuilder:validation:Enum=None;AllCrossplane | ||
// +kubebuilder:default=None | ||
PausedControllers string `json:"pausedControllers,omitempty"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To be clear, this is not an API we're building for Simulation work, as discussed here, rather something independent. I agree that there could be overlaps, and we should better find an API that could serve for both purposes, but don't think we should we should block this work with simulation work.
Probably @negz is the best person to comment here on whether this API could be needed/useful for simulations or something totally independent.
Signed-off-by: Sergen Yalçın <[email protected]>
…plane keyword Signed-off-by: Sergen Yalçın <[email protected]>
Description of your changes
This PR proposes adding the
State
API to theControlPlane.Spec.Crossplane
API to manage the crossplane related workloads states.. The idea is to have reconciliation management on resources at theControlPlane
level.The default value is
Running
. Other possible value isPaused
.When the
Paused
value is set, all crossplane and provider workloads in the ControlPlane will be paused/scaled down.When the
Running
value is set, all crossplane and provider workloads in the ControlPlane will be restarted/scaled up.I have:
make reviewable
to ensure this PR is ready for review.backport release-x.y
labels to auto-backport this PR, as appropriate.How has this code been tested
Tested with the controller that is responsible of the processing this API field.