Skip to content

Commit b33a886

Browse files
authored
Merge branch 'dev' into eks-custom-networking
2 parents aca8f05 + 85cd55a commit b33a886

File tree

22 files changed

+177
-47
lines changed

22 files changed

+177
-47
lines changed

cluster/cluster.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,15 +171,17 @@ Resources:
171171
EndpointPublicAccess: true
172172
EndpointPrivateAccess: true
173173
# PublicAccessCidrs: [ "1.1.1.2/32" ]
174-
{{- if eq .Cluster.ConfigItems.eks_control_plane_logging "true" }}
175174
Logging:
176175
ClusterLogging:
176+
{{- if eq .Cluster.ConfigItems.eks_control_plane_logging "true" }}
177177
EnabledTypes:
178178
- Type: api
179179
- Type: audit
180180
- Type: authenticator
181181
- Type: controllerManager
182182
- Type: scheduler
183+
{{- else }}
184+
EnabledTypes: []
183185
{{- end }}
184186
# Tags:
185187
# - Key: "application"

cluster/config-defaults.yaml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,14 @@ skipper_pod_deletion_cost_controller_resync_interval: "1h"
250250
# polarsignals - only enabled for testing teapot
251251
polarsignals_enabled: "false"
252252

253+
# Emergency Access Service
254+
# Control whether the emergency access service is enabled or not.
255+
{{ if and (eq .Cluster.Environment "production") (eq .Cluster.Provider "zalando-aws") }}
256+
emergency_access_service_enabled: "true"
257+
{{else}}
258+
emergency_access_service_enabled: "false"
259+
{{end}}
260+
253261
# Kube-Metrics-Adapter
254262
## Scheduled scaling metrics: ramp up/down over this period of time
255263
kube_metrics_adapter_default_scaling_window: "10m"
@@ -915,8 +923,8 @@ dns_dnsmasq_sidecar_cpu: "10m"
915923
dns_dnsmasq_sidecar_mem: "45Mi"
916924
dns_unbound_cpu: "100m"
917925
dns_unbound_mem: "50Mi"
918-
dns_unbound_telemetry_cpu: "10m"
919-
dns_unbound_telemetry_mem: "45Mi"
926+
dns_unbound_exporter_cpu: "10m"
927+
dns_unbound_exporter_mem: "45Mi"
920928
dns_coredns_cpu: "50m"
921929
dns_coredns_mem: "100Mi"
922930

@@ -1251,7 +1259,7 @@ wiz_priority: "false"
12511259
wiz_node_feature_rollout : "false"
12521260

12531261
# EKS specific configuration
1254-
eks_control_plane_logging: "false"
1262+
eks_control_plane_logging: "true"
12551263
eks_ip_family: "ipv4"
12561264
eks_zalando_iam_aws_proxy_cpu: "100m"
12571265
eks_zalando_iam_aws_proxy_memory: "512Mi"

cluster/manifests/01-coredns-local/configmap-local.yaml

