Skip to content

Commit

Permalink
BUG: kubernetes-ingress: limit template spec name to 15 characters (#247
Browse files Browse the repository at this point in the history
)

Remove "-tcp" suffix according to RFC6335.

Signed-off-by: bmailhe <[email protected]>
  • Loading branch information
bmailhe authored Jun 27, 2024
1 parent 30ba3f1 commit a63afa3
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions kubernetes-ingress/templates/NOTES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Service ports mapped are:
protocol: UDP
{{- end }}
{{- range .Values.controller.service.tcpPorts }}
- name: {{ .name }}-tcp
- name: {{ .name | trunc 15 | trimSuffix "-" }}
containerPort: {{ .targetPort }}
protocol: TCP
{{- end }}
Expand Down Expand Up @@ -61,7 +61,7 @@ Service ports mapped are:
{{- end }}
{{- end }}
{{- range .Values.controller.service.tcpPorts }}
- name: {{ .name }}-tcp
- name: {{ .name | trunc 15 | trimSuffix "-" }}
containerPort: {{ .port }}
protocol: TCP
{{- if $useHostPort }}
Expand Down
2 changes: 1 addition & 1 deletion kubernetes-ingress/templates/controller-daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ spec:
{{- end }}
{{- end }}
{{- range .Values.controller.service.tcpPorts }}
- name: {{ .name }}-tcp
- name: {{ .name | trunc 15 | trimSuffix "-" }}
containerPort: {{ .port }}
protocol: TCP
{{- if $useHostPort }}
Expand Down
2 changes: 1 addition & 1 deletion kubernetes-ingress/templates/controller-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ spec:
protocol: UDP
{{- end }}
{{- range .Values.controller.service.tcpPorts }}
- name: {{ .name }}-tcp
- name: {{ .name | trunc 15 | trimSuffix "-" }}
containerPort: {{ .targetPort }}
protocol: TCP
{{- end }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ spec:
protocol: UDP
{{- end }}
{{- range .Values.controller.service.tcpPorts }}
- name: {{ .name }}-tcp
- name: {{ .name | trunc 15 | trimSuffix "-" }}
containerPort: {{ .targetPort }}
protocol: TCP
{{- end }}
Expand Down
2 changes: 1 addition & 1 deletion kubernetes-ingress/templates/controller-service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ spec:
{{- end }}
{{- end }}
{{- range .Values.controller.service.tcpPorts }}
- name: {{ .name }}-tcp
- name: {{ .name | trunc 15 | trimSuffix "-" }}
port: {{ .port }}
protocol: TCP
targetPort: {{ .targetPort }}
Expand Down

0 comments on commit a63afa3

Please sign in to comment.