Skip to content
This repository was archived by the owner on Feb 22, 2022. It is now read-only.
Closed
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
20 changes: 10 additions & 10 deletions stable/nginx-ingress/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
name: nginx-ingress
version: 0.8.7
version: 0.9.0
appVersion: 0.9.0-beta.14
description: An nginx Ingress controller that uses ConfigMap to store the nginx configuration.
icon: https://upload.wikimedia.org/wikipedia/commons/thumb/c/c5/Nginx_logo.svg/500px-Nginx_logo.svg.png
keywords:
- ingress
- nginx
- ingress
- nginx
sources:
- https://github.com/kubernetes/contrib/tree/master/ingress/controllers/nginx
- https://github.com/kubernetes/contrib/tree/master/ingress/controllers/nginx
maintainers:
- name: jackzampolin
email: [email protected]
- name: mgoodness
email: [email protected]
- name: chancez
email: [email protected]
- name: jackzampolin
email: [email protected]
- name: mgoodness
email: [email protected]
- name: chancez
email: [email protected]
engine: gotpl
8 changes: 4 additions & 4 deletions stable/nginx-ingress/templates/NOTES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,23 @@ Get the application URL by running these commands:
{{- if (not (empty .Values.controller.service.nodePorts.http)) }}
export HTTP_NODE_PORT={{ .Values.controller.service.nodePorts.http }}
{{- else }}
export HTTP_NODE_PORT=$(kubectl --namespace {{ .Release.Namespace }} get services -o jsonpath="{.spec.ports[0].nodePort}" {{ template "controller.fullname" . }})
export HTTP_NODE_PORT=$(kubectl --namespace {{ .Release.Namespace }} get services -o jsonpath="{.spec.ports[0].nodePort}" {{ template "nginx-ingress.controller.fullname" . }})
{{- end }}
{{- if (not (empty .Values.controller.service.nodePorts.https)) }}
export HTTPS_NODE_PORT={{ .Values.controller.service.nodePorts.https }}
{{- else }}
export HTTPS_NODE_PORT=$(kubectl --namespace {{ .Release.Namespace }} get services -o jsonpath="{.spec.ports[1].nodePort}" {{ template "controller.fullname" . }})
export HTTPS_NODE_PORT=$(kubectl --namespace {{ .Release.Namespace }} get services -o jsonpath="{.spec.ports[1].nodePort}" {{ template "nginx-ingress.controller.fullname" . }})
{{- end }}
export NODE_IP=$(kubectl --namespace {{ .Release.Namespace }} get nodes -o jsonpath="{.items[0].status.addresses[1].address}")

echo "Visit http://$NODE_IP:$HTTP_NODE_PORT to access your application via HTTP."
echo "Visit https://$NODE_IP:$HTTPS_NODE_PORT to access your application via HTTPS."
{{- else if contains "LoadBalancer" .Values.controller.service.type }}
It may take a few minutes for the LoadBalancer IP to be available.
You can watch the status by running 'kubectl --namespace {{ .Release.Namespace }} get services -o wide -w {{ template "controller.fullname" . }}'
You can watch the status by running 'kubectl --namespace {{ .Release.Namespace }} get services -o wide -w {{ template "nginx-ingress.controller.fullname" . }}'
{{- else if contains "ClusterIP" .Values.controller.service.type }}
Get the application URL by running these commands:
export POD_NAME=$(kubectl --namespace {{ .Release.Namespace }} get pods -o jsonpath="{.items[0].metadata.name}" -l "app={{ template "name" . }},component={{ .Values.controller.name }},release={{ .Release.Name }}")
export POD_NAME=$(kubectl --namespace {{ .Release.Namespace }} get pods -o jsonpath="{.items[0].metadata.name}" -l "app={{ template "nginx-ingress.name" . }},component={{ .Values.controller.name }},release={{ .Release.Name }}")
kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8080:80
echo "Visit http://127.0.0.1:8080 to access your application."
{{- end }}
Expand Down
12 changes: 6 additions & 6 deletions stable/nginx-ingress/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
{{/*
Expand the name of the chart.
*/}}
{{- define "name" -}}
{{- define "nginx-ingress.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
{{- end -}}

{{/*
Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
*/}}
{{- define "fullname" -}}
{{- define "nginx-ingress.fullname" -}}
{{- $name := default .Chart.Name .Values.nameOverride -}}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
{{- end -}}
Expand All @@ -19,7 +19,7 @@ We truncate at 63 chars because some Kubernetes name fields are limited to this
Create a default fully qualified controller name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
*/}}
{{- define "controller.fullname" -}}
{{- define "nginx-ingress.controller.fullname" -}}
{{- $name := default .Chart.Name .Values.nameOverride -}}
{{- printf "%s-%s-%s" .Release.Name $name .Values.controller.name | trunc 63 | trimSuffix "-" -}}
{{- end -}}
Expand All @@ -33,8 +33,8 @@ service generated.
Users can provide an override for an explicit service they want bound via `.Values.controller.publishService.pathOverride`

