File tree Expand file tree Collapse file tree 6 files changed +57
-10
lines changed
Expand file tree Collapse file tree 6 files changed +57
-10
lines changed Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ dependencies:
1818 repository : oci://us-east1-docker.pkg.dev/testkube-cloud-372110/testkube
1919 - name : nats
2020 condition : testkube-api.nats.enabled
21- version : 1.2.6-3
21+ version : 1.2.6-4
2222 repository : " file://./charts/nats"
2323 - name : testkube-api
2424 version : 2.x.x-x
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ keywords:
66- nats
77- messaging
88- cncf
9- version : 1.2.6-3
9+ version : 1.2.6-4
1010home : http://github.com/nats-io/k8s
1111maintainers :
1212
Original file line number Diff line number Diff line change 7575 {{- end}}
7676
7777 securityContext :
78- {{- include "nats.podSecurityContext" $ | nindent 6 }}
78+ {{- include "nats.podSecurityContext" $ | nindent 6 }}
79+ nodeSelector :
80+ {{- include "nats.nodeSelector" . | indent 4 }}
81+ affinity :
82+ {{- include "nats.affinity" . | indent 4 }}
83+ tolerations :
84+ {{- include "nats.tolerations" . | indent 4 }}
Original file line number Diff line number Diff line change @@ -301,4 +301,37 @@ Define containerSecurityContext
301301{ {- else } }
302302{ {- toYaml .Values.containerSecurityContext } }
303303{ {- end } }
304+ { {- end } }
305+
306+ { {/*
307+ Define tolerations
308+ */} }
309+ { {- define " nats.tolerations" -} }
310+ { {- if .Values.global.tolerations } }
311+ { { toYaml .Values.global.tolerations } }
312+ { {- else } }
313+ { { toYaml .Values.tolerations } }
314+ { {- end } }
315+ { {- end } }
316+
317+ { {/*
318+ Define affinity
319+ */} }
320+ { {- define " nats.affinity" -} }
321+ { {- if .Values.global.affinity } }
322+ { { toYaml .Values.global.affinity } }
323+ { {- else } }
324+ { { toYaml .Values.affinity } }
325+ { {- end } }
326+ { {- end } }
327+
328+ { {/*
329+ Define nodeSelector
330+ */} }
331+ { {- define " nats.nodeSelector" -} }
332+ { {- if .Values.global.nodeSelector } }
333+ { { toYaml .Values.global.nodeSelector } }
334+ { {- else } }
335+ { { toYaml .Values.nodeSelector } }
336+ { {- end } }
304337{ {- end } }
Original file line number Diff line number Diff line change @@ -15,6 +15,13 @@ global:
1515 # can be overridden by individual image registry
1616 registry :
1717
18+ # -- Global Tolerations
19+ tolerations : []
20+ # -- Global NodeSelector
21+ nodeSelector : {}
22+ # -- Global Affinity
23+ affinity : {}
24+
1825 # global labels will be applied to all resources deployed by the chart
1926 labels : {}
2027 # -- Security Context for all pods
Original file line number Diff line number Diff line change @@ -262,8 +262,6 @@ postgresql:
262262 pullSecrets : []
263263
264264# # NATS chart parameter
265- # # Tolerations to schedule a workload to nodes with any architecture type. Required for deployment to GKE cluster.
266- # # More info: https://cloud.google.com/kubernetes-engine/docs/how-to/prepare-arm-workloads-for-deployment#node-affinity-multi-arch-arm
267265nats :
268266 # -- Uncomment to pass a global registry name to all NATS images
269267 # global:
@@ -276,12 +274,15 @@ nats:
276274 # tag: 2.11.6-alpine
277275 # pullPolicy:
278276 # registry:
277+ # Example of setting nodeSelector and tolerations
278+ # nodeSelector:
279+ # workload-type: infra
280+ # tolerations:
281+ # - effect: NoSchedule
282+ # key: workload-type
283+ # operator: Equal
284+ # value: infra
279285 # NATS Box container settings
280- # TODO remove this container after tests on dev and stage
281- # nats-box is A lightweight container with NATS utilities. It's not needed for nats server
282- # change it to
283- # natsBox:
284- # enabled: false
285286 natsBox :
286287 enabled : false
287288 # -- Uncomment to override the NATS Box image options
You can’t perform that action at this time.
0 commit comments