Skip to content

Commit e68cc9e

Browse files
feat: add global constraints (tolerations/nodeSelector/affinity) (#33)
1 parent 55171da commit e68cc9e

File tree

3 files changed

+22
-12
lines changed

3 files changed

+22
-12
lines changed

codefresh-tunnel-client/Chart.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@ apiVersion: v2
22
name: codefresh-tunnel-client
33
description: Codefresh tunnel client for ingressless operation of runtimes
44
type: application
5-
version: 0.1.19
6-
appVersion: "2025.03.04-52de940"
5+
version: 0.1.20
6+
appVersion: "2025.03.04-52de940"

codefresh-tunnel-client/templates/_libs/_deployment.yaml

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,17 @@
22
Deployment template
33
*/}}
44
{{- define "codefresh-tunnel-client.deployment" -}}
5+
{{- $nodeSelector := .Values.nodeSelector | default dict }}
6+
{{- $globalNodeSelector := .Values.global.nodeSelector | default dict }}
7+
{{- $allNodeSelector := mergeOverwrite $globalNodeSelector $nodeSelector }}
8+
9+
{{- $tolerations := .Values.tolerations | default list }}
10+
{{- $globalTolerations := .Values.global.tolerations | default list }}
11+
{{- $allToleration := concat $globalTolerations $tolerations }}
12+
13+
{{- $affinity := .Values.affinity | default dict }}
14+
{{- $globalAffinity := .Values.global.affinity | default dict }}
15+
{{- $allAffinity := mergeOverwrite $globalAffinity $affinity }}
516
apiVersion: apps/v1
617
kind: Deployment
718
metadata:
@@ -60,16 +71,13 @@ spec:
6071
items:
6172
- key: frpc.ini
6273
path: frpc.ini
63-
{{- with .Values.nodeSelector }}
64-
nodeSelector:
65-
{{- toYaml . | nindent 8 }}
74+
{{- with $allNodeSelector }}
75+
nodeSelector: {{ toYaml . | nindent 8 }}
6676
{{- end }}
67-
{{- with .Values.affinity }}
68-
affinity:
69-
{{- toYaml . | nindent 8 }}
77+
{{- with $allToleration }}
78+
tolerations: {{ toYaml . | nindent 6 }}
7079
{{- end }}
71-
{{- with .Values.tolerations }}
72-
tolerations:
73-
{{- toYaml . | nindent 8 }}
80+
{{- with $allAffinity }}
81+
affinity: {{ toYaml . | nindent 8 }}
7482
{{- end }}
75-
{{- end }}
83+
{{- end }}

codefresh-tunnel-client/values.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
# Added to support usage in codefresh-gitops-runtime Helm chart
33
libraryMode: false
44

5+
global: {}
6+
57
image:
68
repository: quay.io/codefresh/frpc
79
pullPolicy: IfNotPresent

0 commit comments

Comments
 (0)