Skip to content
This repository has been archived by the owner on Feb 22, 2022. It is now read-only.

[stable/nginx-ingress] Add substitution for containerPorts from values #17037

Merged
merged 2 commits into from
Sep 10, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
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 stable/nginx-ingress/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v1
name: nginx-ingress
version: 1.19.1
version: 1.19.2
andrsp marked this conversation as resolved.
Show resolved Hide resolved
appVersion: 0.25.1
home: https://github.com/kubernetes/ingress-nginx
description: An nginx Ingress controller that uses ConfigMap to store the nginx configuration.
Expand Down
17 changes: 7 additions & 10 deletions stable/nginx-ingress/templates/controller-daemonset.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{{- if or (eq .Values.controller.kind "DaemonSet") (eq .Values.controller.kind "Both") }}
{{- $useHostPort := .Values.controller.daemonset.useHostPort -}}
{{- $hostPorts := .Values.controller.daemonset.hostPorts -}}
apiVersion: extensions/v1beta1
kind: DaemonSet
metadata:
Expand Down Expand Up @@ -120,18 +121,14 @@ spec:
successThreshold: {{ .Values.controller.livenessProbe.successThreshold }}
failureThreshold: {{ .Values.controller.livenessProbe.failureThreshold }}
ports:
- name: http
containerPort: {{ .Values.controller.containerPort.http }}
{{- range $key, $value := .Values.controller.containerPort }}
- name: {{ $key }}
containerPort: {{ $value }}
protocol: TCP
{{- if .Values.controller.daemonset.useHostPort }}
hostPort: {{ .Values.controller.daemonset.hostPorts.http }}
{{- end }}
- name: https
containerPort: {{ .Values.controller.containerPort.https }}
protocol: TCP
{{- if .Values.controller.daemonset.useHostPort }}
hostPort: {{ .Values.controller.daemonset.hostPorts.https }}
{{- if $useHostPort }}
hostPort: {{ index $hostPorts $key | default $value }}
{{- end }}
{{- end }}
{{- if .Values.controller.metrics.enabled }}
- name: metrics
containerPort: 10254
Expand Down
9 changes: 4 additions & 5 deletions stable/nginx-ingress/templates/controller-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -120,12 +120,11 @@ spec:
successThreshold: {{ .Values.controller.livenessProbe.successThreshold }}
failureThreshold: {{ .Values.controller.livenessProbe.failureThreshold }}
ports:
- name: http
containerPort: {{ .Values.controller.containerPort.http }}
protocol: TCP
- name: https
containerPort: {{ .Values.controller.containerPort.https }}
{{- range $key, $value := .Values.controller.containerPort }}
- name: {{ $key }}
containerPort: {{ $value }}
protocol: TCP
{{- end }}
{{- if .Values.controller.metrics.enabled }}
- name: metrics
containerPort: 10254
Expand Down
1 change: 1 addition & 0 deletions stable/nginx-ingress/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ controller:
containerPort:
http: 80
https: 443

# Will add custom configuration options to Nginx https://kubernetes.github.io/ingress-nginx/user-guide/nginx-configuration/configmap/
config: {}

Expand Down