*/}}
{{- define "controller.publishServicePath" -}}
{{- $defServiceName := printf "%s/%s" .Release.Namespace (include "controller.fullname" .) -}}
{{- define "nginx-ingress.controller.publishServicePath" -}}
{{- $defServiceName := printf "%s/%s" .Release.Namespace (include "nginx-ingress.controller.fullname" .) -}}
{{- $servicePath := default $defServiceName .Values.controller.publishService.pathOverride }}
{{- print $servicePath | trunc 63 | trimSuffix "-" -}}
{{- end -}}
Expand All @@ -43,7 +43,7 @@ Users can provide an override for an explicit service they want bound via `.Valu
Create a default fully qualified default backend name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
*/}}
{{- define "defaultBackend.fullname" -}}
{{- define "nginx-ingress.defaultBackend.fullname" -}}
{{- $name := default .Chart.Name .Values.nameOverride -}}
{{- printf "%s-%s-%s" .Release.Name $name .Values.defaultBackend.name | trunc 63 | trimSuffix "-" -}}
{{- end -}}
4 changes: 2 additions & 2 deletions stable/nginx-ingress/templates/clusterrole.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRole
metadata:
labels:
app: {{ template "name" . }}
app: {{ template "nginx-ingress.name" . }}
chart: {{ .Chart.Name }}-{{ .Chart.Version }}
heritage: {{ .Release.Service }}
release: {{ .Release.Name }}
name: {{ template "fullname" . }}
name: {{ template "nginx-ingress.fullname" . }}
rules:
- apiGroups:
- ""
Expand Down
8 changes: 4 additions & 4 deletions stable/nginx-ingress/templates/clusterrolebinding.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@ apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRoleBinding
metadata:
labels:
app: {{ template "name" . }}
app: {{ template "nginx-ingress.name" . }}
chart: {{ .Chart.Name }}-{{ .Chart.Version }}
heritage: {{ .Release.Service }}
release: {{ .Release.Name }}
name: {{ template "fullname" . }}
name: {{ template "nginx-ingress.fullname" . }}
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: {{ template "fullname" . }}
name: {{ template "nginx-ingress.fullname" . }}
subjects:
- kind: ServiceAccount
name: {{ template "fullname" . }}
name: {{ template "nginx-ingress.fullname" . }}
namespace: {{ .Release.Namespace }}
{{- end -}}
4 changes: 2 additions & 2 deletions stable/nginx-ingress/templates/controller-configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ apiVersion: v1
kind: ConfigMap
metadata:
labels:
app: {{ template "name" . }}
app: {{ template "nginx-ingress.name" . }}
chart: {{ .Chart.Name }}-{{ .Chart.Version }}
component: "{{ .Values.controller.name }}"
heritage: {{ .Release.Service }}
release: {{ .Release.Name }}
name: {{ template "controller.fullname" . }}
name: {{ template "nginx-ingress.controller.fullname" . }}
data:
enable-vts-status: "{{ .Values.controller.stats.enabled }}"
{{- if .Values.controller.config }}
Expand Down
24 changes: 12 additions & 12 deletions stable/nginx-ingress/templates/controller-daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ apiVersion: extensions/v1beta1
kind: DaemonSet
metadata:
labels:
app: {{ template "name" . }}
app: {{ template "nginx-ingress.name" . }}
chart: {{ .Chart.Name }}-{{ .Chart.Version }}
component: "{{ .Values.controller.name }}"
heritage: {{ .Release.Service }}
release: {{ .Release.Name }}
name: {{ template "controller.fullname" . }}
name: {{ template "nginx-ingress.controller.fullname" . }}
spec:
template:
metadata:
Expand All @@ -18,19 +18,19 @@ spec:
{{ toYaml .Values.controller.podAnnotations | indent 8}}
{{- end }}
labels:
app: {{ template "name" . }}
app: {{ template "nginx-ingress.name" . }}
component: "{{ .Values.controller.name }}"
release: {{ .Release.Name }}
spec:
containers:
- name: {{ template "name" . }}-{{ .Values.controller.name }}
- name: {{ template "nginx-ingress.name" . }}-{{ .Values.controller.name }}
image: "{{ .Values.controller.image.repository }}:{{ .Values.controller.image.tag }}"
imagePullPolicy: "{{ .Values.controller.image.pullPolicy }}"
args:
- /nginx-ingress-controller
- --default-backend-service={{ if .Values.defaultBackend.enabled }}{{ .Release.Namespace }}/{{ template "defaultBackend.fullname" . }}{{ else }}{{ .Values.controller.defaultBackendService }}{{ end }}
- --default-backend-service={{ if .Values.defaultBackend.enabled }}{{ .Release.Namespace }}/{{ template "nginx-ingress.defaultBackend.fullname" . }}{{ else }}{{ .Values.controller.defaultBackendService }}{{ end }}
{{- if and (contains "0.9" .Values.controller.image.tag) .Values.controller.publishService.enabled }}
- --publish-service={{ template "controller.publishServicePath" . }}
- --publish-service={{ template "nginx-ingress.controller.publishServicePath" . }}
{{- end }}
{{- if (contains "0.9" .Values.controller.image.tag) }}
- --election-id={{ .Values.controller.electionID }}
Expand All @@ -39,15 +39,15 @@ spec:
- --ingress-class={{ .Values.controller.ingressClass }}
{{- end }}
{{- if (contains "0.9" .Values.controller.image.tag) }}
- --configmap={{ .Release.Namespace }}/{{ template "controller.fullname" . }}
- --configmap={{ .Release.Namespace }}/{{ template "nginx-ingress.controller.fullname" . }}
{{- else }}
- --nginx-configmap={{ .Release.Namespace }}/{{ template "controller.fullname" . }}
- --nginx-configmap={{ .Release.Namespace }}/{{ template "nginx-ingress.controller.fullname" . }}
{{- end }}
{{- if .Values.tcp }}
- --tcp-services-configmap={{ .Release.Namespace }}/{{ template "fullname" . }}-tcp
- --tcp-services-configmap={{ .Release.Namespace }}/{{ template "nginx-ingress.fullname" . }}-tcp
{{- end }}
{{- if .Values.udp }}
- --udp-services-configmap={{ .Release.Namespace }}/{{ template "fullname" . }}-udp
- --udp-services-configmap={{ .Release.Namespace }}/{{ template "nginx-ingress.fullname" . }}-udp
{{- end }}
{{- if .Values.controller.scope.enabled }}
- --watch-namespace={{ default .Release.Namespace .Values.controller.scope.namespace }}
Expand Down Expand Up @@ -105,7 +105,7 @@ spec:
resources:
{{ toYaml .Values.controller.resources | indent 12 }}
{{- if .Values.controller.stats.enabled }}
- name: {{ template "name" . }}-{{ .Values.statsExporter.name }}
- name: {{ template "nginx-ingress.name" . }}-{{ .Values.statsExporter.name }}
image: "{{ .Values.statsExporter.image.repository }}:{{ .Values.statsExporter.image.tag }}"
imagePullPolicy: "{{ .Values.statsExporter.image.pullPolicy }}"
env:
Expand Down Expand Up @@ -133,6 +133,6 @@ spec:
tolerations:
{{ toYaml .Values.controller.tolerations | indent 8 }}
{{- end }}
serviceAccountName: {{ if .Values.rbac.create }}{{ template "fullname" . }}{{ else }}"{{ .Values.rbac.serviceAccountName }}"{{ end }}
serviceAccountName: {{ if .Values.rbac.create }}{{ template "nginx-ingress.fullname" . }}{{ else }}"{{ .Values.rbac.serviceAccountName }}"{{ end }}
terminationGracePeriodSeconds: 60
{{- end }}
24 changes: 12 additions & 12 deletions stable/nginx-ingress/templates/controller-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ apiVersion: extensions/v1beta1
kind: Deployment
metadata:
labels:
app: {{ template "name" . }}
app: {{ template "nginx-ingress.name" . }}
chart: {{ .Chart.Name }}-{{ .Chart.Version }}
component: "{{ .Values.controller.name }}"
heritage: {{ .Release.Service }}
release: {{ .Release.Name }}
name: {{ template "controller.fullname" . }}
name: {{ template "nginx-ingress.controller.fullname" . }}
spec:
replicas: {{ .Values.controller.replicaCount }}
template:
Expand All @@ -19,19 +19,19 @@ spec:
{{ toYaml .Values.controller.podAnnotations | indent 8}}
{{- end }}
labels:
app: {{ template "name" . }}
app: {{ template "nginx-ingress.name" . }}
component: "{{ .Values.controller.name }}"
release: {{ .Release.Name }}
spec:
containers:
- name: {{ template "name" . }}-{{ .Values.controller.name }}
- name: {{ template "nginx-ingress.name" . }}-{{ .Values.controller.name }}
image: "{{ .Values.controller.image.repository }}:{{ .Values.controller.image.tag }}"
imagePullPolicy: "{{ .Values.controller.image.pullPolicy }}"
args:
- /nginx-ingress-controller
- --default-backend-service={{ if .Values.defaultBackend.enabled }}{{ .Release.Namespace }}/{{ template "defaultBackend.fullname" . }}{{ else }}{{ .Values.controller.defaultBackendService }}{{ end }}
- --default-backend-service={{ if .Values.defaultBackend.enabled }}{{ .Release.Namespace }}/{{ template "nginx-ingress.defaultBackend.fullname" . }}{{ else }}{{ .Values.controller.defaultBackendService }}{{ end }}
{{- if and (contains "0.9" .Values.controller.image.tag) .Values.controller.publishService.enabled }}
- --publish-service={{ template "controller.publishServicePath" . }}
- --publish-service={{ template "nginx-ingress.controller.publishServicePath" . }}
{{- end }}
{{- if (contains "0.9" .Values.controller.image.tag) }}
- --election-id={{ .Values.controller.electionID }}
Expand All @@ -40,15 +40,15 @@ spec:
- --ingress-class={{ .Values.controller.ingressClass }}
{{- end }}
{{- if (contains "0.9" .Values.controller.image.tag) }}
- --configmap={{ .Release.Namespace }}/{{ template "controller.fullname" . }}
- --configmap={{ .Release.Namespace }}/{{ template "nginx-ingress.controller.fullname" . }}
{{- else }}
- --nginx-configmap={{ .Release.Namespace }}/{{ template "controller.fullname" . }}
- --nginx-configmap={{ .Release.Namespace }}/{{ template "nginx-ingress.controller.fullname" . }}
{{- end }}
{{- if .Values.tcp }}
- --tcp-services-configmap={{ .Release.Namespace }}/{{ template "fullname" . }}-tcp
- --tcp-services-configmap={{ .Release.Namespace }}/{{ template "nginx-ingress.fullname" . }}-tcp
{{- end }}
{{- if .Values.udp }}
- --udp-services-configmap={{ .Release.Namespace }}/{{ template "fullname" . }}-udp
- --udp-services-configmap={{ .Release.Namespace }}/{{ template "nginx-ingress.fullname" . }}-udp
{{- end }}
{{- if .Values.controller.scope.enabled }}
- --watch-namespace={{ default .Release.Namespace .Values.controller.scope.namespace }}
Expand Down Expand Up @@ -106,7 +106,7 @@ spec:
resources:
{{ toYaml .Values.controller.resources | indent 12 }}
{{- if .Values.controller.stats.enabled }}
- name: {{ template "name" . }}-{{ .Values.statsExporter.name }}
- name: {{ template "nginx-ingress.name" . }}-{{ .Values.statsExporter.name }}
image: "{{ .Values.statsExporter.image.repository }}:{{ .Values.statsExporter.image.tag }}"
imagePullPolicy: "{{ .Values.statsExporter.image.pullPolicy }}"
env:
Expand Down Expand Up @@ -134,6 +134,6 @@ spec:
tolerations:
{{ toYaml .Values.controller.tolerations | indent 8 }}
{{- end }}
serviceAccountName: {{ if .Values.rbac.create }}{{ template "fullname" . }}{{ else }}"{{ .Values.rbac.serviceAccountName }}"{{ end }}
serviceAccountName: {{ if .Values.rbac.create }}{{ template "nginx-ingress.fullname" . }}{{ else }}"{{ .Values.rbac.serviceAccountName }}"{{ end }}
terminationGracePeriodSeconds: 60
{{- end }}
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ metadata:
{{ toYaml .Values.statsExporter.service.annotations | indent 4 }}
{{- end }}
labels:
app: {{ template "name" . }}
app: {{ template "nginx-ingress.name" . }}
chart: {{ .Chart.Name }}-{{ .Chart.Version }}
component: "{{ .Values.controller.name }}"
heritage: {{ .Release.Service }}
release: {{ .Release.Name }}
name: {{ template "controller.fullname" . }}-metrics
name: {{ template "nginx-ingress.controller.fullname" . }}-metrics
spec:
clusterIP: "{{ .Values.statsExporter.service.clusterIP }}"
{{- if .Values.statsExporter.service.externalIPs }}
Expand All @@ -31,7 +31,7 @@ spec:
port: {{ .Values.statsExporter.service.servicePort }}
targetPort: 9913
selector:
app: {{ template "name" . }}
app: {{ template "nginx-ingress.name" . }}
component: "{{ .Values.controller.name }}"
release: {{ .Release.Name }}
type: "{{ .Values.statsExporter.service.type }}"
Expand Down
6 changes: 3 additions & 3 deletions stable/nginx-ingress/templates/controller-service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ metadata:
{{ toYaml .Values.controller.service.annotations | indent 4 }}
{{- end }}
labels:
app: {{ template "name" . }}
app: {{ template "nginx-ingress.name" . }}
chart: {{ .Chart.Name }}-{{ .Chart.Version }}
component: "{{ .Values.controller.name }}"
heritage: {{ .Release.Service }}
release: {{ .Release.Name }}
name: {{ template "controller.fullname" . }}
name: {{ template "nginx-ingress.controller.fullname" . }}
spec:
clusterIP: "{{ .Values.controller.service.clusterIP }}"
{{- if .Values.controller.service.externalIPs }}
Expand Down Expand Up @@ -59,7 +59,7 @@ spec:
targetPort: {{ $key }}
{{- end }}
selector:
app: {{ template "name" . }}
app: {{ template "nginx-ingress.name" . }}
component: "{{ .Values.controller.name }}"
release: {{ .Release.Name }}
type: "{{ .Values.controller.service.type }}"
6 changes: 3 additions & 3 deletions stable/nginx-ingress/templates/controller-stats-service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ metadata:
{{ toYaml .Values.controller.stats.service.annotations | indent 4 }}
{{- end }}
labels:
app: {{ template "name" . }}
app: {{ template "nginx-ingress.name" . }}
chart: {{ .Chart.Name }}-{{ .Chart.Version }}
component: "{{ .Values.controller.name }}"
heritage: {{ .Release.Service }}
release: {{ .Release.Name }}
name: {{ template "controller.fullname" . }}-stats
name: {{ template "nginx-ingress.controller.fullname" . }}-stats
spec:
clusterIP: "{{ .Values.controller.stats.service.clusterIP }}"
{{- if .Values.controller.stats.service.externalIPs }}
Expand All @@ -31,7 +31,7 @@ spec:
port: {{ .Values.controller.stats.service.servicePort }}
targetPort: 18080
selector:
app: {{ template "name" . }}
app: {{ template "nginx-ingress.name" . }}
component: "{{ .Values.controller.name }}"
release: {{ .Release.Name }}
type: "{{ .Values.controller.stats.service.type }}"
Expand Down
Loading