Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion pkg/addons/default/assets/aws-node.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,8 @@ spec:
type: RollingUpdate
selector:
matchLabels:
k8s-app: aws-node
app.kubernetes.io/name: aws-node
app.kubernetes.io/instance: aws-vpc-cni
template:
metadata:
labels:
Expand Down
3 changes: 1 addition & 2 deletions pkg/nodebootstrap/al2023.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import (
"k8s.io/apimachinery/pkg/runtime"

api "github.com/weaveworks/eksctl/pkg/apis/eksctl.io/v1alpha5"
"github.com/weaveworks/eksctl/pkg/nodebootstrap/assets"
"github.com/weaveworks/eksctl/pkg/nodebootstrap/utils"
)

Expand Down Expand Up @@ -45,7 +44,7 @@ func newAL2023Bootstrapper(cfg *api.ClusterConfig, np api.NodePool, clusterDNS s
cfg: cfg,
nodePool: np,
clusterDNS: clusterDNS,
scripts: []string{assets.AL2023XTablesLock},
scripts: []string{},
}
}

Expand Down
21 changes: 5 additions & 16 deletions pkg/nodebootstrap/al2023_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import (
"bytes"
"encoding/base64"
"encoding/json"
"fmt"
"io"
"mime/multipart"
"strings"
Expand All @@ -21,7 +20,6 @@ import (

api "github.com/weaveworks/eksctl/pkg/apis/eksctl.io/v1alpha5"
"github.com/weaveworks/eksctl/pkg/nodebootstrap"
"github.com/weaveworks/eksctl/pkg/nodebootstrap/assets"
)

type al2023Entry struct {
Expand Down Expand Up @@ -54,21 +52,21 @@ var _ = DescribeTable("Unmanaged AL2023", func(e al2023Entry) {
Expect(actual).To(Equal(e.expectedUserData))
},
Entry("default", al2023Entry{
expectedUserData: wrapMIMEParts(xTablesLock + nodeConfig),
expectedUserData: wrapMIMEParts(nodeConfig),
}),
Entry("ipv6", al2023Entry{
overrideClusterSettings: func(cc *api.ClusterConfig) {
cc.Status.KubernetesNetworkConfig.IPFamily = api.IPV6Family
cc.Status.KubernetesNetworkConfig.ServiceIPv6CIDR = "fd00:facc:76a1::/108"
cc.Status.KubernetesNetworkConfig.ServiceIPv4CIDR = ""
},
expectedUserData: wrapMIMEParts(xTablesLock + nodeConfigIPv6),
expectedUserData: wrapMIMEParts(nodeConfigIPv6),
}),
Entry("efa enabled", al2023Entry{
overrideNodegroupSettings: func(np api.NodePool) {
np.BaseNodeGroup().EFAEnabled = aws.Bool(true)
},
expectedUserData: wrapMIMEParts(xTablesLock + nodeConfig),
expectedUserData: wrapMIMEParts(nodeConfig),
}),
)

Expand Down Expand Up @@ -96,14 +94,12 @@ var _ = DescribeTable("Managed AL2023", func(e al2023Entry) {
actual := strings.ReplaceAll(string(decoded), "\r\n", "\n")
Expect(actual).To(Equal(e.expectedUserData))
},
Entry("native AMI", al2023Entry{
expectedUserData: wrapMIMEParts(xTablesLock),
}),
Entry("native AMI", al2023Entry{}),
Entry("custom AMI", al2023Entry{
overrideNodegroupSettings: func(np api.NodePool) {
np.BaseNodeGroup().AMI = "ami-xxxx"
},
expectedUserData: wrapMIMEParts(xTablesLock + managedNodeConfig),
expectedUserData: wrapMIMEParts(managedNodeConfig),
}),
)

Expand Down Expand Up @@ -380,13 +376,6 @@ Content-Type: multipart/mixed; boundary=//
`
}

xTablesLock = fmt.Sprintf(`--//
Content-Type: text/x-shellscript
Content-Type: charset="us-ascii"

%s
`, assets.AL2023XTablesLock)

nodeConfig = `--//
Content-Type: application/node.eks.aws

Expand Down
5 changes: 0 additions & 5 deletions pkg/nodebootstrap/assets/assets.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,6 @@ var BootstrapHelperSh string
//go:embed scripts/bootstrap.ubuntu.sh
var BootstrapUbuntuSh string

// AL2023XTablesLock holds the contents for creating a lock file for AL2023 AMIs.
//
//go:embed scripts/al2023-xtables.lock.sh
var AL2023XTablesLock string

// KubeletYaml holds the kubelet.yaml contents
//
//go:embed scripts/kubelet.yaml
Expand Down
7 changes: 0 additions & 7 deletions pkg/nodebootstrap/assets/scripts/al2023-xtables.lock.sh

This file was deleted.

Loading