Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion charts/helm_lib/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
apiVersion: v2
type: library
name: deckhouse_lib_helm
version: 1.69.1
version: 1.69.2
description: "Helm utils template definitions for Deckhouse modules."
12 changes: 12 additions & 0 deletions charts/helm_lib/templates/_module_controller.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,11 @@ spec:
- fullname: name of the service (default: "webhooks")
- selectorApp: app label for selector (default: "controller")
- targetPort: target port name or number (default: "https")
- additionalPorts: list of additional ports (optional), each port is a dict with:
- name: port name (required)
- port: service port (required)
- targetPort: target port name or number (required)
- protocol: protocol (default: "TCP")
*/ -}}
{{- define "helm_lib_module_webhook_service" }}
{{- $context := index . 0 }}
Expand All @@ -323,6 +328,7 @@ spec:
{{- $fullname := $config.fullname | default "webhooks" }}
{{- $selectorApp := $config.selectorApp | default "controller" }}
{{- $targetPort := $config.targetPort | default "https" }}
{{- $additionalPorts := $config.additionalPorts }}
---
apiVersion: v1
kind: Service
Expand All @@ -337,6 +343,12 @@ spec:
targetPort: {{ $targetPort }}
protocol: TCP
name: https
{{- range $additionalPorts }}
- name: {{ .name }}
port: {{ .port }}
targetPort: {{ .targetPort }}
protocol: {{ .protocol | default "TCP" }}
{{- end }}
selector:
app: {{ $selectorApp }}
{{- end }}
Expand Down