Skip to content

Commit 32219d9

Browse files
authored
Merge pull request #2 from haproxytech/MMH
New release 0.5.0 including publishService value
2 parents 2c9b6c5 + b84f21f commit 32219d9

File tree

5 files changed

+30
-1
lines changed

5 files changed

+30
-1
lines changed

kubernetes-ingress/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
apiVersion: v1
1616
name: kubernetes-ingress
17-
version: 0.4.2
17+
version: 0.5.0
1818
kubeVersion: ">=1.12.0-0"
1919
description: A Helm chart for HAProxy Kubernetes Ingress Controller
2020
keywords:

kubernetes-ingress/templates/_helpers.tpl

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,3 +90,17 @@ Create a default fully qualified default cert secret name.
9090
{{/*
9191
Expand the name of the chart.
9292
*/}}
93+
94+
{{/*
95+
Construct the path for the publish-service.
96+
97+
By default this will use the <namespace>/<service-name> matching the controller's service name.
98+
99+
Users can provide an override for an explicit service they want to use via `.Values.controller.publishService.pathOverride`
100+
101+
*/}}
102+
{{- define "kubernetes-ingress.publishServicePath" -}}
103+
{{- $defServicePath := printf "%s/%s" .Release.Namespace (include "kubernetes-ingress.fullname" .) -}}
104+
{{- $servicePath := default $defServicePath .Values.controller.publishService.pathOverride }}
105+
{{- print $servicePath | trunc 63 |trimSuffix "-" -}}
106+
{{- end -}}

kubernetes-ingress/templates/controller-daemonset.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,9 @@ spec:
6565
{{- if .Values.controller.ingressClass }}
6666
- --ingress.class={{ .Values.controller.ingressClass }}
6767
{{- end }}
68+
{{- if .Values.controller.publishService.enabled }}
69+
- --publish-service={{ template "kubernetes-ingress.publishServicePath" . }}
70+
{{- end }}
6871
{{- range .Values.controller.extraArgs }}
6972
- {{ . }}
7073
{{- end }}

kubernetes-ingress/templates/controller-deployment.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,9 @@ spec:
5757
{{- if .Values.controller.ingressClass }}
5858
- --ingress.class={{ .Values.controller.ingressClass }}
5959
{{- end }}
60+
{{- if .Values.controller.publishService.enabled }}
61+
- --publish-service={{ template "kubernetes-ingress.publishServicePath" . }}
62+
{{- end }}
6063
{{- range .Values.controller.extraArgs }}
6164
- {{ . }}
6265
{{- end }}

kubernetes-ingress/values.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,15 @@ controller:
112112
# rate-limit-size: "100k"
113113
# syslogServer: "port:514, address:192.168.122.1, facility:local0"
114114

115+
## Mirrors the address of the service's endpoints to the
116+
## load-balancer status of all Ingress objects it satisfies.
117+
publishService:
118+
enabled: false
119+
##
120+
## Override of the publish service
121+
## Must be <namespace>/<service_name>
122+
pathOverride: ""
123+
115124
## Controller Service configuration
116125
## ref: https://kubernetes.io/docs/concepts/services-networking/service/
117126
service:

0 commit comments

Comments
 (0)