File tree Expand file tree Collapse file tree 6 files changed +118
-1
lines changed
Expand file tree Collapse file tree 6 files changed +118
-1
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ " helm-charts " : patch
3+ ---
4+
5+ feat: improve availability of HyperDX pods
Original file line number Diff line number Diff line change 3636 tolerations :
3737 {{- toYaml .Values.hyperdx.tolerations | nindent 8 }}
3838 {{- end }}
39+ {{- if .Values.hyperdx.topologySpreadConstraints }}
40+ topologySpreadConstraints :
41+ {{- toYaml .Values.hyperdx.topologySpreadConstraints | nindent 8 }}
42+ {{- end }}
43+ {{- if .Values.hyperdx.priorityClassName }}
44+ priorityClassName : {{ .Values.hyperdx.priorityClassName | quote }}
45+ {{- end }}
3946 {{- if .Values.mongodb.enabled }}
4047 initContainers :
4148 - name : wait-for-mongodb
5360 containerPort : {{ .Values.hyperdx.apiPort }}
5461 - name : opamp-port
5562 containerPort : {{ .Values.hyperdx.opampPort }}
63+ {{- if .Values.hyperdx.resources }}
64+ resources :
65+ {{- toYaml .Values.hyperdx.resources | nindent 12 }}
66+ {{- end }}
5667 envFrom :
5768 - configMapRef :
5869 name : {{ include "hdx-oss.fullname" . }}-app-config
Original file line number Diff line number Diff line change 1+ {{- if .Values.hyperdx.podDisruptionBudget.enabled }}
2+ apiVersion : policy/v1
3+ kind : PodDisruptionBudget
4+ metadata :
5+ name : {{ include "hdx-oss.fullname" . }}-pdb
6+ labels :
7+ {{- include "hdx-oss.labels" . | nindent 4 }}
8+ app : {{ include "hdx-oss.fullname" . }}
9+ {{- if .Values.hyperdx.labels }}
10+ {{- with .Values.hyperdx.labels }}
11+ {{- toYaml . | nindent 4 }}
12+ {{- end -}}
13+ {{- end }}
14+ spec :
15+ minAvailable : {{ .Values.hyperdx.podDisruptionBudget.minAvailable | default 1 }}
16+ selector :
17+ matchLabels :
18+ {{- include "hdx-oss.selectorLabels" . | nindent 6 }}
19+ app : {{ include "hdx-oss.fullname" . }}
20+ {{- end }}
Original file line number Diff line number Diff line change @@ -47,4 +47,53 @@ tests:
4747 asserts :
4848 - equal :
4949 path : spec.replicas
50- value : 3
50+ value : 3
51+
52+ - it : should set topology spread constraints when specified
53+ set :
54+ hyperdx :
55+ topologySpreadConstraints :
56+ - maxSkew : 1
57+ topologyKey : topology.kubernetes.io/zone
58+ whenUnsatisfiable : DoNotSchedule
59+ labelSelector :
60+ matchLabels :
61+ foo : bar
62+ asserts :
63+ - contains :
64+ path : spec.template.spec.topologySpreadConstraints
65+ content :
66+ maxSkew : 1
67+ topologyKey : topology.kubernetes.io/zone
68+ whenUnsatisfiable : DoNotSchedule
69+ labelSelector :
70+ matchLabels :
71+ foo : bar
72+
73+ - it : should set priority class name when specified
74+ set :
75+ hyperdx :
76+ priorityClassName : system-node-critical
77+ asserts :
78+ - equal :
79+ path : spec.template.spec.priorityClassName
80+ value : system-node-critical
81+
82+ - it : should set container resources when specified
83+ set :
84+ hyperdx :
85+ resources :
86+ limits :
87+ memory : 1Gi
88+ requests :
89+ cpu : 100m
90+ memory : 256Mi
91+ asserts :
92+ - equal :
93+ path : spec.template.spec.containers[0].resources
94+ value :
95+ limits :
96+ memory : 1Gi
97+ requests :
98+ cpu : 100m
99+ memory : 256Mi
Original file line number Diff line number Diff line change 1+ suite : Test HyperDX App PodDisruptionBudget
2+ templates :
3+ - hyperdx-pdb.yaml
4+ tests :
5+ - it : should render the app pdb when enabled
6+ set :
7+ hyperdx :
8+ podDisruptionBudget :
9+ enabled : true
10+ asserts :
11+ - isKind :
12+ of : PodDisruptionBudget
13+ - equal :
14+ path : spec.minAvailable
15+ value : 1
16+ - matchRegex :
17+ path : metadata.name
18+ pattern : -pdb$
19+
20+ - it : should override minimum available replicas when specified
21+ set :
22+ hyperdx :
23+ podDisruptionBudget :
24+ enabled : true
25+ minAvailable : 5
26+ asserts :
27+ - equal :
28+ path : spec.minAvailable
29+ value : 5
Original file line number Diff line number Diff line change @@ -191,6 +191,9 @@ hyperdx:
191191
192192 replicas : 1
193193
194+ podDisruptionBudget :
195+ enabled : false
196+
194197 # Service configuration
195198 service :
196199 type : ClusterIP # Use ClusterIP for security. For external access, use ingress with proper TLS and authentication
You can’t perform that action at this time.
0 commit comments