From ed2048b97d79751a0184a0682955dd67dafe8042 Mon Sep 17 00:00:00 2001 From: Amanuel Engeda Date: Mon, 4 Dec 2023 11:42:03 -0800 Subject: [PATCH] Drop comma delimited list --- pkg/providers/amifamily/ami.go | 3 +-- pkg/providers/securitygroup/securitygroup.go | 3 +-- pkg/providers/subnet/subnet.go | 3 +-- website/content/en/preview/upgrading/upgrade-guide.md | 1 + 4 files changed, 4 insertions(+), 6 deletions(-) diff --git a/pkg/providers/amifamily/ami.go b/pkg/providers/amifamily/ami.go index 1944b52e6702..12d75e244170 100644 --- a/pkg/providers/amifamily/ami.go +++ b/pkg/providers/amifamily/ami.go @@ -37,7 +37,6 @@ import ( "sigs.k8s.io/karpenter/pkg/cloudprovider" "sigs.k8s.io/karpenter/pkg/scheduling" - "sigs.k8s.io/karpenter/pkg/utils/functional" "sigs.k8s.io/karpenter/pkg/utils/pretty" ) @@ -267,7 +266,7 @@ func GetFilterAndOwnerSets(terms []v1beta1.AMISelectorTerm) (res []FiltersAndOwn } else { elem.Filters = append(elem.Filters, &ec2.Filter{ Name: aws.String(fmt.Sprintf("tag:%s", k)), - Values: aws.StringSlice(functional.SplitCommaSeparatedString(v)), + Values: []*string{aws.String(v)}, }) } } diff --git a/pkg/providers/securitygroup/securitygroup.go b/pkg/providers/securitygroup/securitygroup.go index 295f87db43dd..6287b85df1ea 100644 --- a/pkg/providers/securitygroup/securitygroup.go +++ b/pkg/providers/securitygroup/securitygroup.go @@ -28,7 +28,6 @@ import ( "github.com/samber/lo" "knative.dev/pkg/logging" - "sigs.k8s.io/karpenter/pkg/utils/functional" "sigs.k8s.io/karpenter/pkg/utils/pretty" "github.com/aws/karpenter/pkg/apis/v1beta1" @@ -118,7 +117,7 @@ func getFilterSets(terms []v1beta1.SecurityGroupSelectorTerm) (res [][]*ec2.Filt } else { filters = append(filters, &ec2.Filter{ Name: aws.String(fmt.Sprintf("tag:%s", k)), - Values: aws.StringSlice(functional.SplitCommaSeparatedString(v)), + Values: []*string{aws.String(v)}, }) } } diff --git a/pkg/providers/subnet/subnet.go b/pkg/providers/subnet/subnet.go index 8288e3bc65ee..a1c3d17a70c1 100644 --- a/pkg/providers/subnet/subnet.go +++ b/pkg/providers/subnet/subnet.go @@ -32,7 +32,6 @@ import ( "github.com/aws/karpenter/pkg/apis/v1beta1" "sigs.k8s.io/karpenter/pkg/cloudprovider" - "sigs.k8s.io/karpenter/pkg/utils/functional" "sigs.k8s.io/karpenter/pkg/utils/pretty" ) @@ -247,7 +246,7 @@ func getFilterSets(terms []v1beta1.SubnetSelectorTerm) (res [][]*ec2.Filter) { } else { filters = append(filters, &ec2.Filter{ Name: aws.String(fmt.Sprintf("tag:%s", k)), - Values: aws.StringSlice(functional.SplitCommaSeparatedString(v)), + Values: []*string{aws.String(v)}, }) } } diff --git a/website/content/en/preview/upgrading/upgrade-guide.md b/website/content/en/preview/upgrading/upgrade-guide.md index e295c446c165..f95ebf56bcb8 100644 --- a/website/content/en/preview/upgrading/upgrade-guide.md +++ b/website/content/en/preview/upgrading/upgrade-guide.md @@ -42,6 +42,7 @@ kubectl apply -f https://raw.githubusercontent.com/aws/karpenter{{< githubRelRef * `v0.33.x` enables `Drift=true` by default in the `FEATURE_GATES`. If you previously didn't enable the feature gate, Karpenter will now check if there is a difference between the desired state of your nodes declared in your NodePool and the actual state of your nodes. View the [Drift Section of Disruption Conceptual Docs]({{}}) for more details. * `v0.33.x` drops looking up the `zap-logger-config` through ConfigMap discovery. Instead, Karpenter now expects the logging config to be mounted on the filesystem if you are using this to configure Zap logging. This is not enabled by default, but can be enabled through `--set logConfig.enabled=true` in the helm values. Note that setting the Zap logging config is a deprecated feature in beta and is planned to be dropped at v1. View the [Logging Configuration Section of the v1beta1 Migration Guide]({{}}) for more details. * `v0.33.x` change the default `LOG_LEVEL` from `debug` to `info` by default. If you are still enabling logging configuration through the `zap-logger-config`, no action is required. +* Drop support for comma delimited lists on tags for `SubnetSelectorTerm`, `SecurityGroupsSelectorTerm`, and `AMISelectorTerm`. ### Upgrading to v0.32.0+