-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Support scale up of nodepool with zero nodes with ephemeral storage r… #6607
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/* | ||
Copyright 2021-2024 Oracle and/or its affiliates. | ||
*/ | ||
|
||
package common | ||
|
||
import ( | ||
oke "k8s.io/autoscaler/cluster-autoscaler/cloudprovider/oci/vendor-internal/github.com/oracle/oci-go-sdk/v65/containerengine" | ||
) | ||
|
||
// TagsGetter returns the oci tags for the pool. | ||
type TagsGetter interface { | ||
GetNodePoolFreeformTags(*oke.NodePool) (map[string]string, error) | ||
} | ||
|
||
// TagsGetterImpl is the implementation to fetch the oci tags for the pool. | ||
type TagsGetterImpl struct{} | ||
|
||
// CreateTagsGetter creates a new oci tags getter. | ||
func CreateTagsGetter() TagsGetter { | ||
return &TagsGetterImpl{} | ||
} | ||
|
||
// GetNodePoolFreeformTags returns the FreeformTags for the nodepool | ||
func (tgi *TagsGetterImpl) GetNodePoolFreeformTags(np *oke.NodePool) (map[string]string, error) { | ||
return np.FreeformTags, nil | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,4 +25,7 @@ const ( | |
// ToBeDeletedByClusterAutoscaler is the taint used to ensure that after a node has been called to be deleted | ||
// no more pods will schedule onto it | ||
ToBeDeletedByClusterAutoscaler = "ignore-taint.cluster-autoscaler.kubernetes.io/oke-impending-node-termination" | ||
|
||
// EphemeralStorageSize is the freeform tag key that would be used to determine the ephemeral-storage size of the node | ||
EphemeralStorageSize = "cluster-autoscaler/node-ephemeral-storage" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why are we using free-form tags to provide local disk information? Is there something special about the scale from There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Assuming ephemeral storage (like memory and CPU) can be determined from the shape, it is still useful to optionally support using free-form tags to override shape specific values like CPU, memory, ephemeral-storage, GPU, etc.. However, in my opinion, the values from core.shape should remain the default source resource information for a node when they are available. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. OK... after looking into this more, it looks like most shapes use "block storage only". This means that most of the time I still think it's a good idea for both the node-pool and instance-pool implementations to check for and use |
||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Given that this is an OKE specific implementation, I'm on the fence whether we should make the name indicate that it's custom/OKE specific. 🤔