Skip to content

Commit f75d893

Browse files
authored
Merge pull request #98 from arvatoaws-labs/develop
merge to master
2 parents 8cd9579 + dac7136 commit f75d893

File tree

6 files changed

+38
-6
lines changed

6 files changed

+38
-6
lines changed

templates/cron-job.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ metadata:
1313
downscaler/uptime: {{ $.Values.wordpress.uptime }}
1414
{{- end }}
1515
checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") $ | sha256sum }}
16+
{{- if $.Values.automaticZonePlacement.enabled }}
17+
automatic-zone-placement/fqdn: {{ $.Values.automaticZonePlacement.fqdn | quote }}
18+
{{- end }}
1619
spec:
1720
{{- $schedule := dig "schedule" "" $cronvalue }}
1821
{{- $scheduleEveryHrs := dig "scheduleEveryHrs" "" $cronvalue }}

templates/deployment-exporter.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ spec:
2525
{{- toYaml . | nindent 8 }}
2626
{{- end }}
2727
annotations:
28+
{{- if .Values.automaticZonePlacement.enabled }}
29+
automatic-zone-placement/fqdn: {{ .Values.automaticZonePlacement.fqdn | quote }}
30+
{{- end }}
2831
{{- with .Values.podAnnotations }}
2932
{{- toYaml . | nindent 8 }}
3033
{{- end }}

templates/deployment-worker.yaml

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ spec:
2626
annotations:
2727
checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}
2828
checksum/secret: {{ include (print $.Template.BasePath "/secrets.yaml") . | sha256sum }}
29+
{{- if .Values.automaticZonePlacement.enabled }}
30+
automatic-zone-placement/fqdn: {{ .Values.automaticZonePlacement.fqdn | quote }}
31+
{{- end }}
2932
{{- with .Values.podAnnotations }}
3033
{{- toYaml . | nindent 8 }}
3134
{{- end }}
@@ -316,25 +319,35 @@ spec:
316319
{{- end }}
317320
{{- end }}
318321
topologySpreadConstraints:
322+
{{- if .Values.automaticZonePlacement.enabled }}
323+
{{- if .Values.automaticZonePlacement.spreadInstancesTypes }}
324+
- labelSelector:
325+
matchLabels:
326+
app.kubernetes.io/instance: {{ .Release.Name }}
327+
app.kubernetes.io/component: "worker"
328+
matchLabelKeys:
329+
- pod-template-hash
330+
maxSkew: 1
331+
topologyKey: node.kubernetes.io/instance-type
332+
whenUnsatisfiable: ScheduleAnyway
333+
{{- end }}
334+
{{- else }}
319335
- labelSelector:
320336
matchLabels:
321337
app.kubernetes.io/instance: {{ .Release.Name }}
322338
app.kubernetes.io/component: "worker"
323-
{{- if semverCompare ">=1.27-0" $.Capabilities.KubeVersion.GitVersion }}
324339
matchLabelKeys:
325340
- pod-template-hash
326-
{{- end }}
327341
maxSkew: 1
328342
topologyKey: topology.kubernetes.io/zone
329343
whenUnsatisfiable: ScheduleAnyway
344+
{{- end }}
330345
- labelSelector:
331346
matchLabels:
332347
app.kubernetes.io/instance: {{ .Release.Name }}
333348
app.kubernetes.io/component: "worker"
334-
{{- if semverCompare ">=1.27-0" $.Capabilities.KubeVersion.GitVersion }}
335349
matchLabelKeys:
336350
- pod-template-hash
337-
{{- end }}
338351
maxSkew: 1
339352
topologyKey: kubernetes.io/hostname
340353
whenUnsatisfiable: DoNotSchedule

templates/hook-jobs.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ spec:
3030
{{- if $.Values.karpenter.optimization }}
3131
karpenter.sh/do-not-disrupt: "true"
3232
{{- end }}
33+
{{- if $.Values.automaticZonePlacement.enabled }}
34+
automatic-zone-placement/fqdn: {{ $.Values.automaticZonePlacement.fqdn | quote }}
35+
{{- end }}
3336
spec:
3437
{{- with $.Values.imagePullSecrets }}
3538
imagePullSecrets:

values.yaml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ karpenter:
8181
nginx:
8282
image:
8383
repository: public.ecr.aws/nginx/nginx
84-
tag: 1.29.3-alpine-slim
84+
tag: 1.29.4-alpine-slim
8585
pullPolicy: IfNotPresent
8686
resources: {}
8787
disallow_robots: false
@@ -180,7 +180,7 @@ offload:
180180
fileName: wpoffload_private.pem
181181
errorPages:
182182
enabled: false
183-
image: public.ecr.aws/aws-cli/aws-cli:2.31.31
183+
image: public.ecr.aws/aws-cli/aws-cli:2.32.16
184184
path: /var/www/html/error-pages
185185

186186

@@ -379,3 +379,8 @@ cron:
379379
restartPolicy: OnFailure
380380
startingDeadlineSeconds: 1800
381381
ttlSecondsAfterFinished: 600
382+
383+
automaticZonePlacement:
384+
enabled: false
385+
spreadInstancesTypes: false
386+
fqdn: ""

values_test.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,3 +102,8 @@ serviceAccount:
102102
# If not set and create is true, a name is generated using the release name
103103
name: test-project
104104
iamRoleArn: arn:aws:iam::123456789012:role/test-project-role
105+
106+
automaticZonePlacement:
107+
enabled: true
108+
spreadInstancesTypes: false
109+
fqdn: wordpress.rds.cloud.internal

0 commit comments

Comments
 (0)