Lines changed: 35 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,11 @@ data:
1010
unbound.conf: |
1111
server:
1212
directory: "/etc/unbound/"
13+
{{- if and (eq .Cluster.Provider "zalando-eks") (eq .Cluster.ConfigItems.eks_ip_family "ipv6") }}
14+
interface: "::0"
15+
{{- else }}
1316
interface: 0.0.0.0
17+
{{- end }}
1418
interface-automatic: yes
1519
# Drop user privileges after binding the port.
1620
username: "_unbound"
@@ -21,24 +25,52 @@ data:
2125
log-servfail: yes
2226
# allow query localhost (coredns at 127.0.0.1:9254)
2327
do-not-query-localhost: no
28+
{{- if and (eq .Cluster.Provider "zalando-eks") (eq .Cluster.ConfigItems.eks_ip_family "ipv6") }}
29+
access-control: ::/0 allow
30+
{{- else }}
2431
access-control: 0.0.0.0/0 allow
32+
{{- end }}
2533
harden-dnssec-stripped: no
2634
so-reuseport: yes
2735
cache-min-ttl: 1
2836
disable-dnssec-lame-check: yes
2937
minimal-responses: yes
3038
extended-statistics: yes
3139
# support reverse lookup of kubernetes addresses
40+
{{- if eq .Cluster.Provider "zalando-eks" }}
41+
# CoreDNS is authoritative for the reverse lookup ranges. Therefore
42+
# disable the default protection in unbound to allow reverse lookup
43+
# queries to pass through to CoreDNS
44+
# https://github.com/NLnetLabs/unbound/blob/5c84bb573f9728c10bcb3592dbd12be403d362de/doc/example.conf.in#L804-L850
45+
local-zone: "d.f.ip6.arpa." nodefault
46+
local-zone: "8.e.f.ip6.arpa." nodefault
47+
local-zone: "9.e.f.ip6.arpa." nodefault
48+
local-zone: "a.e.f.ip6.arpa." nodefault
49+
local-zone: "b.e.f.ip6.arpa." nodefault
50+
local-zone: "8.b.d.0.1.0.0.2.ip6.arpa." nodefault
51+
local-zone: "ip6.arpa." transparent
52+
local-zone: "10.in-addr.arpa." nodefault
53+
local-zone: "in-addr.arpa." transparent
54+
{{- else }}
3255
local-zone: "2.10.in-addr.arpa." transparent
3356
local-zone: "3.10.in-addr.arpa." transparent
3457
local-zone: "5.10.in-addr.arpa." transparent
35-
# make metrics available for the unbound-telemetry container (127.0.0.1:9054)
58+
{{- end }}
59+
# make metrics available for the unbound_exporter
3660
remote-control:
3761
control-enable: yes
38-
control-use-cert: no
62+
control-interface: /run/unbound/unbound.ctl
3963
forward-zone:
4064
name: "."
4165
forward-addr: 127.0.0.1@9254 # coredns
66+
{{- if eq .Cluster.Provider "zalando-eks" }}
67+
forward-zone:
68+
name: "ip6.arpa."
69+
forward-addr: 127.0.0.1@9254 # coredns
70+
forward-zone:
71+
name: "in-addr.arpa."
72+
forward-addr: 127.0.0.1@9254 # coredns
73+
{{- else }}
4274
forward-zone:
4375
name: "2.10.in-addr.arpa."
4476
forward-addr: 127.0.0.1@9254 # coredns
@@ -48,6 +80,7 @@ data:
4880
forward-zone:
4981
name: "5.10.in-addr.arpa."
5082
forward-addr: 127.0.0.1@9254 # coredns
83+
{{- end }}
5184
Corefile: |
5285
{{ if and .Cluster.ConfigItems.custom_dns_zone .Cluster.ConfigItems.custom_dns_zone_nameservers }}
5386
{{ .Cluster.ConfigItems.custom_dns_zone }}:9254 {

cluster/manifests/01-coredns-local/daemonset-coredns.yaml

Lines changed: 27 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,10 @@ spec:
6666
command:
6767
- dig
6868
- "+short"
69-
{{- if and (eq .Cluster.Provider "zalando-eks") (eq .Cluster.ConfigItems.eks_ip_family "ipv4") }}
70-
- "@127.0.0.1"
69+
{{- if and (eq .Cluster.Provider "zalando-eks") (eq .Cluster.ConfigItems.eks_ip_family "ipv6") }}
70+
- "@::1"
7171
{{- else }}
72-
- "::1"
72+
- "@127.0.0.1"
7373
{{- end }}
7474
- "kubernetes.default.svc.cluster.local"
7575
initialDelaySeconds: 60
@@ -91,16 +91,20 @@ spec:
9191
name: config-volume
9292
readOnly: true
9393
subPath: unbound.conf
94-
- name: unbound-telemetry
95-
{{- if eq .Cluster.Provider "zalando-eks" }}
96-
image: 926694233939.dkr.ecr.eu-central-1.amazonaws.com/production_namespace/teapot/unbound-telemetry:master-5
97-
{{- else }}
98-
image: container-registry.zalando.net/teapot/unbound-telemetry:master-5
99-
{{- end }}
94+
- mountPath: /run/unbound
95+
name: unbound-socket
96+
readOnly: false
97+
- name: unbound-exporter
98+
image: 926694233939.dkr.ecr.eu-central-1.amazonaws.com/production_namespace/teapot/unbound_exporter:v0.4.6-main-1.custom
10099
args:
101-
- tcp
102-
# TODO: ipv6
103-
- --bind=0.0.0.0:9054
100+
- -unbound.ca
101+
- ""
102+
- -unbound.cert
103+
- ""
104+
- -unbound.host
105+
- "unix:///run/unbound/unbound.ctl"
106+
- -web.listen-address
107+
- ":9054"
104108
ports:
105109
- name: metrics
106110
containerPort: 9054
@@ -109,8 +113,12 @@ spec:
109113
requests:
110114
ephemeral-storage: 256Mi
111115
limits:
112-
cpu: {{.Cluster.ConfigItems.dns_unbound_telemetry_cpu}}
113-
memory: {{.Cluster.ConfigItems.dns_unbound_telemetry_mem}}
116+
cpu: {{.Cluster.ConfigItems.dns_unbound_exporter_cpu}}
117+
memory: {{.Cluster.ConfigItems.dns_unbound_exporter_mem}}
118+
volumeMounts:
119+
- mountPath: /run/unbound
120+
name: unbound-socket
121+
readOnly: false
114122
{{ end }}
115123
{{ if eq .Cluster.ConfigItems.dns_cache "dnsmasq" }}
116124
- name: dnsmasq
@@ -183,7 +191,6 @@ spec:
183191
args:
184192
- --v=2
185193
- --logtostderr
186-
# TODO: ipv6
187194
- --probe=dnsmasq,127.0.0.1:9254,ec2.amazonaws.com,5,A
188195
- --prometheus-port=9054
189196
ports:
@@ -203,7 +210,7 @@ spec:
203210
{{ end }}
204211
- name: coredns
205212
{{- if eq .Cluster.Provider "zalando-eks" }}
206-
image: 926694233939.dkr.ecr.eu-central-1.amazonaws.com/production_namespace/teapot/coredns:1.11.3-master-24
213+
image: 926694233939.dkr.ecr.eu-central-1.amazonaws.com/production_namespace/teapot/coredns:1.12.0-master-25
207214
{{- else }}
208215
image: container-registry.zalando.net/teapot/coredns:1.12.0-master-25
209216
{{- end }}
@@ -292,3 +299,7 @@ spec:
292299
path: Corefile
293300
- key: unbound.conf
294301
path: unbound.conf
302+
{{- if eq .Cluster.ConfigItems.dns_cache "unbound" }}
303+
- name: unbound-socket
304+
emptyDir: {}
305+
{{- end }}

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,6 @@ data:
197197
{{- end}}
198198

199199
node.node-not-ready-taint.enable: "{{ .Cluster.ConfigItems.teapot_admission_controller_node_not_ready_taint }}"
200-
node.karpenter-unregistered-taint.enable: "true"
201200
node.extended-node-restriction.enable: "true"
202201

203202
{{- range $group, $provider := nodeLifeCycleProviderPerNodePoolGroup .Cluster.NodePools }}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ spec:
3333
priorityClassName: system-cluster-critical
3434
containers:
3535
- name: admission-controller
36-
image: 926694233939.dkr.ecr.eu-central-1.amazonaws.com/production_namespace/teapot/admission-controller:master-247
36+
image: 926694233939.dkr.ecr.eu-central-1.amazonaws.com/production_namespace/teapot/admission-controller:master-248
3737
lifecycle:
3838
preStop:
3939
exec:

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

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,21 @@ webhooks:
1313
matchExpressions:
1414
- key: component
1515
operator: NotIn
16-
values: ["admission-controller", "coredns", "aws-node"]
16+
values:
17+
- "admission-controller"
18+
- "coredns"
19+
- "aws-node"
20+
- "external-dns"
21+
- "zalando-iam-aws-proxy"
1722
- key: k8s-app
1823
operator: NotIn
1924
values: ["kube-proxy"]
2025
- key: app.kubernetes.io/name
2126
operator: NotIn
2227
values: ["eks-pod-identity-agent"]
28+
- key: application
29+
operator: NotIn
30+
values: ["kube-ingress-aws-controller"]
2331
{{- end }}
2432
clientConfig:
2533
{{- if eq .Cluster.Provider "zalando-eks"}}
@@ -48,13 +56,21 @@ webhooks:
4856
matchExpressions:
4957
- key: component
5058
operator: NotIn
51-
values: ["admission-controller", "coredns", "aws-node"]
59+
values:
60+
- "admission-controller"
61+
- "coredns"
62+
- "aws-node"
63+
- "external-dns"
64+
- "zalando-iam-aws-proxy"
5265
- key: k8s-app
5366
operator: NotIn
5467
values: ["kube-proxy"]
5568
- key: app.kubernetes.io/name
5669
operator: NotIn
5770
values: ["eks-pod-identity-agent"]
71+
- key: application
72+
operator: NotIn
73+
values: ["kube-ingress-aws-controller"]
5874
{{- end }}
5975
clientConfig:
6076
{{- if eq .Cluster.Provider "zalando-eks"}}
@@ -552,6 +568,13 @@ webhooks:
552568
expression: '!(request.userInfo.username in ["system:kube-controller-manager", "system:kube-scheduler", "zalando-iam:zalando:service:k8sapi_credentials-provider"])'
553569
- name: 'exclude-eks-components'
554570
expression: '!request.userInfo.username.startsWith("eks:")'
571+
- name: 'allow-api-monitoring-controller-access'
572+
expression: |
573+
!(
574+
request.userInfo.username == "system:serviceaccount:api-infrastructure:api-monitoring-controller" &&
575+
object.kind == "ConfigMap" &&
576+
object.metadata.name == "skipper-default-filters"
577+
)
555578
- name: collaborator-deny-admitter.teapot.zalan.do
556579
clientConfig:
557580
{{- if eq .Cluster.Provider "zalando-eks"}}

cluster/manifests/02-skipper-validation-webhook/skipper-webhook.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,12 @@ webhooks:
1313
apiGroups: ["zalando.org"]
1414
apiVersions: ["v1"]
1515
resources: ["routegroups"]
16+
namespaceSelector:
17+
matchExpressions:
18+
- key: kubernetes.io/metadata.name
19+
operator: NotIn
20+
values:
21+
- kube-system
1622
clientConfig:
1723
# {{- if eq .Cluster.Provider "zalando-eks"}}
1824
service:
@@ -34,6 +40,12 @@ webhooks:
3440
apiGroups: ["networking.k8s.io"]
3541
apiVersions: ["v1"]
3642
resources: ["ingresses"]
43+
namespaceSelector:
44+
matchExpressions:
45+
- key: kubernetes.io/metadata.name
46+
operator: NotIn
47+
values:
48+
- kube-system
3749
clientConfig:
3850
# {{- if eq .Cluster.Provider "zalando-eks"}}
3951
service:

cluster/manifests/03-kube-aws-iam-controller/deployment.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ spec:
2727
hostNetwork: true
2828
containers:
2929
- name: kube-aws-iam-controller
30-
image: container-registry.zalando.net/teapot/kube-aws-iam-controller:v0.3.0-66-g9bdbaef
30+
image: container-registry.zalando.net/teapot/kube-aws-iam-controller:v0.3.0-68-g08c195b
3131
env:
3232
- name: AWS_DEFAULT_REGION
3333
value: "{{.Cluster.Region}}"

cluster/manifests/04-ebs-csi/controller.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ spec:
9191
allowPrivilegeEscalation: false
9292
readOnlyRootFilesystem: true
9393
- name: csi-provisioner
94-
image: container-registry.zalando.net/teapot/external-provisioner:v5.1.0-eks-1-31-10-master-26
94+
image: container-registry.zalando.net/teapot/external-provisioner:v5.1.0-eks-1-31-10-master-27
9595
args:
9696
- --csi-address=$(ADDRESS)
9797
- --v=2

0 commit comments

Comments
 (0)