Skip to content

Commit 73efb15

Browse files
committed
Add containerdExtraConfigToml to EKSConfig
This depends on awslabs/amazon-eks-ami#790 being merged and released.
1 parent f13b122 commit 73efb15

File tree

4 files changed

+7
-0
lines changed

4 files changed

+7
-0
lines changed

bootstrap/eks/api/v1beta1/eksconfig_types.go

+4
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,10 @@ type EKSConfigSpec struct {
3636
// This is expected to be a json string.
3737
// +optional
3838
DockerConfigJson *string `json:"dockerConfigJson,omitempty"`
39+
// ContainerdExtraConfigToml Extra configuration to append to the containerd configuration. Useful if you want a custom config differing from the default one in the AMI.
40+
// This is expected to be a toml string.
41+
// +optional
42+
ContainerdExtraConfigToml *string `json:"containerdExtraConfigToml,omitempty"`
3943
// APIRetryAttempts is the number of retry attempts for AWS API call.
4044
// +optional
4145
APIRetryAttempts *int `json:"apiRetryAttempts,omitempty"`

bootstrap/eks/controllers/eksconfig_controller.go

+1
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,7 @@ func (r *EKSConfigReconciler) joinWorker(ctx context.Context, cluster *clusterv1
196196
ContainerRuntime: config.Spec.ContainerRuntime,
197197
DNSClusterIP: config.Spec.DNSClusterIP,
198198
DockerConfigJson: config.Spec.DockerConfigJson,
199+
ContainerdExtraConfigToml: config.Spec.ContainerdExtraConfigToml,
199200
APIRetryAttempts: config.Spec.APIRetryAttempts,
200201
UseMaxPods: config.Spec.UseMaxPods,
201202
}

bootstrap/eks/internal/userdata/args.go

+1
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ const argsTemplate = `{{- define "args" -}}
3434
{{- if .PauseConatinerVersion }} --pause-container-version {{.PauseConatinerVersion}}{{- end -}}
3535
{{- if .DNSClusterIP }} --dns-cluster-ip {{.DNSClusterIP}}{{- end -}}
3636
{{- if .DockerConfigJson }} --docker-config-json {{.DockerConfigJson}}{{- end -}}
37+
{{- if .ContainerdExtraConfigToml }} --containerd-extra-config-toml '{{.ContainerdExtraConfigToml}}'{{- end -}}
3738
{{- end -}}`
3839

3940
const kubeletArgsTemplate = `{{- define "kubeletArgsTemplate" -}}

bootstrap/eks/internal/userdata/node.go

+1
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ type NodeInput struct {
3535
ContainerRuntime *string
3636
DNSClusterIP *string
3737
DockerConfigJson *string
38+
ContainerdExtraConfigToml *string
3839
APIRetryAttempts *int
3940
PauseContainerAccount *string
4041
PauseConatinerVersion *string

0 commit comments

Comments
 (0)