-
Notifications
You must be signed in to change notification settings - Fork 431
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
Adopt a Reconcile/Delete pattern for exported methods #110
Comments
/milestone v1alpha1 |
/assign |
/kind design |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
Stale issues rot after 30d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
Rotten issues close after 30d of inactivity. Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
@fejta-bot: Closing this issue. In response to this:
Instructions 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/test-infra repository. |
/reopen |
Have we considered implementing our services as CRDs? @justaugustus |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
Stale issues rot after 30d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
/remove-lifecycle rotten |
@justaugustus is it okay if I help out with this? |
/assign |
/close in favor of #757 |
@CecileRobertMichon: Closing this issue. In response to this:
Instructions 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/test-infra repository. |
Describe the solution you'd like
The goals are two-fold here:
For each actuator reconciler, we currently have Reconcile and Delete methods which operate over the lower-level Azure resources.
Instead of handling implementation details in the top-level reconciler, we should scope them to the resources that they're operating over. As an example, a
SubnetSpec
should instead be generated/manipulated by a subnet reconciler:cluster-api-provider-azure/pkg/cloud/azure/actuators/cluster/reconciler.go
Lines 108 to 113 in 0b7cf77
As a concrete reference, see the
ReconcileNetwork()
method for Cluster API Provider AWS.A secondary problem is that in our current actuator reconciler model, we make a variety of Create/Update calls to the Azure API, in instances where a Get would suffice. This means we're attempting to modify a majority of the Azure resources we create on every round-trip of a reconciler.
Finally, we do not fully utilize the defined types in the capz API, instead accepting an ambiguous spec and returning a loosely-defined interface, instead of a concrete type.
This means that we are required to query Azure for cluster/machine information, instead of being able to reference the
ClusterSpec
,ClusterStatus
,MachineSpec
, andMachineStatus
directly, which should be our sources of truth.As a solution, we can:
Service
interface to present only Reconcile and Delete methodsGetterService
) to represent packages that don't adhere to the Reconcile/Delete modelCreateOrUpdate
/Get
s as unexported methods (only to be used by the package-level Reconcile/Delete)GetterService
interfaceThe work to accomplish this has begun in #174.
ref: #92
/kind feature
The text was updated successfully, but these errors were encountered: