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

Scale up storage capacity #1

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open

Conversation

Flask
Copy link

@Flask Flask commented Sep 23, 2022

Which component this PR applies to?

What type of PR is this?

What this PR does / why we need it:

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?


Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:


pohly and others added 8 commits September 20, 2022 14:59
Whether a pod has unbound volumes influences scheduling decisions and
thus the scale up decisions in cluster autoscaler.

These three new test cases cover:
- a pod with an unbound pvc using late binding -> can scale up
- the same with storage capacity feature enabled -> cannot scale up
  without CSIStorageCapacity
- the same with manually configured CSIStorageCapacity -> can scale up
The assumption that all node labels except for the hostname label can be copied
verbatim does not hold for CSI drivers which manage local storage: those
drivers have a topology label where the value also depends on the hostname. It
might be the same as the Kubernetes hostname, but that cannot be assumed.

To solve this, search/replace with regular expressions can be defined to modify
those labels. This then can be used to inform the autoscaler about available
capacity on new nodes:

   --replace-labels ';^topology.hostpath.csi/node=aks-workerpool.*;topology.hostpath.csi/node=aks-workerpool-template;'

   kubectl apply -f - <<EOF
apiVersion: storage.k8s.io/v1beta1
kind: CSIStorageCapacity
metadata:
  name: aks-workerpool-fast-storage
  namespace: kube-system
capacity: 100Gi
maximumVolumeSize: 100Gi
nodeTopology:
  matchLabels:
    # This never matches a real node, only the node templates
    # inside cluster-autoscaler.
    topology.hostpath.csi/node: aks-workerpool-template
storageClassName: csi-hostpath-fast
EOF
When a new node becomes ready, a CSI driver is not going to be running on it
immediately. This can cause the cluster autoscaler to scale up once more
because of pending pods that can run on that new node once the driver is ready.

The actual check is about CSIStorageCapacity. By comparing the published
information about the new node against the information for a template node, we
can determine whether the CSI driver is done with starting up on the node.

The new CSI processor needs information about existing CSIStorageCapacity
objects in the cluster, just like the scheduler predicate. Both can share the
same informer. For that to work, managing the informer factory must be moved up
the call chain so that the setup code for both can use the same factory.
mweibel pushed a commit that referenced this pull request Apr 17, 2024
Update CA_with_AWS_IAM_OIDC.md
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

Successfully merging this pull request may close these issues.

2 participants