Skip to content

Commit b23a491

Browse files
authored
Merge pull request #2667 from ConnorJC3/depbump150
Bump dependencies for release v1.49.0
2 parents 40bf3d3 + 9e5fd6e commit b23a491

File tree

12 files changed

+172
-71
lines changed

12 files changed

+172
-71
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ ARG VERSION
2828
ARG GOEXPERIMENT
2929
RUN --mount=type=cache,target=/gomodcache --mount=type=cache,target=/gocache OS=$TARGETOS ARCH=$TARGETARCH make
3030

31-
FROM public.ecr.aws/eks-distro-build-tooling/eks-distro-minimal-base-csi-ebs:latest-al23@sha256:7f24b7586a8879c13911024174f30c45f0fe52f8ab2c5061a6d0a3ae6771c44a AS linux-al2023
31+
FROM public.ecr.aws/eks-distro-build-tooling/eks-distro-minimal-base-csi-ebs:latest-al23@sha256:cc8243a719217c06acfb957fe8dd05eb26957d48d5b52e9a073170722a10c498 AS linux-al2023
3232
COPY --from=builder /go/src/github.com/kubernetes-sigs/aws-ebs-csi-driver/bin/aws-ebs-csi-driver /bin/aws-ebs-csi-driver
3333
ENTRYPOINT ["/bin/aws-ebs-csi-driver"]
3434

Makefile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,9 @@ update/generate-license-header:
342342

343343
.PHONY: generate-volume-limits-table
344344
generate-volume-limits-table:
345-
go run hack/generate-volume-limits-table.go > pkg/cloud/volume_limits_table.go
345+
go run ./hack/generate-volume-limits-table > pkg/cloud/volume_limits_table.go
346+
gofmt -s -w pkg/cloud/volume_limits_table.go
347+
go run ./hack/detect-potentially-invalid-limits
346348

347349
## Verifiers
348350
# Linters and similar

charts/aws-ebs-csi-driver/values.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ sidecars:
155155
image:
156156
pullPolicy: IfNotPresent
157157
repository: public.ecr.aws/ebs-csi-driver/volume-modifier-for-k8s
158-
tag: "v0.7.0"
158+
tag: "v0.8.0"
159159
leaderElection:
160160
enabled: true
161161
# Optional values to tune lease behavior.
@@ -529,4 +529,4 @@ debugLogs: false
529529
helmTester:
530530
enabled: true
531531
# Supply a custom image to the ebs-csi-driver-test pod in helm-tester.yaml
532-
image: "us-central1-docker.pkg.dev/k8s-staging-test-infra/images/kubekins-e2e:v20250815-171060767f-master"
532+
image: "us-central1-docker.pkg.dev/k8s-staging-test-infra/images/kubekins-e2e:v20250905-c89b045f57-master"

go.mod

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@ module github.com/kubernetes-sigs/aws-ebs-csi-driver
22

