From 4de6ac31d1e2f25f821eacefc4893209d7e43104 Mon Sep 17 00:00:00 2001 From: Simon Wakenhut Date: Wed, 30 Oct 2024 15:11:24 +0100 Subject: [PATCH] fix(eks): SubnetIds diff Signed-off-by: Simon Wakenhut (cherry picked from commit 5d630c5b8a4a838c543a75908427d869b42ade0d) --- pkg/clients/eks/eks.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkg/clients/eks/eks.go b/pkg/clients/eks/eks.go index 9cc73af1c8..caf63fe4ff 100644 --- a/pkg/clients/eks/eks.go +++ b/pkg/clients/eks/eks.go @@ -22,6 +22,7 @@ import ( "encoding/json" "errors" "net" + "slices" "github.com/aws/aws-sdk-go-v2/aws" v4 "github.com/aws/aws-sdk-go-v2/aws/signer/v4" @@ -181,6 +182,9 @@ func CreatePatch(in *ekstypes.Cluster, target *v1beta1.ClusterParameters) (*v1be currentParams := &v1beta1.ClusterParameters{} LateInitialize(currentParams, in) + slices.Sort(currentParams.ResourcesVpcConfig.SubnetIDs) + slices.Sort(target.ResourcesVpcConfig.SubnetIDs) + jsonPatch, err := jsonpatch.CreateJSONPatch(currentParams, target) if err != nil { return nil, err