From 0bb2e64f126688e338bb2d8cbcaf7e6c23d127e0 Mon Sep 17 00:00:00 2001 From: Kalilou Diaby Date: Mon, 4 Nov 2019 03:11:40 +0100 Subject: [PATCH] [incubator/haproxy-proxy] Add parameter for controller service targetPort so they can be overwritten (#18468) Signed-off-by: kalilou --- incubator/haproxy-ingress/Chart.yaml | 2 +- incubator/haproxy-ingress/README.md | 4 ++-- incubator/haproxy-ingress/templates/controller-service.yaml | 4 ++-- incubator/haproxy-ingress/values.yaml | 2 ++ 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/incubator/haproxy-ingress/Chart.yaml b/incubator/haproxy-ingress/Chart.yaml index eec7ae61b0..e747e87096 100644 --- a/incubator/haproxy-ingress/Chart.yaml +++ b/incubator/haproxy-ingress/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v1 name: haproxy-ingress -version: 0.0.19 +version: 0.0.20 appVersion: 0.7.2 home: https://github.com/jcmoraisjr/haproxy-ingress description: Ingress controller implementation for haproxy loadbalancer. diff --git a/incubator/haproxy-ingress/README.md b/incubator/haproxy-ingress/README.md index 0fce82a55e..ebd8143ed1 100755 --- a/incubator/haproxy-ingress/README.md +++ b/incubator/haproxy-ingress/README.md @@ -103,8 +103,8 @@ Parameter | Description | Default `controller.service.externalIPs` | list of IP addresses at which the controller services are available | `[]` `controller.service.loadBalancerIP` | IP address to assign to load balancer (if supported) | `""` `controller.service.loadBalancerSourceRanges` | | `[]` -`controller.service.httpPorts` | The http ports to open, that map to the Ingress' port 80. Each entry specifies a `port` and an optional `nodePort`. | `[ port: 80 ]` -`controller.service.httpsPorts` | The https ports to open, that map to the Ingress' port 443. Each entry specifies a `port` and an optional `nodePort`. | `[ port: 443 ]` +`controller.service.httpPorts` | The http ports to open, that map to the Ingress' port 80. Each entry specifies a `port`, `targetPort` and an optional `nodePort`. | `[ port: 80, targetPort: http ]` +`controller.service.httpsPorts` | The https ports to open, that map to the Ingress' port 443. Each entry specifies a `port`, `targetPort` and an optional `nodePort`. | `[ port: 443 , targetPort: https]` `controller.service.type` | type of controller service to create | `LoadBalancer` `controller.stats.enabled` | whether to enable exporting stats | `false` `controller.stats.port` | The port number used haproxy-ingress-controller for haproxy statistics | `1936` diff --git a/incubator/haproxy-ingress/templates/controller-service.yaml b/incubator/haproxy-ingress/templates/controller-service.yaml index ffcd678aac..e8e4dc7920 100644 --- a/incubator/haproxy-ingress/templates/controller-service.yaml +++ b/incubator/haproxy-ingress/templates/controller-service.yaml @@ -43,7 +43,7 @@ spec: - name: "{{ .port }}-http" port: {{ .port }} protocol: TCP - targetPort: http + targetPort: {{ .targetPort }} {{- if (not (empty .nodePort)) }} nodePort: {{ .nodePort }} {{- end }} @@ -52,7 +52,7 @@ spec: - name: "{{ .port }}-https" port: {{ .port }} protocol: TCP - targetPort: https + targetPort: {{ .targetPort }} {{- if (not (empty .nodePort)) }} nodePort: {{ .nodePort }} {{- end }} diff --git a/incubator/haproxy-ingress/values.yaml b/incubator/haproxy-ingress/values.yaml index e128bb6509..2bd9dd8030 100644 --- a/incubator/haproxy-ingress/values.yaml +++ b/incubator/haproxy-ingress/values.yaml @@ -198,9 +198,11 @@ controller: httpPorts: - port: 80 + targetPort: http # nodePort: httpsPorts: - port: 443 + targetPort: https # nodePort: ## Set external traffic policy to: "Local" to preserve source IP on