-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 7f3b7fc
Showing
70 changed files
with
2,888 additions
and
0 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
apiVersion: v1 | ||
appVersion: 0.26.1 | ||
description: An nginx Ingress controller that uses ConfigMap to store the nginx configuration. | ||
engine: gotpl | ||
home: https://github.com/kubernetes/ingress-nginx | ||
icon: https://upload.wikimedia.org/wikipedia/commons/thumb/c/c5/Nginx_logo.svg/500px-Nginx_logo.svg.png | ||
keywords: | ||
- ingress | ||
- nginx | ||
kubeVersion: '>=1.10.0-0' | ||
maintainers: | ||
- name: ChiefAlexander | ||
- email: Trevor.G.Wood@gmail.com | ||
name: taharah | ||
name: basic-nginx-ingress | ||
sources: | ||
- https://github.com/kubernetes/ingress-nginx | ||
version: 1.26.2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
approvers: | ||
- ChiefAlexander | ||
- taharah | ||
reviewers: | ||
- ChiefAlexander | ||
- taharah |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
controller: | ||
kind: DaemonSet | ||
config: | ||
use-proxy-protocol: "true" |
15 changes: 15 additions & 0 deletions
15
basic-nginx-ingress/ci/daemonset-customnodeport-values.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
controller: | ||
kind: DaemonSet | ||
service: | ||
type: NodePort | ||
nodePorts: | ||
tcp: | ||
9000: 30090 | ||
udp: | ||
9001: 30091 | ||
|
||
tcp: | ||
9000: "default/test:8080" | ||
|
||
udp: | ||
9001: "default/test:8080" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
controller: | ||
kind: DaemonSet | ||
addHeaders: | ||
X-Frame-Options: deny | ||
proxySetHeaders: | ||
X-Forwarded-Proto: https |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
controller: | ||
kind: DaemonSet | ||
service: | ||
type: NodePort |
14 changes: 14 additions & 0 deletions
14
basic-nginx-ingress/ci/daemonset-tcp-udp-configMapNamespace-values.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
controller: | ||
kind: DaemonSet | ||
service: | ||
type: ClusterIP | ||
tcp: | ||
configMapNamespace: default | ||
udp: | ||
configMapNamespace: default | ||
|
||
tcp: | ||
9000: "default/test:8080" | ||
|
||
udp: | ||
9001: "default/test:8080" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
controller: | ||
kind: DaemonSet | ||
service: | ||
type: ClusterIP | ||
|
||
tcp: | ||
9000: "default/test:8080" | ||
|
||
udp: | ||
9001: "default/test:8080" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
controller: | ||
kind: DaemonSet | ||
|
||
tcp: | ||
9000: "default/test:8080" | ||
9001: "default/test:8080" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
controller: | ||
kind: DaemonSet |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
controller: | ||
kind: DaemonSet | ||
metrics: | ||
enabled: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
controller: | ||
kind: DaemonSet | ||
|
||
podSecurityPolicy: | ||
enabled: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
controller: | ||
kind: DaemonSet | ||
admissionWebhooks: | ||
enabled: true | ||
|
||
podSecurityPolicy: | ||
enabled: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
controller: | ||
kind: DaemonSet | ||
admissionWebhooks: | ||
enabled: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
controller: | ||
autoscaling: | ||
enabled: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
controller: | ||
config: | ||
use-proxy-protocol: "true" |
14 changes: 14 additions & 0 deletions
14
basic-nginx-ingress/ci/deployment-customnodeport-values.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
controller: | ||
service: | ||
type: NodePort | ||
nodePorts: | ||
tcp: | ||
9000: 30090 | ||
udp: | ||
9001: 30091 | ||
|
||
tcp: | ||
9000: "default/test:8080" | ||
|
||
udp: | ||
9001: "default/test:8080" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# Left blank to test default values |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
controller: | ||
addHeaders: | ||
X-Frame-Options: deny | ||
proxySetHeaders: | ||
X-Forwarded-Proto: https |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
controller: | ||
metrics: | ||
enabled: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
controller: | ||
service: | ||
type: NodePort |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
podSecurityPolicy: | ||
enabled: true |
13 changes: 13 additions & 0 deletions
13
basic-nginx-ingress/ci/deployment-tcp-udp-configMapNamespace-values.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
controller: | ||
service: | ||
type: ClusterIP | ||
tcp: | ||
configMapNamespace: default | ||
udp: | ||
configMapNamespace: default | ||
|
||
tcp: | ||
9000: "default/test:8080" | ||
|
||
udp: | ||
9001: "default/test:8080" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
controller: | ||
service: | ||
type: ClusterIP | ||
|
||
tcp: | ||
9000: "default/test:8080" | ||
|
||
udp: | ||
9001: "default/test:8080" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
tcp: | ||
9000: "default/test:8080" | ||
9001: "default/test:8080" |
6 changes: 6 additions & 0 deletions
6
basic-nginx-ingress/ci/deployment-webhook-and-psp-values.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
controller: | ||
admissionWebhooks: | ||
enabled: true | ||
|
||
podSecurityPolicy: | ||
enabled: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
controller: | ||
admissionWebhooks: | ||
enabled: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
The nginx-ingress controller has been installed. | ||
|
||
{{- if contains "NodePort" .Values.controller.service.type }} | ||
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 "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 "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 "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 "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 }} | ||
|
||
An example Ingress that makes use of the controller: | ||
|
||
apiVersion: extensions/v1beta1 | ||
kind: Ingress | ||
metadata: | ||
annotations: | ||
kubernetes.io/ingress.class: {{ .Values.controller.ingressClass }} | ||
name: example | ||
namespace: foo | ||
spec: | ||
rules: | ||
- host: www.example.com | ||
http: | ||
paths: | ||
- backend: | ||
serviceName: exampleService | ||
servicePort: 80 | ||
path: / | ||
# This section is only required if TLS is to be enabled for the Ingress | ||
tls: | ||
- hosts: | ||
- www.example.com | ||
secretName: example-tls | ||
|
||
If TLS is enabled for the Ingress, a Secret containing the certificate and key must also be provided: | ||
|
||
apiVersion: v1 | ||
kind: Secret | ||
metadata: | ||
name: example-tls | ||
namespace: foo | ||
data: | ||
tls.crt: <base64 encoded cert> | ||
tls.key: <base64 encoded key> | ||
type: kubernetes.io/tls | ||
|
||
{{- if .Values.controller.headers }} | ||
################################################################################# | ||
###### WARNING: `controller.headers` has been deprecated! ##### | ||
###### It has been renamed to `controller.proxySetHeaders`. ##### | ||
################################################################################# | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,117 @@ | ||
{{/* vim: set filetype=mustache: */}} | ||
{{/* | ||
Expand the name of the chart. | ||
*/}} | ||
{{- define "nginx-ingress.name" -}} | ||
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} | ||
{{- end -}} | ||
|
||
{{/* | ||
Create chart name and version as used by the chart label. | ||
*/}} | ||
{{- define "nginx-ingress.chart" -}} | ||
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | 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 "nginx-ingress.fullname" -}} | ||
{{- if .Values.fullnameOverride -}} | ||
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} | ||
{{- else -}} | ||
{{- $name := default .Chart.Name .Values.nameOverride -}} | ||
{{- if contains $name .Release.Name -}} | ||
{{- .Release.Name | trunc 63 | trimSuffix "-" -}} | ||
{{- else -}} | ||
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} | ||
{{- end -}} | ||
{{- end -}} | ||
{{- end -}} | ||
|
||
{{/* | ||
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 "nginx-ingress.controller.fullname" -}} | ||
{{- printf "%s-%s" (include "nginx-ingress.fullname" .) .Values.controller.name | trunc 63 | trimSuffix "-" -}} | ||
{{- end -}} | ||
|
||
{{/* | ||
Construct the path for the publish-service. | ||
By convention this will simply use the <namespace>/<controller-name> to match the name of the | ||
service generated. | ||
Users can provide an override for an explicit service they want bound via `.Values.controller.publishService.pathOverride` | ||
*/}} | ||
{{- 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 | trimSuffix "-" -}} | ||
{{- end -}} | ||
|
||
{{/* | ||
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 "nginx-ingress.defaultBackend.fullname" -}} | ||
{{- printf "%s-%s" (include "nginx-ingress.fullname" .) .Values.defaultBackend.name | trunc 63 | trimSuffix "-" -}} | ||
{{- end -}} | ||
|
||
{{/* | ||
Create the name of the controller service account to use | ||
*/}} | ||
{{- define "nginx-ingress.serviceAccountName" -}} | ||
{{- if .Values.serviceAccount.create -}} | ||
{{ default (include "nginx-ingress.fullname" .) .Values.serviceAccount.name }} | ||
{{- else -}} | ||
{{ default "default" .Values.serviceAccount.name }} | ||
{{- end -}} | ||
{{- end -}} | ||
|
||
{{/* | ||
Create the name of the backend service account to use - only used when podsecuritypolicy is also enabled | ||
*/}} | ||
{{- define "nginx-ingress.defaultBackend.serviceAccountName" -}} | ||
{{- if .Values.defaultBackend.serviceAccount.create -}} | ||
{{ default (printf "%s-backend" (include "nginx-ingress.fullname" .)) .Values.defaultBackend.serviceAccount.name }} | ||
{{- else -}} | ||
{{ default "default-backend" .Values.defaultBackend.serviceAccount.name }} | ||
{{- end -}} | ||
{{- end -}} | ||
|
||
{{/* | ||
Return the appropriate apiVersion for deployment. | ||
*/}} | ||
{{- define "deployment.apiVersion" -}} | ||
{{- if semverCompare ">=1.9-0" .Capabilities.KubeVersion.GitVersion -}} | ||
{{- print "apps/v1" -}} | ||
{{- else -}} | ||
{{- print "extensions/v1beta1" -}} | ||
{{- end -}} | ||
{{- end -}} | ||
|
||
{{/* | ||
Return the appropriate apiGroup for PodSecurityPolicy. | ||
*/}} | ||
{{- define "podSecurityPolicy.apiGroup" -}} | ||
{{- if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}} | ||
{{- print "policy" -}} | ||
{{- else -}} | ||
{{- print "extensions" -}} | ||
{{- end -}} | ||
{{- end -}} | ||
|
||
{{/* | ||
Return the appropriate apiVersion for podSecurityPolicy. | ||
*/}} | ||
{{- define "podSecurityPolicy.apiVersion" -}} | ||
{{- if semverCompare ">=1.10-0" .Capabilities.KubeVersion.GitVersion -}} | ||
{{- print "policy/v1beta1" -}} | ||
{{- else -}} | ||
{{- print "extensions/v1beta1" -}} | ||
{{- end -}} | ||
{{- end -}} |
Oops, something went wrong.