From cc55caba7ea6f13637b3ba9b41ae3a44d2065276 Mon Sep 17 00:00:00 2001 From: Abhay Krishna Arunachalam Date: Fri, 17 Jan 2025 00:14:05 -0800 Subject: [PATCH] Ensure Kubernetes version is always parsed as string --- pkg/api/v1alpha1/cluster.go | 5 +- pkg/api/v1alpha1/testdata/cluster_1_20.yaml | 2 +- .../testdata/cluster_1_20_cloudstack.yaml | 2 +- ...smatch_between_cluster_and_datacenter.yaml | 2 +- ...ch_between_cluster_and_machineconfigs.yaml | 2 +- .../cluster_1_20_with_non_eksa_resources.yaml | 2 +- .../cluster_invalid_cluster_name.yaml | 2 +- .../cluster_invalid_worker_node_count.yaml | 2 +- .../cluster_package_configuration.yaml | 2 +- .../testdata/incorrect_indentation.yaml | 2 +- pkg/cluster/config_manager.go | 12 ++- pkg/cluster/testdata/cluster_1_19.yaml | 2 +- .../testdata/cluster_1_20_cloudstack.yaml | 2 +- ...cluster_cloudstack_missing_datacenter.yaml | 2 +- .../docker_cluster_oidc_awsiam_flux.yaml | 2 +- pkg/constants/constants.go | 7 ++ .../testdata/cluster_tinkerbell.yaml | 2 +- ..._worker_node_group_kubernetes_version.yaml | 2 +- .../eksa-cluster-external-etcd-k8s-1-20.yaml | 2 +- .../cluster_tinkerbell_worker_version.yaml | 2 +- pkg/utils/yaml/yaml.go | 23 ------ pkg/utils/yaml/yaml_test.go | 79 ++++++------------- pkg/yamlutil/parser.go | 7 +- pkg/yamlutil/parser_test.go | 2 + release/cli/pkg/assets/archives/archives.go | 2 +- release/cli/pkg/assets/assets.go | 2 +- release/cli/pkg/bundles/bundles.go | 2 +- 27 files changed, 72 insertions(+), 103 deletions(-) diff --git a/pkg/api/v1alpha1/cluster.go b/pkg/api/v1alpha1/cluster.go index 267c686e8d0d..cb18b593d0d0 100644 --- a/pkg/api/v1alpha1/cluster.go +++ b/pkg/api/v1alpha1/cluster.go @@ -265,7 +265,10 @@ type kindObject struct { // ParseClusterConfigFromContent unmarshalls an API object implementing the KindAccessor interface // from a multiobject yaml content. It doesn't set defaults nor validates the object. func ParseClusterConfigFromContent(content []byte, clusterConfig KindAccessor) error { - r := yamlutil.NewYAMLReader(bufio.NewReader(bytes.NewReader(content))) + kubeVersionRegex := regexp.MustCompile(constants.KubernetesVersionRegex) + sanitizedContent := kubeVersionRegex.ReplaceAllString(string(content), constants.QuotedKubernetesVersionRegexReplacement) + + r := yamlutil.NewYAMLReader(bufio.NewReader(bytes.NewReader([]byte(sanitizedContent)))) for { d, err := r.Read() if err == io.EOF { diff --git a/pkg/api/v1alpha1/testdata/cluster_1_20.yaml b/pkg/api/v1alpha1/testdata/cluster_1_20.yaml index 3fdf59e4f0dd..9d1cf85d73b8 100644 --- a/pkg/api/v1alpha1/testdata/cluster_1_20.yaml +++ b/pkg/api/v1alpha1/testdata/cluster_1_20.yaml @@ -10,7 +10,7 @@ spec: machineGroupRef: name: eksa-unit-test kind: VSphereMachineConfig - kubernetesVersion: "1.20" + kubernetesVersion: 1.20 workerNodeGroupConfigurations: - count: 3 machineGroupRef: diff --git a/pkg/api/v1alpha1/testdata/cluster_1_20_cloudstack.yaml b/pkg/api/v1alpha1/testdata/cluster_1_20_cloudstack.yaml index 7f041942073a..ae62a7d6445a 100644 --- a/pkg/api/v1alpha1/testdata/cluster_1_20_cloudstack.yaml +++ b/pkg/api/v1alpha1/testdata/cluster_1_20_cloudstack.yaml @@ -21,7 +21,7 @@ spec: datacenterRef: kind: CloudStackDatacenterConfig name: eksa-unit-test - kubernetesVersion: "1.20" + kubernetesVersion: 1.20 workerNodeGroupConfigurations: - count: 3 machineGroupRef: diff --git a/pkg/api/v1alpha1/testdata/cluster_1_20_namespace_mismatch_between_cluster_and_datacenter.yaml b/pkg/api/v1alpha1/testdata/cluster_1_20_namespace_mismatch_between_cluster_and_datacenter.yaml index 03c00edeba81..fd25cb3f7b3b 100644 --- a/pkg/api/v1alpha1/testdata/cluster_1_20_namespace_mismatch_between_cluster_and_datacenter.yaml +++ b/pkg/api/v1alpha1/testdata/cluster_1_20_namespace_mismatch_between_cluster_and_datacenter.yaml @@ -11,7 +11,7 @@ spec: machineGroupRef: name: eksa-unit-test kind: VSphereMachineConfig - kubernetesVersion: "1.20" + kubernetesVersion: 1.20 workerNodeGroupConfigurations: - count: 3 machineGroupRef: diff --git a/pkg/api/v1alpha1/testdata/cluster_1_20_namespace_mismatch_between_cluster_and_machineconfigs.yaml b/pkg/api/v1alpha1/testdata/cluster_1_20_namespace_mismatch_between_cluster_and_machineconfigs.yaml index a35d32efda72..3e73e8bc56c5 100644 --- a/pkg/api/v1alpha1/testdata/cluster_1_20_namespace_mismatch_between_cluster_and_machineconfigs.yaml +++ b/pkg/api/v1alpha1/testdata/cluster_1_20_namespace_mismatch_between_cluster_and_machineconfigs.yaml @@ -11,7 +11,7 @@ spec: machineGroupRef: name: eksa-unit-test kind: VSphereMachineConfig - kubernetesVersion: "1.20" + kubernetesVersion: 1.20 workerNodeGroupConfigurations: - count: 3 machineGroupRef: diff --git a/pkg/api/v1alpha1/testdata/cluster_1_20_with_non_eksa_resources.yaml b/pkg/api/v1alpha1/testdata/cluster_1_20_with_non_eksa_resources.yaml index 0c43624d9093..e8da14871715 100644 --- a/pkg/api/v1alpha1/testdata/cluster_1_20_with_non_eksa_resources.yaml +++ b/pkg/api/v1alpha1/testdata/cluster_1_20_with_non_eksa_resources.yaml @@ -17,7 +17,7 @@ spec: machineGroupRef: name: eksa-unit-test kind: VSphereMachineConfig - kubernetesVersion: "1.20" + kubernetesVersion: 1.20 workerNodeGroupConfigurations: - count: 3 machineGroupRef: diff --git a/pkg/api/v1alpha1/testdata/cluster_invalid_cluster_name.yaml b/pkg/api/v1alpha1/testdata/cluster_invalid_cluster_name.yaml index 3c9639ed6ac3..bf6cfcad0b32 100644 --- a/pkg/api/v1alpha1/testdata/cluster_invalid_cluster_name.yaml +++ b/pkg/api/v1alpha1/testdata/cluster_invalid_cluster_name.yaml @@ -10,7 +10,7 @@ spec: machineGroupRef: name: eksa-unit-test kind: VSphereMachineConfig - kubernetesVersion: "1.20" + kubernetesVersion: 1.20 workerNodeGroupConfigurations: - count: 3 machineGroupRef: diff --git a/pkg/api/v1alpha1/testdata/cluster_invalid_worker_node_count.yaml b/pkg/api/v1alpha1/testdata/cluster_invalid_worker_node_count.yaml index f94650468e03..0ab1c50da65e 100644 --- a/pkg/api/v1alpha1/testdata/cluster_invalid_worker_node_count.yaml +++ b/pkg/api/v1alpha1/testdata/cluster_invalid_worker_node_count.yaml @@ -10,7 +10,7 @@ spec: machineGroupRef: name: eksa-unit-test kind: VSphereMachineConfig - kubernetesVersion: "1.20" + kubernetesVersion: 1.20 workerNodeGroupConfigurations: - count: 0 machineGroupRef: diff --git a/pkg/api/v1alpha1/testdata/cluster_package_configuration.yaml b/pkg/api/v1alpha1/testdata/cluster_package_configuration.yaml index 6cb6a2b1780a..3842b07be160 100644 --- a/pkg/api/v1alpha1/testdata/cluster_package_configuration.yaml +++ b/pkg/api/v1alpha1/testdata/cluster_package_configuration.yaml @@ -10,7 +10,7 @@ spec: machineGroupRef: name: eksa-unit-test kind: VSphereMachineConfig - kubernetesVersion: "1.20" + kubernetesVersion: 1.20 workerNodeGroupConfigurations: - count: 3 machineGroupRef: diff --git a/pkg/api/v1alpha1/testdata/incorrect_indentation.yaml b/pkg/api/v1alpha1/testdata/incorrect_indentation.yaml index ecef3a113263..4f3db75fe27c 100644 --- a/pkg/api/v1alpha1/testdata/incorrect_indentation.yaml +++ b/pkg/api/v1alpha1/testdata/incorrect_indentation.yaml @@ -10,7 +10,7 @@ spec: machineGroupRef: name: eksa-unit-test kind: VSphereMachineConfig - kubernetesVersion: "1.20" + kubernetesVersion: 1.20 workerNodeGroupConfigurations: - count: 3 machineGroupRef: diff --git a/pkg/cluster/config_manager.go b/pkg/cluster/config_manager.go index 38a2bc4b5418..d9a1bf282282 100644 --- a/pkg/cluster/config_manager.go +++ b/pkg/cluster/config_manager.go @@ -11,6 +11,7 @@ import ( "sigs.k8s.io/yaml" anywherev1 "github.com/aws/eks-anywhere/pkg/api/v1alpha1" + "github.com/aws/eks-anywhere/pkg/constants" "github.com/aws/eks-anywhere/pkg/logger" ) @@ -113,7 +114,10 @@ type parsed struct { cluster *anywherev1.Cluster } -var separatorRegex = regexp.MustCompile(`(?m)^---$`) +var ( + separatorRegex = regexp.MustCompile(`(?m)^---$`) + kubeVersionRegex = regexp.MustCompile(constants.KubernetesVersionRegex) +) func (c *ConfigManager) unmarshal(yamlManifest []byte) (*parsed, error) { parsed := &parsed{ @@ -122,9 +126,9 @@ func (c *ConfigManager) unmarshal(yamlManifest []byte) (*parsed, error) { yamlObjs := separatorRegex.Split(string(yamlManifest), -1) for _, yamlObj := range yamlObjs { - trimmedYamlObj := strings.TrimSuffix(yamlObj, "\n") + sanitizedYamlObj := kubeVersionRegex.ReplaceAllString(strings.TrimSuffix(yamlObj, "\n"), constants.QuotedKubernetesVersionRegexReplacement) k := &basicAPIObject{} - err := yaml.Unmarshal([]byte(trimmedYamlObj), k) + err := yaml.Unmarshal([]byte(sanitizedYamlObj), k) if err != nil { return nil, err } @@ -154,7 +158,7 @@ func (c *ConfigManager) unmarshal(yamlManifest []byte) (*parsed, error) { continue } - if err := yaml.Unmarshal([]byte(trimmedYamlObj), obj); err != nil { + if err := yaml.Unmarshal([]byte(sanitizedYamlObj), obj); err != nil { return nil, err } parsed.objects.add(obj) diff --git a/pkg/cluster/testdata/cluster_1_19.yaml b/pkg/cluster/testdata/cluster_1_19.yaml index 5ae212b2d28b..26cf671d2148 100644 --- a/pkg/cluster/testdata/cluster_1_19.yaml +++ b/pkg/cluster/testdata/cluster_1_19.yaml @@ -30,7 +30,7 @@ spec: kind: VSphereMachineConfig name: eksa-unit-test - name: workers-2 - kubernetesVersion: "1.20" + kubernetesVersion: 1.20 count: 1 machineGroupRef: kind: VSphereMachineConfig diff --git a/pkg/cluster/testdata/cluster_1_20_cloudstack.yaml b/pkg/cluster/testdata/cluster_1_20_cloudstack.yaml index 722568e31044..6a188a697c1c 100644 --- a/pkg/cluster/testdata/cluster_1_20_cloudstack.yaml +++ b/pkg/cluster/testdata/cluster_1_20_cloudstack.yaml @@ -21,7 +21,7 @@ spec: datacenterRef: kind: CloudStackDatacenterConfig name: eksa-unit-test - kubernetesVersion: "1.20" + kubernetesVersion: 1.20 workerNodeGroupConfigurations: - count: 3 machineGroupRef: diff --git a/pkg/cluster/testdata/cluster_cloudstack_missing_datacenter.yaml b/pkg/cluster/testdata/cluster_cloudstack_missing_datacenter.yaml index 816bf76950fb..b2ee73ba7dd2 100644 --- a/pkg/cluster/testdata/cluster_cloudstack_missing_datacenter.yaml +++ b/pkg/cluster/testdata/cluster_cloudstack_missing_datacenter.yaml @@ -21,7 +21,7 @@ spec: datacenterRef: kind: CloudStackDatacenterConfig name: eksa-unit-test - kubernetesVersion: "1.20" + kubernetesVersion: 1.20 workerNodeGroupConfigurations: - count: 3 machineGroupRef: diff --git a/pkg/cluster/testdata/docker_cluster_oidc_awsiam_flux.yaml b/pkg/cluster/testdata/docker_cluster_oidc_awsiam_flux.yaml index d27d57c06c5c..682e4fdbda5a 100644 --- a/pkg/cluster/testdata/docker_cluster_oidc_awsiam_flux.yaml +++ b/pkg/cluster/testdata/docker_cluster_oidc_awsiam_flux.yaml @@ -21,7 +21,7 @@ spec: name: m-docker workerNodeGroupConfigurations: - name: workers-1 - kubernetesVersion: "1.20" + kubernetesVersion: 1.20 count: 1 identityProviderRefs: - kind: OIDCConfig diff --git a/pkg/constants/constants.go b/pkg/constants/constants.go index 2d0c71934780..bf35364ff1cd 100644 --- a/pkg/constants/constants.go +++ b/pkg/constants/constants.go @@ -76,6 +76,13 @@ const ( // DefaultcuratedPackagesRegistry is a containerd compatible registry format that matches all AWS regions. DefaultCuratedPackagesRegistry = "783794618700.dkr.ecr.*.amazonaws.com" + // KubernetesVersionRegex matches the Kubernetes version field in the cluster config. + KubernetesVersionRegex = `(?m)(.*kubernetesVersion:\s*)['"]?(1\.[0-9]{2,})['"]?(.*)$` + + // QuoteRegexReplacement is the target replacement pattern which will add quotes around the Kubernetes version + // in the cluster config. + QuotedKubernetesVersionRegexReplacement = `${1}"${2}"${3}` + // Provider specific env vars. VSphereUsernameKey = "VSPHERE_USERNAME" VSpherePasswordKey = "VSPHERE_PASSWORD" diff --git a/pkg/dependencies/testdata/cluster_tinkerbell.yaml b/pkg/dependencies/testdata/cluster_tinkerbell.yaml index 986ea1a8f405..e30d63d4d42f 100644 --- a/pkg/dependencies/testdata/cluster_tinkerbell.yaml +++ b/pkg/dependencies/testdata/cluster_tinkerbell.yaml @@ -22,7 +22,7 @@ spec: datacenterRef: kind: TinkerbellDatacenterConfig name: eksa-unit-test - kubernetesVersion: "1.20" + kubernetesVersion: 1.20 managementCluster: name: eksa-unit-test workerNodeGroupConfigurations: diff --git a/pkg/providers/cloudstack/testdata/cluster_main_worker_node_group_kubernetes_version.yaml b/pkg/providers/cloudstack/testdata/cluster_main_worker_node_group_kubernetes_version.yaml index d8e22aa867b5..c0f38c7ea880 100644 --- a/pkg/providers/cloudstack/testdata/cluster_main_worker_node_group_kubernetes_version.yaml +++ b/pkg/providers/cloudstack/testdata/cluster_main_worker_node_group_kubernetes_version.yaml @@ -31,7 +31,7 @@ spec: workerNodeGroupConfigurations: - count: 3 name: md-0 - kubernetesVersion: "1.20" + kubernetesVersion: 1.20 machineGroupRef: kind: CloudStackMachineConfig name: test-md-0 diff --git a/pkg/providers/nutanix/testdata/eksa-cluster-external-etcd-k8s-1-20.yaml b/pkg/providers/nutanix/testdata/eksa-cluster-external-etcd-k8s-1-20.yaml index 1df3211dcae2..e5ee2f1a7d32 100644 --- a/pkg/providers/nutanix/testdata/eksa-cluster-external-etcd-k8s-1-20.yaml +++ b/pkg/providers/nutanix/testdata/eksa-cluster-external-etcd-k8s-1-20.yaml @@ -4,7 +4,7 @@ metadata: name: eksa-unit-test namespace: default spec: - kubernetesVersion: "1.20" + kubernetesVersion: 1.20 controlPlaneConfiguration: name: eksa-unit-test-cp count: 3 diff --git a/pkg/providers/tinkerbell/testdata/cluster_tinkerbell_worker_version.yaml b/pkg/providers/tinkerbell/testdata/cluster_tinkerbell_worker_version.yaml index 96879ab83b42..e470638bbb35 100644 --- a/pkg/providers/tinkerbell/testdata/cluster_tinkerbell_worker_version.yaml +++ b/pkg/providers/tinkerbell/testdata/cluster_tinkerbell_worker_version.yaml @@ -35,7 +35,7 @@ spec: name: test workerNodeGroupConfigurations: - count: 1 - kubernetesVersion: "1.20" + kubernetesVersion: 1.20 name: md-0 machineGroupRef: name: test-md diff --git a/pkg/utils/yaml/yaml.go b/pkg/utils/yaml/yaml.go index e15d35473b77..c7fc9ef76580 100644 --- a/pkg/utils/yaml/yaml.go +++ b/pkg/utils/yaml/yaml.go @@ -1,12 +1,9 @@ package yaml import ( - "bufio" "bytes" "fmt" - "io" - apiyaml "k8s.io/apimachinery/pkg/util/yaml" "sigs.k8s.io/yaml" ) @@ -28,23 +25,3 @@ func Serialize[T any](objs ...T) ([][]byte, error) { } return r, nil } - -// SplitDocuments function splits content into individual document parts represented as byte slices. -func SplitDocuments(r io.Reader) ([][]byte, error) { - resources := make([][]byte, 0) - - yr := apiyaml.NewYAMLReader(bufio.NewReader(r)) - for { - d, err := yr.Read() - if err == io.EOF { - break - } - if err != nil { - return nil, err - } - - resources = append(resources, d) - } - - return resources, nil -} diff --git a/pkg/utils/yaml/yaml_test.go b/pkg/utils/yaml/yaml_test.go index 0c1560337c18..ba98e5bbbf72 100644 --- a/pkg/utils/yaml/yaml_test.go +++ b/pkg/utils/yaml/yaml_test.go @@ -1,99 +1,70 @@ package yaml_test import ( - "bufio" - "errors" - "strings" "testing" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - yamlutil "github.com/aws/eks-anywhere/pkg/utils/yaml" ) -func TestSplitDocuments(t *testing.T) { +func TestJoinDocuments(t *testing.T) { tests := []struct { - name string - input string - expectedDocs [][]byte - expectedErr error + name string + input [][]byte + output []byte }{ { - name: "Empty input", - input: "", - expectedDocs: [][]byte{}, - expectedErr: nil, + name: "Empty input", + input: [][]byte{}, + output: []byte{}, }, { name: "Single document", - input: `apiVersion: v1 + input: [][]byte{ + []byte(`apiVersion: v1 kind: Pod metadata: name: pod-1 -`, - expectedDocs: [][]byte{ - []byte(`apiVersion: v1 +`), + }, + output: []byte(`apiVersion: v1 kind: Pod metadata: name: pod-1 `), - }, - expectedErr: nil, }, { name: "Multiple documents", - input: `apiVersion: v1 + input: [][]byte{ + []byte(`apiVersion: v1 kind: Pod metadata: name: pod-1 ---- -apiVersion: v1 +`), + []byte(`apiVersion: v1 kind: Service metadata: name: service-1 -`, - expectedDocs: [][]byte{ - []byte(`apiVersion: v1 +`), + }, + output: []byte(`apiVersion: v1 kind: Pod metadata: name: pod-1 -`), - []byte(`apiVersion: v1 + +--- +apiVersion: v1 kind: Service metadata: name: service-1 `), - }, - expectedErr: nil, - }, - { - name: "Error reading input 2", - input: `---\nkey: value\ninvalid_separator\n`, - expectedDocs: nil, - expectedErr: errors.New("invalid Yaml document separator: \\nkey: value\\ninvalid_separator\\n"), }, } for _, test := range tests { t.Run(test.name, func(t *testing.T) { - r := strings.NewReader(test.input) - - docs, err := yamlutil.SplitDocuments(bufio.NewReader(r)) - if test.expectedErr != nil { - assert.Equal(t, test.expectedErr.Error(), err.Error()) - assert.Equal(t, len(test.expectedDocs), len(docs)) - } else { - require.NoError(t, err) - if len(docs) != len(test.expectedDocs) { - t.Errorf("Expected %d documents, but got %d", len(test.expectedDocs), len(docs)) - } - - for i, doc := range docs { - if string(doc) != string(test.expectedDocs[i]) { - t.Errorf("Document %d mismatch.\nExpected:\n%s\nGot:\n%s", i+1, string(test.expectedDocs[i]), string(doc)) - } - } + joinedDoc := yamlutil.Join(test.input) + if string(joinedDoc) != string(test.output) { + t.Errorf("Document mismatch.\nExpected:\n%s\nGot:\n%s", string(test.output), string(joinedDoc)) } }) } diff --git a/pkg/yamlutil/parser.go b/pkg/yamlutil/parser.go index b7587187c349..e6342a043dea 100644 --- a/pkg/yamlutil/parser.go +++ b/pkg/yamlutil/parser.go @@ -4,12 +4,15 @@ import ( "bufio" "bytes" "io" + "regexp" "github.com/go-logr/logr" "github.com/pkg/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" apiyaml "k8s.io/apimachinery/pkg/util/yaml" "sigs.k8s.io/yaml" + + "github.com/aws/eks-anywhere/pkg/constants" ) type ( @@ -95,7 +98,9 @@ type Builder interface { // Parse reads yaml manifest content with the registered mappings and passes // the result to the Builder for further processing. func (p *Parser) Parse(yamlManifest []byte, b Builder) error { - return p.Read(bytes.NewReader(yamlManifest), b) + kubeVersionRegex := regexp.MustCompile(constants.KubernetesVersionRegex) + sanitizedYamlManifest := kubeVersionRegex.ReplaceAllString(string(yamlManifest), constants.QuotedKubernetesVersionRegexReplacement) + return p.Read(bytes.NewReader([]byte(sanitizedYamlManifest)), b) } // Read reads yaml manifest content with the registered mappings and passes diff --git a/pkg/yamlutil/parser_test.go b/pkg/yamlutil/parser_test.go index 43a8558b22a1..e8968079b3c3 100644 --- a/pkg/yamlutil/parser_test.go +++ b/pkg/yamlutil/parser_test.go @@ -45,6 +45,7 @@ func TestParserParse(t *testing.T) { apiVersion: v1 data: Corefile: "d" + kubernetesVersion: 1.30 kind: ConfigMap metadata: name: aws-iam-authenticator @@ -77,6 +78,7 @@ data: g.Expect(parser.Parse([]byte(yaml), holder)).To(Succeed()) g.Expect(holder).NotTo(BeNil()) g.Expect(holder.configMap.Data).To(HaveKeyWithValue("Corefile", "d")) + g.Expect(holder.configMap.Data).To(HaveKeyWithValue("kubernetesVersion", "1.30")) g.Expect(holder.secret.Data["username"]).To(Equal([]byte("admin"))) } diff --git a/release/cli/pkg/assets/archives/archives.go b/release/cli/pkg/assets/archives/archives.go index 3597de7d66cb..f0e92cda792e 100644 --- a/release/cli/pkg/assets/archives/archives.go +++ b/release/cli/pkg/assets/archives/archives.go @@ -17,9 +17,9 @@ package archives import ( "fmt" "path/filepath" + "slices" "github.com/pkg/errors" - "slices" assettypes "github.com/aws/eks-anywhere/release/cli/pkg/assets/types" "github.com/aws/eks-anywhere/release/cli/pkg/filereader" diff --git a/release/cli/pkg/assets/assets.go b/release/cli/pkg/assets/assets.go index 3d60ad4ffe84..c8fee066b612 100644 --- a/release/cli/pkg/assets/assets.go +++ b/release/cli/pkg/assets/assets.go @@ -18,11 +18,11 @@ import ( "context" "fmt" "path/filepath" + "slices" "strconv" "github.com/pkg/errors" "golang.org/x/sync/errgroup" - "slices" "github.com/aws/eks-anywhere/release/cli/pkg/assets/archives" assetconfig "github.com/aws/eks-anywhere/release/cli/pkg/assets/config" diff --git a/release/cli/pkg/bundles/bundles.go b/release/cli/pkg/bundles/bundles.go index 3612c8fec86e..a551f691f41a 100644 --- a/release/cli/pkg/bundles/bundles.go +++ b/release/cli/pkg/bundles/bundles.go @@ -16,12 +16,12 @@ package bundles import ( "fmt" + "slices" "strconv" "strings" "github.com/pkg/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "slices" anywherev1alpha1 "github.com/aws/eks-anywhere/release/api/v1alpha1" "github.com/aws/eks-anywhere/release/cli/pkg/constants"