Skip to content

Commit d8fcb28

Browse files
dylanratcliffeactions-user
authored andcommitted
Fix helm chart naming and simply autoscaling (by removing it) (#2863)
As part of this PR I have removed the horizontal pod auto scaling functionality from the helm chart since we have never used it and never needed it and it adds complexity to customer deployment that harness were asking about. I've also added a pod disruption budget so that the pods won't get evicted too quickly and simplified to do just a simple deployment without any autoscaling. Since we're limited by how quickly we can query the API anyway there is essentially no chance that we're going to max out the CPU on a source so as long as it's running we're happy. Plus the user can still change the number of replicas in the helm chart if they need to. I also updated the name that the source users to use the user provided name rather than the name of the chart. This is requires some documentation updates as well. Once this is complete, we're going to need to tag a new release i.e. ``` git tag k8s-source/v0.10.0 git push origin k8s-source/v0.10.0 ``` GitOrigin-RevId: 5298f9c1431477c8db0cdcb7f85263047c52b403
1 parent 41122c6 commit d8fcb28

File tree

6 files changed

+38
-42
lines changed

6 files changed

+38
-42
lines changed

k8s-source/deployments/overmind-kube-source/README.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,23 @@
55
Installing into a local cluster:
66

77
```shell
8-
helm install k8s-source deployments/overmind-kube-source --set source.natsJWT=REPLACEME,source.natsNKeySeed=REPLACEME
8+
helm install k8s-source deployments/overmind-kube-source \
9+
--set source.apiKey.value=YOUR_API_KEY \
10+
--set source.clusterName=my-cluster
911
```
1012

13+
### Production Configuration Example
14+
15+
For production deployments (single replica with PDB enabled by default):
16+
17+
```shell
18+
helm install k8s-source deployments/overmind-kube-source \
19+
--set source.apiKey.value=YOUR_API_KEY \
20+
--set source.clusterName=production-cluster
21+
```
22+
23+
**Note**: The k8s source typically has very low load, so a single replica is usually sufficient. PDB is enabled by default to protect against maintenance operations, and the deployment uses a rolling update strategy with `maxUnavailable: 1` to ensure zero-downtime updates.
24+
1125
Removing the chart:
1226

1327
```shell

k8s-source/deployments/overmind-kube-source/templates/configmap.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ metadata:
77
data:
88
LOG: {{ .Values.source.log }}
99
MAX_PARALLEL: {{ .Values.source.maxParallel | quote }}
10-
SOURCE_NAME: {{ .Chart.Name }}
10+
SOURCE_NAME: {{ include "overmind-kube-source.fullname" . }}
1111
RATE_LIMIT_QPS: {{ .Values.source.rateLimitQPS | quote }}
1212
RATE_LIMIT_BURST: {{ .Values.source.rateLimitBurst | quote }}
1313
{{- if .Values.source.clusterName }}

k8s-source/deployments/overmind-kube-source/templates/deployment.yaml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,12 @@ metadata:
66
labels:
77
{{- include "overmind-kube-source.labels" . | nindent 4 }}
88
spec:
9-
{{- if not .Values.autoscaling.enabled }}
109
replicas: {{ .Values.replicaCount }}
11-
{{- end }}
10+
strategy:
11+
type: RollingUpdate
12+
rollingUpdate:
13+
maxUnavailable: 1
14+
maxSurge: 1
1215
selector:
1316
matchLabels:
1417
{{- include "overmind-kube-source.selectorLabels" . | nindent 6 }}

k8s-source/deployments/overmind-kube-source/templates/hpa.yaml

Lines changed: 0 additions & 32 deletions
This file was deleted.
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{{- if .Values.podDisruptionBudget.enabled }}
2+
apiVersion: policy/v1
3+
kind: PodDisruptionBudget
4+
metadata:
5+
name: {{ include "overmind-kube-source.fullname" . }}
6+
labels:
7+
{{- include "overmind-kube-source.labels" . | nindent 4 }}
8+
spec:
9+
maxUnavailable: 1
10+
selector:
11+
matchLabels:
12+
{{- include "overmind-kube-source.selectorLabels" . | nindent 6 }}
13+
{{- end }}

k8s-source/deployments/overmind-kube-source/values.yaml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,12 +53,10 @@ resources: {}
5353
# cpu: 100m
5454
# memory: 128Mi
5555

56-
autoscaling:
57-
enabled: false
58-
minReplicas: 1
59-
maxReplicas: 3
60-
targetCPUUtilizationPercentage: 80
61-
# targetMemoryUtilizationPercentage: 80
56+
podDisruptionBudget:
57+
enabled: true
58+
# Pod Disruption Budget protects against maintenance operations (node drains, cluster upgrades)
59+
# Uses maxUnavailable: 1 which works for both single and multi-replica deployments
6260

6361
nodeSelector: {}
6462

0 commit comments

Comments
 (0)