feat: Direct lifecycle control of instances#51
Merged
joshlreese merged 1 commit intomainfrom Jun 18, 2025
Merged
Conversation
Instance control: Introduced an instance control library, with a stateful implementation inspired by Kubernetes StatefulSets. The implementation does not consider adoption of instances, which are always owned by a WorkloadDeployment. This library returns a set of actions for the caller to consider and execute. It is possible for actions to be returned that will not be executed, but can be useful in troubleshooting or bringing visibility into the progress of a rollout. This design also opens the door for allowing bursting or parallel application of instance changes. Instance control is managed at the context of a WorkloadDeployment, with actions being built up by the instance control strategy chosen, and executed by the reconciler. Once an instance has no scheduling gates, the provider responsible for the location which it is attached to will be responsible for for provisioning the instance and updating the `Programmed` and `Running` conditions with success or failure information. Once an Instance is seen as both Programmed and Running, it will be considered Ready. Scheduling gates: An instance can have one or more scheduling gates added to its spec, which are used to indicate to other systems that the instance may not be at a state to be processed. The initial scheduling gate of `Network` results in instances not being processed until the network they are attached to is ready. Scheduling gates for quota claims, volumes, or other dependencies should be expected to come in future revisions. CRD improvements: - Refined default conditions and printer columns for Workloads, WorkloadDeployments, and Instances. - Added many more condition reasons to communicate the state of resources. - Added ReadyReplicas to Workloads and WorkloadDeployments. Network readiness: The operator will now ensure that networks being attached to are ready for use, and at least one subnet has been issued to any network context with an attached instance. Subnet issuance occurs by creating a SubnetClaim, and waiting for it to be issued a prefix by controllers in network-services-operator. General improvements: - Improved garbage collection logic. - Propagation of errors from related resources to the instance, such as network creation failures.
83dde68 to
69c65e1
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Instance control
Introduced an instance control library, with a stateful implementation inspired by Kubernetes StatefulSets. The implementation does not consider adoption of instances, which are always owned by a WorkloadDeployment. This library returns a set of actions for the caller to consider and execute. It is possible for actions to be returned that will not be executed, but can be useful in troubleshooting or bringing visibility into the progress of a rollout. This design also opens the door for allowing bursting or parallel application of instance changes.
Instance control is managed at the context of a WorkloadDeployment, with actions being built up by the instance control strategy chosen, and executed by the reconciler.
Once an instance has no scheduling gates, the provider responsible for the location which it is attached to will be responsible for for provisioning the instance and updating the
ProgrammedandRunningconditions with success or failure information. Once an Instance is seen as both Programmed and Running, it will be considered Ready.Scheduling gates
An instance can have one or more scheduling gates added to its spec, which are used to indicate to other systems that the instance may not be at a state to be processed. The initial scheduling gate of
Networkresults in instances not being processed until the network they are attached to is ready. Scheduling gates for quota claims, volumes, or other dependencies should be expected to come in future revisions.CRD improvements
Network readiness
The operator will now ensure that networks being attached to are ready for use, and at least one subnet has been issued to any network context with an attached instance. Subnet issuance occurs by creating a SubnetClaim, and waiting for it to be issued a prefix by controllers in network-services-operator.
General improvements
Enhancement: datum-cloud/enhancements#28
Related work: