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

Proposal: Allow specifying resource requests/limits for critical control plane workloads #378

Closed
csrwng opened this issue Jul 23, 2021 · 1 comment

Comments

@csrwng
Copy link
Contributor

csrwng commented Jul 23, 2021

Within a hypershift control plane certain workloads can vary in resource requirements depending on the size/usage of the guest cluster that they are hosting. Particularly, these can be:

  1. Etcd
  2. Kubernetes API Server
  3. Kubernetes Controller Manager

A service provider needs to be able to control resource requests for these workloads (see #239). This is either to pre-allocate a predetermined size based on a cluster t-shirt size (Small, Med, Large) or dynamically to accommodate higher demand.

We can allow specifying these request sizes in the HostedCluster spec.

Either by adding a field that points to a struct that contains all resource requests:

type HostedClusterSpec struct {
  ...
  Resources HostedClusterResources
}

type HostedClusterResources struct {
  Etcd corev1.ResourceRequirements
  KubeAPIServer corev1.ResourceRequirements
  KubeControllerManager corev1.ResourceRequirements
}

Or, adding a field for each component. Here we have the advantage that we already have an Etcd field and a ManagedEtcd struct which can contain the ResourceRequirements, given that if Etcd is not managed, it doesn't make sense to specify them:

type HostedClusterSpec struct {
  Etcd EtcdSpec
  KubeAPIServer ControlPlaneComponentSpec
  KubeControllerManager ControlPlaneComponentSpec
}

type EtcdSpec {
  Managed ManagedEtcdSpec
  Unmanaged UnmanagedEtcdSpec
}

type ManagedEtcdSpec struct {
  Resources corev1.ResourceRequirements
}

type ControlPlaneComponentSpec struct {
  Resources corev1.ResourceRequirements
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants