Skip to content

Commit 8a0160e

Browse files
committed
chore(helm): limit spread constraints to webapp for now
1 parent 76af2e2 commit 8a0160e

File tree

4 files changed

+0
-32
lines changed

4 files changed

+0
-32
lines changed

apps/supervisor/src/env.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,6 @@ const Env = z.object({
9090
KUBERNETES_MEMORY_REQUEST_MIN_GB: z.coerce.number().min(0).default(0),
9191
KUBERNETES_MEMORY_REQUEST_RATIO: z.coerce.number().min(0).max(1).default(1), // Ratio of memory limit, so 1 = 100% of memory limit
9292
KUBERNETES_MEMORY_OVERHEAD_GB: z.coerce.number().min(0).optional(), // Optional memory overhead to add to the limit in GB
93-
KUBERNETES_TOPOLOGY_SPREAD_CONSTRAINTS: z.string().optional(), // JSON string
9493

9594
// Placement tags settings
9695
PLACEMENT_TAGS_ENABLED: BoolEnv.default(false),

apps/supervisor/src/workloadManager/kubernetes.ts

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -56,22 +56,6 @@ export class KubernetesWorkloadManager implements WorkloadManager {
5656
};
5757
}
5858

59-
private parseTopologySpreadConstraints(): k8s.V1TopologySpreadConstraint[] | null {
60-
if (!env.KUBERNETES_TOPOLOGY_SPREAD_CONSTRAINTS) {
61-
return null;
62-
}
63-
64-
try {
65-
return JSON.parse(env.KUBERNETES_TOPOLOGY_SPREAD_CONSTRAINTS);
66-
} catch (error) {
67-
this.logger.error("[KubernetesWorkloadManager] Failed to parse topology spread constraints", {
68-
error: error instanceof Error ? error.message : String(error),
69-
raw: env.KUBERNETES_TOPOLOGY_SPREAD_CONSTRAINTS,
70-
});
71-
return null;
72-
}
73-
}
74-
7559
private stripImageDigest(imageRef: string): string {
7660
if (!env.KUBERNETES_STRIP_IMAGE_DIGEST) {
7761
return imageRef;
@@ -286,8 +270,6 @@ export class KubernetesWorkloadManager implements WorkloadManager {
286270
}
287271

288272
get #defaultPodSpec(): Omit<k8s.V1PodSpec, "containers"> {
289-
const topologySpreadConstraints = this.parseTopologySpreadConstraints();
290-
291273
return {
292274
restartPolicy: "Never",
293275
automountServiceAccountToken: false,
@@ -299,7 +281,6 @@ export class KubernetesWorkloadManager implements WorkloadManager {
299281
},
300282
}
301283
: {}),
302-
...(topologySpreadConstraints ? { topologySpreadConstraints } : {}),
303284
};
304285
}
305286

hosting/k8s/helm/templates/supervisor.yaml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -184,10 +184,6 @@ spec:
184184
value: {{ default "10Gi" .Values.supervisor.config.kubernetes.ephemeralStorageSizeLimit | quote }}
185185
- name: KUBERNETES_EPHEMERAL_STORAGE_SIZE_REQUEST
186186
value: {{ default "2Gi" .Values.supervisor.config.kubernetes.ephemeralStorageSizeRequest | quote }}
187-
{{- with .Values.supervisor.config.kubernetes.topologySpreadConstraints }}
188-
- name: KUBERNETES_TOPOLOGY_SPREAD_CONSTRAINTS
189-
value: {{ tpl (toYaml .) $ | toJson | quote }}
190-
{{- end }}
191187
# Pod cleaner configuration
192188
- name: POD_CLEANER_ENABLED
193189
value: {{ .Values.supervisor.config.podCleaner.enabled | quote }}
@@ -276,10 +272,6 @@ spec:
276272
tolerations:
277273
{{- toYaml . | nindent 8 }}
278274
{{- end }}
279-
{{- with .Values.supervisor.topologySpreadConstraints }}
280-
topologySpreadConstraints:
281-
{{- tpl (toYaml .) $ | nindent 8 }}
282-
{{- end }}
283275
---
284276
apiVersion: v1
285277
kind: Service

hosting/k8s/helm/values.yaml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -265,8 +265,6 @@ supervisor:
265265
workerNodetypeLabel: "" # When set, runs will only be scheduled on nodes with "nodetype=<label>"
266266
ephemeralStorageSizeLimit: "" # Default: 10Gi
267267
ephemeralStorageSizeRequest: "" # Default: 2Gi´
268-
# Topology Spread Constraints for worker pods created by the supervisor. Evaluated as a template
269-
topologySpreadConstraints: []
270268
podCleaner:
271269
enabled: true
272270
batchSize: 100
@@ -357,8 +355,6 @@ supervisor:
357355
nodeSelector: {}
358356
tolerations: []
359357
affinity: {}
360-
# Topology Spread Constraints for pod assignment spread across your cluster among failure-domains. Evaluated as a template
361-
topologySpreadConstraints: []
362358

363359
# PostgreSQL configuration
364360
# Subchart: https://github.com/bitnami/charts/tree/main/bitnami/postgresql

0 commit comments

Comments
 (0)