Skip to content

Commit 1559c40

Browse files
committed
kube2iam: Fix for eks ipv6
Signed-off-by: Mikkel Oscar Lyderik Larsen <[email protected]>
1 parent 508cf4b commit 1559c40

File tree

6 files changed

+29
-7
lines changed

6 files changed

+29
-7
lines changed

cluster/config-defaults.yaml

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -777,14 +777,18 @@ tracing_coredns_local_zone_traces_endpoint: ""
777777
# AMI id given the image name and the Image AWS account owner.
778778
#
779779
# [0]: https://github.com/zalando-incubator/cluster-lifecycle-manager/blob/8a9bd1cb2d094038a9e23e646421f8146b48886a/provisioner/template.go#L116
780-
kuberuntu_image_v1_31_old_amd64: {{ amiID "zalando-ubuntu-jammy-22.04-kubernetes-production-v1.31.4-amd64-master-359" "861068367966" }}
781-
kuberuntu_image_v1_31_old_arm64: {{ amiID "zalando-ubuntu-jammy-22.04-kubernetes-production-v1.31.4-arm64-master-359" "861068367966" }}
782-
kuberuntu_image_v1_31_new_amd64: {{ amiID "zalando-ubuntu-jammy-22.04-kubernetes-production-v1.31.6-amd64-master-368" "861068367966" }}
783-
kuberuntu_image_v1_31_new_arm64: {{ amiID "zalando-ubuntu-jammy-22.04-kubernetes-production-v1.31.6-arm64-master-368" "861068367966" }}
780+
kuberuntu_image_v1_31_aws_amd64: {{ amiID "zalando-ubuntu-jammy-22.04-kubernetes-production-v1.31.6-amd64-master-368" "861068367966" }}
781+
kuberuntu_image_v1_31_aws_arm64: {{ amiID "zalando-ubuntu-jammy-22.04-kubernetes-production-v1.31.6-arm64-master-368" "861068367966" }}
782+
kuberuntu_image_v1_31_eks_amd64: {{ amiID "zalando-ubuntu-jammy-22.04-kubernetes-production-v1.31.7-amd64-master-371" "861068367966" }}
783+
kuberuntu_image_v1_31_eks_arm64: {{ amiID "zalando-ubuntu-jammy-22.04-kubernetes-production-v1.31.7-arm64-master-371" "861068367966" }}
784784

785785
# This is used to determine which AMI to use for the cluster or individual node
786-
# pools. Possible values are 'new' or 'old'
787-
kuberuntu_ami_version: "new"
786+
# pools. Possible values are 'aws' or 'eks'
787+
{{if eq .Cluster.Provider "zalando-eks"}}
788+
kuberuntu_ami_version: "eks"
789+
{{else}}
790+
kuberuntu_ami_version: "aws"
791+
{{end}}
788792

789793
# Feature toggle for auditing events
790794
audit_pod_events: "true"

cluster/manifests/02-admission-control/config.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,10 @@ data:
4545
pod.env-inject.variable._PLATFORM_OBSERVABILITY_METRICS_PORT: "{{ .Cluster.ConfigItems.observability_metrics_port }}"
4646
pod.env-inject.variable._PLATFORM_OBSERVABILITY_ACCESS_TOKEN: "{{ .Cluster.ConfigItems.lightstep_token }}"
4747
pod.env-inject.variable._PLATFORM_OBSERVABILITY_COMMON_ATTRIBUTE_CLOUD__ACCOUNT__ID : "{{ .Cluster.Alias }}"
48+
{{- if and (eq .Cluster.Provider "zalando-eks") (eq .Cluster.ConfigItems.eks_ip_family "ipv6")}}
49+
pod.env-inject.variable.AWS_EC2_METADATA_SERVICE_ENDPOINT: "http://[fd00:ec2::254]"
50+
pod.env-inject.variable.AWS_EC2_METADATA_SERVICE_ENDPOINT_MODE: "IPv6"
51+
{{- end }}
4852
{{- if eq .Cluster.Environment "e2e" }}
4953
pod.env-inject.variable._PLATFORM_E2E: "injected"
5054
{{- end }}

cluster/manifests/kube2iam/daemonset.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ spec:
3838
effect: NoExecute
3939
hostNetwork: true
4040
containers:
41-
- image: container-registry.zalando.net/teapot/kube2iam:0.12.0-master-19.patched
41+
- image: container-registry.zalando.net/teapot/kube2iam:0.12.0-master-22.patched
4242
name: kube2iam
4343
args:
4444
- --auto-discover-base-arn

cluster/node-pools/worker-combined/stack.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,11 @@ Resources:
132132
Properties:
133133
LaunchTemplateName: '{{.Cluster.LocalID}}-{{ .NodePool.Name }}'
134134
LaunchTemplateData:
135+
{{- if and (eq .Cluster.Provider "zalando-eks") (eq .Cluster.ConfigItems.eks_ip_family "ipv6") }}
136+
MetadataOptions:
137+
HttpEndpoint: enabled
138+
HttpProtocolIpv6: enabled
139+
{{- end }}
135140
TagSpecifications:
136141
- ResourceType: "volume"
137142
Tags:

cluster/node-pools/worker-karpenter/provisioners.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,11 @@ spec:
1111
- id: {{ index .NodePool.ConfigItems (print "kuberuntu_image_v1_31_" .NodePool.ConfigItems.kuberuntu_ami_version "_arm64") }}
1212
metadataOptions:
1313
httpEndpoint: enabled
14+
# {{ if and (eq .Cluster.Provider "zalando-eks") (eq .Cluster.ConfigItems.eks_ip_family "ipv6") }}
15+
httpProtocolIPv6: enabled
16+
# {{ else }}
1417
httpProtocolIPv6: disabled
18+
# {{ end }}
1519
httpPutResponseHopLimit: 2
1620
httpTokens: optional
1721
subnetSelectorTerms:

cluster/node-pools/worker-splitaz/stack.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,11 @@ Resources:
137137
Properties:
138138
LaunchTemplateName: '{{ .Cluster.LocalID }}-{{ .NodePool.Name }}'
139139
LaunchTemplateData:
140+
{{- if and (eq .Cluster.Provider "zalando-eks") (eq .Cluster.ConfigItems.eks_ip_family "ipv6") }}
141+
MetadataOptions:
142+
HttpEndpoint: enabled
143+
HttpProtocolIpv6: enabled
144+
{{- end }}
140145
TagSpecifications:
141146
- ResourceType: "volume"
142147
Tags:

0 commit comments

Comments
 (0)