33
require (
44
github.com/aws/aws-sdk-go-v2 v1.39.0
5-
github.com/aws/aws-sdk-go-v2/config v1.31.8
5+
github.com/aws/aws-sdk-go-v2/config v1.31.9
66
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.7
7-
github.com/aws/aws-sdk-go-v2/service/ec2 v1.251.2
7+
github.com/aws/aws-sdk-go-v2/service/ec2 v1.253.0
88
github.com/aws/aws-sdk-go-v2/service/sagemaker v1.215.1
99
github.com/aws/aws-sdk-go-v2/service/sts v1.38.4
1010
github.com/aws/smithy-go v1.23.0
11-
github.com/awslabs/volume-modifier-for-k8s v0.7.0
11+
github.com/awslabs/volume-modifier-for-k8s v0.8.0
1212
github.com/container-storage-interface/spec v1.11.0
1313
github.com/golang/mock v1.6.0
1414
github.com/google/go-cmp v0.7.0
@@ -40,14 +40,14 @@ require (
4040
require (
4141
github.com/Masterminds/semver/v3 v3.4.0 // indirect
4242
github.com/Microsoft/go-winio v0.6.2 // indirect
43-
github.com/aws/aws-sdk-go-v2/credentials v1.18.12 // indirect
43+
github.com/aws/aws-sdk-go-v2/credentials v1.18.13 // indirect
4444
github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.7 // indirect
4545
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.7 // indirect
4646
github.com/aws/aws-sdk-go-v2/internal/ini v1.8.3 // indirect
4747
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.1 // indirect
4848
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.7 // indirect
4949
github.com/aws/aws-sdk-go-v2/service/sso v1.29.3 // indirect
50-
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.34.4 // indirect
50+
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.34.5 // indirect
5151
github.com/beorn7/perks v1.0.1 // indirect
5252
github.com/blang/semver/v4 v4.0.0 // indirect
5353
github.com/cenkalti/backoff/v5 v5.0.3 // indirect
@@ -109,8 +109,8 @@ require (
109109
golang.org/x/term v0.35.0 // indirect
110110
golang.org/x/text v0.29.0 // indirect
111111
golang.org/x/tools v0.36.0 // indirect
112-
google.golang.org/genproto/googleapis/api v0.0.0-20250908214217-97024824d090 // indirect
113-
google.golang.org/genproto/googleapis/rpc v0.0.0-20250908214217-97024824d090 // indirect
112+
google.golang.org/genproto/googleapis/api v0.0.0-20250922171735-9219d122eba9 // indirect
113+
google.golang.org/genproto/googleapis/rpc v0.0.0-20250922171735-9219d122eba9 // indirect
114114
gopkg.in/evanphx/json-patch.v4 v4.13.0 // indirect
115115
gopkg.in/inf.v0 v0.9.1 // indirect
116116
gopkg.in/yaml.v2 v2.4.0 // indirect

go.sum

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ github.com/Microsoft/go-winio v0.6.2 h1:F2VQgta7ecxGYO8k3ZZz3RS8fVIXVxONVUPlNERo
77
github.com/Microsoft/go-winio v0.6.2/go.mod h1:yd8OoFMLzJbo9gZq8j5qaps8bJ9aShtEA8Ipt1oGCvU=
88
github.com/aws/aws-sdk-go-v2 v1.39.0 h1:xm5WV/2L4emMRmMjHFykqiA4M/ra0DJVSWUkDyBjbg4=
99
github.com/aws/aws-sdk-go-v2 v1.39.0/go.mod h1:sDioUELIUO9Znk23YVmIk86/9DOpkbyyVb1i/gUNFXY=
10-
github.com/aws/aws-sdk-go-v2/config v1.31.8 h1:kQjtOLlTU4m4A64TsRcqwNChhGCwaPBt+zCQt/oWsHU=
11-
github.com/aws/aws-sdk-go-v2/config v1.31.8/go.mod h1:QPpc7IgljrKwH0+E6/KolCgr4WPLerURiU592AYzfSY=
12-
github.com/aws/aws-sdk-go-v2/credentials v1.18.12 h1:zmc9e1q90wMn8wQbjryy8IwA6Q4XlaL9Bx2zIqdNNbk=
13-
github.com/aws/aws-sdk-go-v2/credentials v1.18.12/go.mod h1:3VzdRDR5u3sSJRI4kYcOSIBbeYsgtVk7dG5R/U6qLWY=
10+
github.com/aws/aws-sdk-go-v2/config v1.31.9 h1:Q+9hVk8kmDGlC7XcDout/vs0FZhHnuPCPv+TRAYDans=
11+
github.com/aws/aws-sdk-go-v2/config v1.31.9/go.mod h1:OpMrPn6rRbHKU4dAVNCk/EQx8sEQJI7hl9GZZ5u/Y+U=
12+
github.com/aws/aws-sdk-go-v2/credentials v1.18.13 h1:gkpEm65/ZfrGJ3wbFH++Ki7DyaWtsWbK9idX6OXCo2E=
13+
github.com/aws/aws-sdk-go-v2/credentials v1.18.13/go.mod h1:eVTHz1yI2/WIlXTE8f70mcrSxNafXD5sJpTIM9f+kmo=
1414
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.7 h1:Is2tPmieqGS2edBnmOJIbdvOA6Op+rRpaYR60iBAwXM=
1515
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.7/go.mod h1:F1i5V5421EGci570yABvpIXgRIBPb5JM+lSkHF6Dq5w=
1616
github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.7 h1:UCxq0X9O3xrlENdKf1r9eRJoKz/b0AfGkpp3a7FPlhg=
@@ -19,8 +19,8 @@ github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.7 h1:Y6DTZUn7ZUC4th9FMBb
1919
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.7/go.mod h1:x3XE6vMnU9QvHN/Wrx2s44kwzV2o2g5x/siw4ZUJ9g8=
2020
github.com/aws/aws-sdk-go-v2/internal/ini v1.8.3 h1:bIqFDwgGXXN1Kpp99pDOdKMTTb5d2KyU5X/BZxjOkRo=
2121
github.com/aws/aws-sdk-go-v2/internal/ini v1.8.3/go.mod h1:H5O/EsxDWyU+LP/V8i5sm8cxoZgc2fdNR9bxlOFrQTo=
22-
github.com/aws/aws-sdk-go-v2/service/ec2 v1.251.2 h1:6TssXFfLHcwUS5E3MdYKkCFeOrYVBlDhJjs5kRJp0ic=
23-
github.com/aws/aws-sdk-go-v2/service/ec2 v1.251.2/go.mod h1:MXJiLJZtMqb2dVXgEIn35d5+7MqLd4r8noLen881kpk=
22+
github.com/aws/aws-sdk-go-v2/service/ec2 v1.253.0 h1:x0v1n45AT+uZvNoQI8xtegVUOZoQIF+s9qwNcl7Ivyg=
23+
github.com/aws/aws-sdk-go-v2/service/ec2 v1.253.0/go.mod h1:MXJiLJZtMqb2dVXgEIn35d5+7MqLd4r8noLen881kpk=
2424
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.1 h1:oegbebPEMA/1Jny7kvwejowCaHz1FWZAQ94WXFNCyTM=
2525
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.1/go.mod h1:kemo5Myr9ac0U9JfSjMo9yHLtw+pECEHsFtJ9tqCEI8=
2626
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.7 h1:mLgc5QIgOy26qyh5bvW+nDoAppxgn3J2WV3m9ewq7+8=
@@ -29,14 +29,14 @@ github.com/aws/aws-sdk-go-v2/service/sagemaker v1.215.1 h1:KKqYw88o9dAaD4Cr36kw6
2929
github.com/aws/aws-sdk-go-v2/service/sagemaker v1.215.1/go.mod h1:fKQyhwdNeHKwwLhdvxw31qUtK+rYr8i/8e9wA8eHa+A=
3030
github.com/aws/aws-sdk-go-v2/service/sso v1.29.3 h1:7PKX3VYsZ8LUWceVRuv0+PU+E7OtQb1lgmi5vmUE9CM=
3131
github.com/aws/aws-sdk-go-v2/service/sso v1.29.3/go.mod h1:Ql6jE9kyyWI5JHn+61UT/Y5Z0oyVJGmgmJbZD5g4unY=
32-
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.34.4 h1:e0XBRn3AptQotkyBFrHAxFB8mDhAIOfsG+7KyJ0dg98=
33-
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.34.4/go.mod h1:XclEty74bsGBCr1s0VSaA11hQ4ZidK4viWK7rRfO88I=
32+
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.34.5 h1:gBBZmSuIySGqDLtXdZiYpwyzbJKXQD2jjT0oDY6ywbo=
33+
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.34.5/go.mod h1:XclEty74bsGBCr1s0VSaA11hQ4ZidK4viWK7rRfO88I=
3434
github.com/aws/aws-sdk-go-v2/service/sts v1.38.4 h1:PR00NXRYgY4FWHqOGx3fC3lhVKjsp1GdloDv2ynMSd8=
3535
github.com/aws/aws-sdk-go-v2/service/sts v1.38.4/go.mod h1:Z+Gd23v97pX9zK97+tX4ppAgqCt3Z2dIXB02CtBncK8=
3636
github.com/aws/smithy-go v1.23.0 h1:8n6I3gXzWJB2DxBDnfxgBaSX6oe0d/t10qGz7OKqMCE=
3737
github.com/aws/smithy-go v1.23.0/go.mod h1:t1ufH5HMublsJYulve2RKmHDC15xu1f26kHCp/HgceI=
38-
github.com/awslabs/volume-modifier-for-k8s v0.7.0 h1:0FcmGnozvKPad/vfWTuH0csyR6EPMHGSQqwlNCe1o9w=
39-
github.com/awslabs/volume-modifier-for-k8s v0.7.0/go.mod h1:MHZMgviQui0riKoBqpAD7ZqJYhOnx9I+Lsen2xlLJ3A=
38+
github.com/awslabs/volume-modifier-for-k8s v0.8.0 h1:3s4v0YQAs7ElqReCv7nmwPN94ugeI+C0gIlhSxc2oNs=
39+
github.com/awslabs/volume-modifier-for-k8s v0.8.0/go.mod h1:lTP3RhDlXeLNS9nlsdoE6QezrM83DUen4r+TV+N6Cbc=
4040
github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=
4141
github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw=
4242
github.com/blang/semver/v4 v4.0.0 h1:1PFHFE6yCCTv8C1TeyNNarDzntLi7wMI5i/pzqYIsAM=
@@ -318,10 +318,10 @@ google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7
318318
google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=
319319
google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc=
320320
google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo=
321-
google.golang.org/genproto/googleapis/api v0.0.0-20250908214217-97024824d090 h1:d8Nakh1G+ur7+P3GcMjpRDEkoLUcLW2iU92XVqR+XMQ=
322-
google.golang.org/genproto/googleapis/api v0.0.0-20250908214217-97024824d090/go.mod h1:U8EXRNSd8sUYyDfs/It7KVWodQr+Hf9xtxyxWudSwEw=
323-
google.golang.org/genproto/googleapis/rpc v0.0.0-20250908214217-97024824d090 h1:/OQuEa4YWtDt7uQWHd3q3sUMb+QOLQUg1xa8CEsRv5w=
324-
google.golang.org/genproto/googleapis/rpc v0.0.0-20250908214217-97024824d090/go.mod h1:GmFNa4BdJZ2a8G+wCe9Bg3wwThLrJun751XstdJt5Og=
321+
google.golang.org/genproto/googleapis/api v0.0.0-20250922171735-9219d122eba9 h1:jm6v6kMRpTYKxBRrDkYAitNJegUeO1Mf3Kt80obv0gg=
322+
google.golang.org/genproto/googleapis/api v0.0.0-20250922171735-9219d122eba9/go.mod h1:LmwNphe5Afor5V3R5BppOULHOnt2mCIf+NxMd4XiygE=
323+
google.golang.org/genproto/googleapis/rpc v0.0.0-20250922171735-9219d122eba9 h1:V1jCN2HBa8sySkR5vLcCSqJSTMv093Rw9EJefhQGP7M=
324+
google.golang.org/genproto/googleapis/rpc v0.0.0-20250922171735-9219d122eba9/go.mod h1:HSkG/KdJWusxU1F6CNrwNDjBMgisKxGnc5dAZfT0mjQ=
325325
google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
326326
google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg=
327327
google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY=
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
// Copyright 2025 The Kubernetes Authors.
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the 'License');
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an 'AS IS' BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
15+
package main
16+
17+
import (
18+
"log"
19+
"os"
20+
"strings"
21+
22+
"github.com/kubernetes-sigs/aws-ebs-csi-driver/pkg/cloud"
23+
)
24+
25+
const (
26+
formatWarning = "\033[1;97;41m"
27+
formatReset = "\033[0m"
28+
)
29+
30+
func main() {
31+
familyTypes := make(map[string]map[string]bool)
32+
33+
for _, instanceType := range cloud.KnownInstanceTypes() {
34+
family := strings.Split(instanceType, ".")[0]
35+
36+
_, attachmentType := cloud.GetVolumeLimits(instanceType)
37+
if familyTypes[family] == nil {
38+
familyTypes[family] = make(map[string]bool)
39+
}
40+
familyTypes[family][attachmentType] = true
41+
}
42+
43+
loggedWarning := false
44+
for family, types := range familyTypes {
45+
if len(types) > 1 {
46+
if !loggedWarning {
47+
// Log with red background and bold text to stand out in terminal
48+
log.Printf("%s!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!%s", formatWarning, formatReset)
49+
log.Printf("%s!!! WARNING - the following instance types have potentially invalid limits/types !!!%s", formatWarning, formatReset)
50+
log.Printf("%s!!! Check if they need to be hardcoded in pkg/volume_limits.go !!!%s", formatWarning, formatReset)
51+
log.Printf("%s!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!%s", formatWarning, formatReset)
52+
loggedWarning = true
53+
}
54+
log.Printf(" - Family `%s` has multiple attachment types", family)
55+
}
56+
}
57+
58+
if loggedWarning {
59+
os.Exit(1)
60+
}
61+
}
File renamed without changes.

hack/tools/install.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,28 +19,28 @@ set -euo pipefail
1919
readonly PKG_ROOT="$(git rev-parse --show-toplevel)"
2020

2121
# https://github.com/aws/aws-cli/tags
22-
AWSCLI_VERSION="2.28.11"
22+
AWSCLI_VERSION="2.30.7"
2323
# https://github.com/helm/chart-testing
2424
CT_VERSION="v3.13.0"
2525
# https://github.com/eksctl-io/eksctl
26-
EKSCTL_VERSION="v0.212.0"
26+
EKSCTL_VERSION="v0.214.0"
2727
# https://github.com/onsi/ginkgo
28-
GINKGO_VERSION="v2.24.0"
28+
GINKGO_VERSION="v2.25.3"
2929
# https://github.com/golangci/golangci-lint
3030
GOLANGCI_LINT_VERSION="v2.4.0"
3131
# https://github.com/hairyhenderson/gomplate
3232
GOMPLATE_VERSION="v4.3.3"
3333
# https://pkg.go.dev/golang.org/x/vuln/cmd/govulncheck
3434
GOVULNCHECK_VERSION="v1.1.4"
3535
# https://github.com/helm/helm
36-
HELM_VERSION="v3.18.5"
36+
HELM_VERSION="v3.19.0"
3737
# https://github.com/kubernetes/kops
3838
# Commit is preferred over version if non-empty, and can
3939
# be used to test new Kubernetes releases earlier
4040
KOPS_VERSION="v1.33.0-beta.1"
4141
KOPS_COMMIT=""
4242
# https://pkg.go.dev/sigs.k8s.io/kubetest2?tab=versions
43-
KUBETEST2_VERSION="v0.0.0-20250722085027-1ad71e1e364e"
43+
KUBETEST2_VERSION="v0.0.0-20250902173658-9560e3922fc0"
4444
# https://github.com/golang/mock
4545
MOCKGEN_VERSION="v1.6.0"
4646
# https://github.com/mvdan/sh

pkg/cloud/volume_limits.go

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,20 @@ package cloud
1616

1717
import "github.com/kubernetes-sigs/aws-ebs-csi-driver/pkg/util"
1818

19+
// Instance types for where the API incorrectly returns shared
20+
// when they actually are dedicated attachment limits.
21+
var dedicatedInstances = map[string]struct{}{
22+
"i8ge.metal-24xl": {},
23+
"i8ge.metal-48xl": {},
24+
"r8gb.metal-24xl": {},
25+
"i7i.metal-24xl": {},
26+
"i7i.metal-48xl": {},
27+
"c8gn.metal-24xl": {},
28+
"r8gn.metal-24xl": {},
29+
"i7ie.metal-24xl": {},
30+
"i7ie.metal-48xl": {},
31+
}
32+
1933
// GetVolumeLimits returns the volume limit and attachment type for a given instance type.
2034
// Returns (limit, attachmentType) where limit is the maximum number of volumes
2135
// and attachmentType is either "shared" or "dedicated".
@@ -28,8 +42,8 @@ func GetVolumeLimits(instanceType string) (int, string) {
2842

2943
// Check volume limits table
3044
if limit, exists := volumeLimits[instanceType]; exists {
31-
// These two instance types have the wrong type in the API, hardcode them as dedicated
32-
if instanceType == "c8gn.metal-24xl" || instanceType == "c8gn.metal-48xl" {
45+
// These instance types have the wrong type in the API, hardcode them as dedicated
46+
if _, shouldBeDedicated := dedicatedInstances[instanceType]; shouldBeDedicated {
3347
limit.attachmentType = util.AttachmentDedicated
3448
}
3549
return limit.maxAttachments, limit.attachmentType
@@ -38,3 +52,14 @@ func GetVolumeLimits(instanceType string) (int, string) {
3852
// Default to shared limit of 28
3953
return 28, util.AttachmentShared
4054
}
55+
56+
// KnownInstanceTypes returns all known instance types from the limits table.
57+
func KnownInstanceTypes() []string {
58+
knownTypes := []string{}
59+
60+
for instanceType := range volumeLimits {
61+
knownTypes = append(knownTypes, instanceType)
62+
}
63+
64+
return knownTypes
65+
}

pkg/cloud/volume_limits_table.go

Lines changed: 16 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)