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

fix: update statefulset name #23

Open
bob202211 opened this issue Jul 24, 2023 · 0 comments
Open

fix: update statefulset name #23

bob202211 opened this issue Jul 24, 2023 · 0 comments
Assignees
Labels
✨ Feature 기능 개발 🔨 Refactor 코드 리팩토링

Comments

@bob202211
Copy link
Contributor

bob202211 commented Jul 24, 2023

If you look at the current createStatefulset function, it doesn't take a name as a parameter, so it's only created with the name written in the yaml file. This makes it difficult to distinguish it from other stateful resources. I think the name should be a combination of rack,name,regions.

func (r *InfraBlockSpaceReconciler) createStatefulSet(ctx context.Context, reqInfraBlockSpace *infrablockspacenetv1alpha1.InfraBlockSpace) (ctrl.Result, error) {

	initContainers := r.getInitContainers(reqInfraBlockSpace)
	mainContainers := r.getMainContainers(reqInfraBlockSpace)
	volumes := r.getVolumes(reqInfraBlockSpace)

	statefulSet := &appsv1.StatefulSet{
		ObjectMeta: metav1.ObjectMeta{
			Name:      reqInfraBlockSpace.Name,
			Namespace: reqInfraBlockSpace.Namespace,
		},
          ......
}
@bob202211 bob202211 added ✨ Feature 기능 개발 🔨 Refactor 코드 리팩토링 labels Jul 24, 2023
@bob202211 bob202211 self-assigned this Jul 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨ Feature 기능 개발 🔨 Refactor 코드 리팩토링
Projects
None yet
Development

No branches or pull requests

1 participant