Skip to content

Commit

Permalink
Merge pull request #2114 from simwak/fix/eks-subnets-diff
Browse files Browse the repository at this point in the history
  • Loading branch information
MisterMX authored Oct 30, 2024
2 parents ab76e4e + 5d630c5 commit 64d009a
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 64d009a

Please sign in to comment.