Skip to content

Commit

Permalink
fix(eks): SubnetIds diff
Browse files Browse the repository at this point in the history
Signed-off-by: Simon Wakenhut <[email protected]>
(cherry picked from commit 5d630c5)
  • Loading branch information
simwak authored and github-actions[bot] committed Oct 30, 2024
1 parent 7bfc380 commit 4de6ac3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/clients/eks/eks.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 4de6ac3

Please sign in to comment.