From c2b7f2d44074945c629bdd04f6b14cc7c448c9f5 Mon Sep 17 00:00:00 2001 From: Raul Marrero Date: Tue, 14 May 2019 10:23:32 +0100 Subject: [PATCH] Make http/https targetPort configurable in charts --- deployments/helm-chart/Chart.yaml | 2 +- deployments/helm-chart/README.md | 2 ++ deployments/helm-chart/templates/controller-service.yaml | 4 ++-- deployments/helm-chart/values.yaml | 6 ++++++ 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/deployments/helm-chart/Chart.yaml b/deployments/helm-chart/Chart.yaml index 75ef5b7d39..958d3b4d3a 100644 --- a/deployments/helm-chart/Chart.yaml +++ b/deployments/helm-chart/Chart.yaml @@ -1,5 +1,5 @@ name: nginx-ingress -version: 0.8.0 +version: 0.9.0 appVersion: edge description: NGINX Ingress Controller icon: https://raw.githubusercontent.com/nginxinc/kubernetes-ingress/master/deployments/helm-chart/chart-icon.png diff --git a/deployments/helm-chart/README.md b/deployments/helm-chart/README.md index a4cbd6cfd8..76a1b796f2 100644 --- a/deployments/helm-chart/README.md +++ b/deployments/helm-chart/README.md @@ -97,9 +97,11 @@ Parameter | Description | Default `controller.service.httpPort.enable` | Enables the HTTP port for the Ingress controller service. | true `controller.service.httpPort.port` | The HTTP port of the Ingress controller service. | 80 `controller.service.httpPort.nodePort` | The custom NodePort for the HTTP port. Requires `controller.service.type` set to `NodePort`. | "" +`controller.service.httpPort.targetPort` | The target port of the HTTP port of the Ingress controller service. | 80 `controller.service.httpsPort.enable` | Enables the HTTPS port for the Ingress controller service. | true `controller.service.httpsPort.port` | The HTTPS port of the Ingress controller service. | 443 `controller.service.httpsPort.nodePort` | The custom NodePort for the HTTPS port. Requires `controller.service.type` set to `NodePort`. | "" +`controller.service.httpsPort.targetPort` | The target port of the HTTPS port of the Ingress controller service. | 443 `controller.serviceAccount.name` | The name of the service account of the Ingress controller pods. Used for RBAC. | Autogenerated `controller.serviceAccount.imagePullSecrets` | The names of the secrets containing docker registry credentials. | [] `controller.reportIngressStatus.enable` | Update the address field in the status of Ingresses resources with an external address of the Ingress controller. You must also specify the source of the external address either through an external service via `controller.reportIngressStatus.externalService` or the `external-status-address` entry in the ConfigMap via `controller.config.entries`. **Note:** `controller.config.entries.external-status-address` takes precedence if both are set. | true diff --git a/deployments/helm-chart/templates/controller-service.yaml b/deployments/helm-chart/templates/controller-service.yaml index 0afdaf9d0c..c2f874ba7a 100644 --- a/deployments/helm-chart/templates/controller-service.yaml +++ b/deployments/helm-chart/templates/controller-service.yaml @@ -29,7 +29,7 @@ spec: ports: {{- if .Values.controller.service.httpPort.enable }} - port: {{ .Values.controller.service.httpPort.port }} - targetPort: 80 + targetPort: {{ .Values.controller.service.httpPort.targetPort }} protocol: TCP name: http {{- if eq .Values.controller.service.type "NodePort" }} @@ -38,7 +38,7 @@ spec: {{- end }} {{- if .Values.controller.service.httpsPort.enable }} - port: {{ .Values.controller.service.httpsPort.port }} - targetPort: 443 + targetPort: {{ .Values.controller.service.httpsPort.targetPort }} protocol: TCP name: https {{- if eq .Values.controller.service.type "NodePort" }} diff --git a/deployments/helm-chart/values.yaml b/deployments/helm-chart/values.yaml index d4f2cbce5d..d21c3ba34d 100644 --- a/deployments/helm-chart/values.yaml +++ b/deployments/helm-chart/values.yaml @@ -141,6 +141,9 @@ controller: ## The custom NodePort for the HTTP port. Requires controller.service.type set to NodePort. nodePort: "" + ## The HTTP port on the POD where the Ingress controller service is running. + targetPort: 80 + httpsPort: ## Enables the HTTPS port for the Ingress controller service. enable: true @@ -151,6 +154,9 @@ controller: ## The custom NodePort for the HTTPS port. Requires controller.service.type set to NodePort. nodePort: "" + ## The HTTPS port on the POD where the Ingress controller service is running. + targetPort: 443 + serviceAccount: ## The name of the service account of the Ingress controller pods. Used for RBAC. ## Autogenerated if not set or set to "".