Skip to content

Commit 255d92b

Browse files
authored
fix: explicitly specify TCP protocol for helm SSA compatibility (#692) (#1901)
**Description of the change** This PR adds the explicit `protocol: TCP` field to the port definitions in the Sealed Secrets Helm chart. While TCP is the default protocol in Kubernetes, Server-Side Apply (SSA) on clusters running version 1.19 or earlier can reject manifests if the protocol is not explicitly defined. This change ensures the Helm chart is compatible with modern GitOps workflows (like ArgoCD or Flux using SSA) across all supported Kubernetes versions. **Targeted Files:** - `templates/deployment.yaml`: Added `protocol: TCP` to the http and metrics container ports. - `templates/service.yaml`: Added `protocol: TCP` to the main service and metrics service port definitions. **Benefits** - Resolves deployment failures when using Server-Side Apply on older Kubernetes clusters (<= 1.19). - Improves manifest explicitness and follows best practices for cross-version compatibility. **Applicable issues** - fixes #692 **Checklist** - [x] I have read the CONTRIBUTING doc. - [x] My commit is Signed-off-by using `git commit -s`. - [ ] (If applicable) Table of Contents in `README.md` or `values.txt` has been updated via `doctoc`. - [x] Changes are focused solely on the Helm YAML templates as requested. Signed-off-by: Emmanuel Tom Jose <84658038+leantos@users.noreply.github.com>
1 parent de6d9d7 commit 255d92b

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

helm/sealed-secrets/templates/deployment.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,13 +181,15 @@ spec:
181181
ports:
182182
- name: http
183183
containerPort: {{ .Values.containerPorts.http | default "8080" }}
184+
protocol: TCP
184185
{{- if .Values.hostNetwork }}
185186
hostPort: {{ .Values.containerPorts.http }}
186187
{{- else if .Values.hostPorts.http }}
187188
hostPort: {{ .Values.hostPorts.http }}
188189
{{- end }}
189190
- name: metrics
190191
containerPort: {{ .Values.containerPorts.metrics | default "8081" }}
192+
protocol: TCP
191193
{{- if .Values.hostNetwork }}
192194
hostPort: {{ .Values.containerPorts.metrics }}
193195
{{- else if .Values.hostPorts.metrics }}

helm/sealed-secrets/templates/service.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ spec:
2929
- name: http
3030
port: {{ .Values.service.port }}
3131
targetPort: http
32+
protocol: TCP
3233
{{- if and (or (eq .Values.service.type "NodePort") (eq .Values.service.type "LoadBalancer")) (not (empty .Values.service.nodePort)) }}
3334
nodePort: {{ .Values.service.nodePort }}
3435
{{- else if eq .Values.service.type "ClusterIP" }}
@@ -67,6 +68,7 @@ spec:
6768
- name: metrics
6869
port: {{ .Values.metrics.service.port }}
6970
targetPort: metrics
71+
protocol: TCP
7072
{{- if and (or (eq .Values.metrics.service.type "NodePort") (eq .Values.metrics.service.type "LoadBalancer")) (not (empty .Values.metrics.service.nodePort)) }}
7173
nodePort: {{ .Values.metrics.service.nodePort }}
7274
{{- else if eq .Values.metrics.service.type "ClusterIP" }}

0 commit comments

Comments
 (0)