Skip to content

Conversation

Rajdeep1311
Copy link

What do these changes do?

Created a yaml file for Horizontal Pod Autoscaler (HPA) that scales up and down the vineyard cluster according to the memory usage by the cluster

Related issue number

Fixes #1302

Rajdeep1311 and others added 3 commits July 30, 2025 14:57
Signed-off-by: Rajdeep Pal <[email protected]>
Signed-off-by: Rajdeep Pal <[email protected]>
Signed-off-by: Rajdeep Pal <[email protected]>
@dashanji
Copy link
Member

@Rajdeep1311 The target should not be the vineyard-controller-manager, and it should be the vineyard cluster. Please refer the doc https://v6d.io/notes/cloud-native/deploy-kubernetes.html#option-1-install-from-helm-chart-recommended

@Rajdeep1311
Copy link
Author

@dashanji Sir am I supposed to include the HPA in such a way that when the vineyard cluster is deployed, the hpa also runs. And include the values of hpa in values.yaml?

@dashanji
Copy link
Member

okay, after that you would better to add a doc to show a complete example.

@Rajdeep1311
Copy link
Author

okay, after that you would better to add a doc to show a complete example.

@dashanji Sure sir

@Rajdeep1311
Copy link
Author

Rajdeep1311 commented Jul 31, 2025

@dashanji Sir, could you please review the PR?

@dashanji
Copy link
Member

dashanji commented Aug 4, 2025

Hi @Rajdeep1311, I think you may misunderstand the target resource defined in the scaleTargetRef. It should be the vineyard cluster rather than the vineyard operator.
You can refer to the doc (https://v6d.io/tutorials/kubernetes/using-vineyard-operator.html) to create a vineyard cluster and get some insights from it.

@Rajdeep1311
Copy link
Author

@dashanji okay sir, I will see to it

@Rajdeep1311
Copy link
Author

Hi @Rajdeep1311, I think you may misunderstand the target resource defined in the scaleTargetRef. It should be the vineyard cluster rather than the vineyard operator. You can refer to the doc (https://v6d.io/tutorials/kubernetes/using-vineyard-operator.html) to create a vineyard cluster and get some insights from it.

Sir @dashanji , will the scaleTargetRef be the vineyard cluster created as a custom resource?

@dashanji
Copy link
Member

dashanji commented Aug 4, 2025

Sir @dashanji , will the scaleTargetRef be the vineyard cluster created as a custom resource?

Yes.

@Rajdeep1311
Copy link
Author

Rajdeep1311 commented Aug 4, 2025

Sir @dashanji , will the scaleTargetRef be the vineyard cluster created as a custom resource?

Yes.

Sir, I am facing a problem, the vineyardd custom resource (CR) isn't populating the .status.selector, I need that field so that the HPA can patch up with the cluster. As of now, I'm getting a selector is required error from the HPA that I am creating. I need the selectors so that HPA can identify the vineyard cluster.

Also, can we connect somewhere so that it will be easier for us to communicate?

@dashanji
Copy link
Member

Sir, I am facing a problem, the vineyardd custom resource (CR) isn't populating the .status.selector, I need that field so that the HPA can patch up with the cluster. As of now, I'm getting a selector is required error from the HPA that I am creating. I need the selectors so that HPA can identify the vineyard cluster.

You can use the vineyard deployments' selector rather than the vineyardd CR.

@Rajdeep1311
Copy link
Author

Rajdeep1311 commented Aug 26, 2025

Sir, I am facing a problem, the vineyardd custom resource (CR) isn't populating the .status.selector, I need that field so that the HPA can patch up with the cluster. As of now, I'm getting a selector is required error from the HPA that I am creating. I need the selectors so that HPA can identify the vineyard cluster.

You can use the vineyard deployments' selector rather than the vineyardd CR.

Yeah, sir, I will get it from the deployment, but I think I was not able to communicate my question properly.
So, will I point the scaleTargetRef to the deployment created by the vineyard custom resource? But we need to scale the vineyard custom resource, right, Sir, not the deployment created by the custom resource? @dashanji

If we need to scale the custom resource itself, then the HPA needs the status.selector field to be populated on creation of the CR, we cannot provide that manually, sir, but it is not happening. The HPA needs status.selector to identify the CR.

@dashanji

@github-actions github-actions bot added the stale label Sep 12, 2025
Copy link
Contributor

/cc @sighingnow, this issus/pr has had no activity for a long time, please help to review the status and assign people to work on it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support autoscaling of vineyard cluster on the kubernetes.
2 participants