Skip to content
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

feat: support heterogeneous pods by managing pods directly #6776

Merged
merged 76 commits into from
Mar 21, 2024

Conversation

free6om
Copy link
Contributor

@free6om free6om commented Mar 7, 2024

close #5799

  1. provide API to support multiple instance(pod) templates in one component (current customizable fields: pod name, pod name prefix, annotation, label, node name, node selector, toleration, image, resources, volume, volume mount and volume claim template)
  2. manage pods and pvcs directly by default
  3. keep the existing clusters untouched by auto-detection
  4. keep (almost) the same behaviors as StatefulSet when there is only one instance(pod) template

todo:

  1. designated pods scaling down
  2. instance template compression API
  3. in-place update(annotation, label, tolerations, image, activeDeadlineSeconds and resources)
  4. pvc management policy
  5. member reconfiguration

@free6om free6om added the feature label Mar 7, 2024
@free6om free6om added this to the Release 0.9.0 milestone Mar 7, 2024
@free6om free6om self-assigned this Mar 7, 2024
@github-actions github-actions bot added the size/XXL Denotes a PR that changes 1000+ lines. label Mar 7, 2024
@free6om free6om marked this pull request as ready for review March 20, 2024 07:04
apis/apps/v1alpha1/cluster_types.go Outdated Show resolved Hide resolved
// Defines the name of the instance.
// Only applied when Replicas is 1.
// +optional
Name *string `json:"name,omitempty"`
Copy link
Contributor

Choose a reason for hiding this comment

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

why not using instanceName, Name gave me the illusion of being a template name

Copy link
Contributor

Choose a reason for hiding this comment

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

This name should be unique, right?

// group the pod templates by template.Name if set or by template.GenerateName
replicaTemplateGroups := make(map[string][]*podTemplateSpecExt)
for _, template := range podTemplates {
name := template.Name
Copy link
Contributor

Choose a reason for hiding this comment

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

template.name must be unique. otherwise will be override

Copy link
Contributor Author

Choose a reason for hiding this comment

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

duplicate template.name is an invalid request and will be refused by the rsm2 controller.

}
}
if isCreated(pod) && !isTerminating(pod) {
switch revision, ok := rsm.Status.UpdateRevisions[pod.Name]; {
Copy link
Contributor

Choose a reason for hiding this comment

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

If the replicas of RSM are large, will it cause the struct to swell?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

will add instance template compression API in next PR.

@free6om free6om requested a review from leon-inf March 20, 2024 10:58
@free6om free6om requested a review from Y-Rookie March 21, 2024 08:37
@free6om free6om merged commit 65c95ba into main Mar 21, 2024
87 checks passed
@free6om free6om deleted the support/rsm-manages-pod branch March 21, 2024 10:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/user-interaction feature size/XXL Denotes a PR that changes 1000+ lines.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Features] RSM Heterogeneous Pods Supports
5 participants