Ingress: Allow annotations to be dyanmicly driven

This PS allows the ingress rules to be dynamicly driven from the
values.yaml, permitting the ingress cotnroller to ba changed and
custom rules to be applied: eg whitelisting of clients.

Change-Id: Ica6b4692ff9b6b77d1efe6bae212a1227e56ca66
This commit is contained in:
portdirect 2018-01-05 00:29:05 -05:00
parent bd3dd6c83a
commit 5a2f71ebdf
33 changed files with 77 additions and 43 deletions

View File

@ -30,8 +30,7 @@ kind: Ingress
metadata:
name: {{ $ingressName }}
annotations:
kubernetes.io/ingress.class: "nginx"
ingress.kubernetes.io/rewrite-target: /
{{ toJson .Values.network.api.ingress.annotations | indent 4 }}
spec:
rules:
{{ if ne $hostNameNamespaced $hostNameFull }}

View File

@ -134,6 +134,9 @@ network:
api:
ingress:
public: true
annotations:
kubernetes.io/ingress.class: "nginx"
ingress.kubernetes.io/rewrite-target: /
external_policy_local: false
node_port:
enabled: false

View File

@ -30,9 +30,7 @@ kind: Ingress
metadata:
name: {{ $ingressName }}
annotations:
kubernetes.io/ingress.class: "nginx"
ingress.kubernetes.io/rewrite-target: /
ingress.kubernetes.io/proxy-body-size: {{ .Values.network.api.ingress.proxy_body_size }}
{{ toJson .Values.network.api.ingress.annotations | indent 4 }}
spec:
rules:
{{ if ne $hostNameNamespaced $hostNameFull }}

View File

@ -58,6 +58,9 @@ network:
api:
ingress:
public: true
annotations:
kubernetes.io/ingress.class: "nginx"
ingress.kubernetes.io/rewrite-target: /
port: 8777
node_port:
enabled: false

View File

@ -30,8 +30,7 @@ kind: Ingress
metadata:
name: {{ $ingressName }}
annotations:
kubernetes.io/ingress.class: "nginx"
ingress.kubernetes.io/rewrite-target: /
{{ toJson .Values.network.api.ingress.annotations | indent 4 }}
spec:
rules:
{{ if ne $hostNameNamespaced $hostNameFull }}

View File

@ -218,6 +218,9 @@ network:
api:
ingress:
public: true
annotations:
kubernetes.io/ingress.class: "nginx"
ingress.kubernetes.io/rewrite-target: /
external_policy_local: false
node_port:
enabled: false

View File

@ -30,9 +30,7 @@ kind: Ingress
metadata:
name: {{ $ingressName }}
annotations:
kubernetes.io/ingress.class: "nginx"
ingress.kubernetes.io/rewrite-target: /
ingress.kubernetes.io/proxy-body-size: {{ .Values.network.api.ingress.proxy_body_size | quote }}
{{ toJson .Values.network.api.ingress.annotations | indent 4 }}
spec:
rules:
{{ if ne $hostNameNamespaced $hostNameFull }}

View File

@ -24,7 +24,9 @@ network:
api:
ingress:
public: true
proxy_body_size: 1024M
annotations:
kubernetes.io/ingress.class: "nginx"
ingress.kubernetes.io/rewrite-target: /
node_port:
enabled: false
port: 1789

View File

@ -30,9 +30,7 @@ kind: Ingress
metadata:
name: {{ $ingressName }}
annotations:
kubernetes.io/ingress.class: "nginx"
ingress.kubernetes.io/rewrite-target: /
ingress.kubernetes.io/proxy-body-size: {{ .Values.network.api.ingress.proxy_body_size | quote }}
{{ toJson .Values.network.api.ingress.annotations | indent 4 }}
spec:
rules:
{{ if ne $hostNameNamespaced $hostNameFull }}

View File

@ -30,8 +30,7 @@ kind: Ingress
metadata:
name: {{ $ingressName }}
annotations:
kubernetes.io/ingress.class: "nginx"
ingress.kubernetes.io/rewrite-target: /
{{ toJson .Values.network.registry.ingress.annotations | indent 4 }}
spec:
rules:
{{ if ne $hostNameNamespaced $hostNameFull }}

View File

@ -274,7 +274,10 @@ network:
api:
ingress:
public: true
proxy_body_size: 1024M
annotations:
kubernetes.io/ingress.class: "nginx"
ingress.kubernetes.io/rewrite-target: /
ingress.kubernetes.io/proxy-body-size: "1024M"
external_policy_local: false
node_port:
enabled: false
@ -282,6 +285,9 @@ network:
registry:
ingress:
public: true
annotations:
kubernetes.io/ingress.class: "nginx"
ingress.kubernetes.io/rewrite-target: /
external_policy_local: false
node_port:
enabled: false

View File

@ -30,8 +30,7 @@ kind: Ingress
metadata:
name: {{ $ingressName }}
annotations:
kubernetes.io/ingress.class: "nginx"
ingress.kubernetes.io/rewrite-target: /
{{ toJson .Values.network.api.ingress.annotations | indent 4 }}
spec:
rules:
{{ if ne $hostNameNamespaced $hostNameFull }}

View File

@ -27,6 +27,9 @@ network:
api:
ingress:
public: true
annotations:
kubernetes.io/ingress.class: "nginx"
ingress.kubernetes.io/rewrite-target: /
external_policy_local: false
node_port:
enabled: false

View File

@ -30,8 +30,7 @@ kind: Ingress
metadata:
name: {{ $ingressName }}
annotations:
kubernetes.io/ingress.class: "nginx"
ingress.kubernetes.io/rewrite-target: /
{{ toJson .Values.network.api.ingress.annotations | indent 4 }}
spec:
rules:
{{ if ne $hostNameNamespaced $hostNameFull }}

View File

@ -30,8 +30,7 @@ kind: Ingress
metadata:
name: {{ $ingressName }}
annotations:
kubernetes.io/ingress.class: "nginx"
ingress.kubernetes.io/rewrite-target: /
{{ toJson .Values.network.cfn.ingress.annotations | indent 4 }}
spec:
rules:
{{ if ne $hostNameNamespaced $hostNameFull }}

View File

@ -30,8 +30,7 @@ kind: Ingress
metadata:
name: {{ $ingressName }}
annotations:
kubernetes.io/ingress.class: "nginx"
ingress.kubernetes.io/rewrite-target: /
{{ toJson .Values.network.cloudwatch.ingress.annotations | indent 4 }}
spec:
rules:
{{ if ne $hostNameNamespaced $hostNameFull }}

View File

@ -221,6 +221,9 @@ network:
api:
ingress:
public: true
annotations:
kubernetes.io/ingress.class: "nginx"
ingress.kubernetes.io/rewrite-target: /
external_policy_local: false
node_port:
enabled: false
@ -228,12 +231,18 @@ network:
cfn:
ingress:
public: true
annotations:
kubernetes.io/ingress.class: "nginx"
ingress.kubernetes.io/rewrite-target: /
node_port:
enabled: false
port: 30800
cloudwatch:
ingress:
public: true
annotations:
kubernetes.io/ingress.class: "nginx"
ingress.kubernetes.io/rewrite-target: /
node_port:
enabled: false
port: 30003

View File

@ -30,8 +30,7 @@ kind: Ingress
metadata:
name: {{ $ingressName }}
annotations:
kubernetes.io/ingress.class: "nginx"
ingress.kubernetes.io/rewrite-target: /
{{ toJson .Values.network.ingress.annotations | indent 4 }}
spec:
rules:
{{- range $key1, $vHost := tuple $hostName $hostNameNamespaced $hostNameFull }}

View File

@ -36,6 +36,9 @@ network:
port: 80
ingress:
public: true
annotations:
kubernetes.io/ingress.class: "nginx"
ingress.kubernetes.io/rewrite-target: /
external_policy_local: false
node_port:
enabled: false

View File

@ -30,8 +30,7 @@ kind: Ingress
metadata:
name: {{ $ingressName }}
annotations:
kubernetes.io/ingress.class: "nginx"
ingress.kubernetes.io/rewrite-target: /
{{ toJson .Values.network.api.ingress.annotations | indent 4 }}
spec:
rules:
{{ if ne $hostNameNamespaced $hostNameFull }}

View File

@ -53,6 +53,9 @@ network:
port: 80
ingress:
public: true
annotations:
kubernetes.io/ingress.class: "nginx"
ingress.kubernetes.io/rewrite-target: /
external_policy_local: false
node_port:
enabled: false

View File

@ -30,8 +30,7 @@ kind: Ingress
metadata:
name: {{ $ingressName }}
annotations:
kubernetes.io/ingress.class: "nginx"
ingress.kubernetes.io/rewrite-target: /
{{ toJson .Values.network.api.ingress.annotations | indent 4 }}
spec:
rules:
{{ if ne $hostNameNamespaced $hostNameFull }}

View File

@ -115,6 +115,9 @@ network:
api:
ingress:
public: true
annotations:
kubernetes.io/ingress.class: "nginx"
ingress.kubernetes.io/rewrite-target: /
external_policy_local: false
node_port:
enabled: false

View File

@ -30,8 +30,7 @@ kind: Ingress
metadata:
name: {{ $ingressName }}
annotations:
kubernetes.io/ingress.class: "nginx"
ingress.kubernetes.io/rewrite-target: /
{{ toJson .Values.network.api.ingress.annotations | indent 4 }}
spec:
rules:
{{ if ne $hostNameNamespaced $hostNameFull }}

View File

@ -43,6 +43,9 @@ network:
api:
ingress:
public: true
annotations:
kubernetes.io/ingress.class: "nginx"
ingress.kubernetes.io/rewrite-target: /
node_port:
enabled: false
port: 28989

View File

@ -30,8 +30,7 @@ kind: Ingress
metadata:
name: {{ $ingressName }}
annotations:
kubernetes.io/ingress.class: "nginx"
ingress.kubernetes.io/rewrite-target: /
{{ toJson .Values.network.server.ingress.annotations | indent 4 }}
spec:
rules:
{{ if ne $hostNameNamespaced $hostNameFull }}

View File

@ -91,6 +91,9 @@ network:
port: 9696
ingress:
public: true
annotations:
kubernetes.io/ingress.class: "nginx"
ingress.kubernetes.io/rewrite-target: /
external_policy_local: false
node_port:
enabled: false

View File

@ -30,8 +30,7 @@ kind: Ingress
metadata:
name: {{ $ingressName }}
annotations:
kubernetes.io/ingress.class: "nginx"
ingress.kubernetes.io/rewrite-target: /
{{ toJson .Values.network.metadata.ingress.annotations | indent 4 }}
spec:
rules:
{{ if ne $hostNameNamespaced $hostNameFull }}

View File

@ -30,8 +30,7 @@ kind: Ingress
metadata:
name: {{ $ingressName }}
annotations:
kubernetes.io/ingress.class: "nginx"
ingress.kubernetes.io/rewrite-target: /
{{ toJson .Values.network.osapi.ingress.annotations | indent 4 }}
spec:
rules:
{{ if ne $hostNameNamespaced $hostNameFull }}

View File

@ -30,8 +30,7 @@ kind: Ingress
metadata:
name: {{ $ingressName }}
annotations:
kubernetes.io/ingress.class: "nginx"
ingress.kubernetes.io/rewrite-target: /
{{ toJson .Values.network.placement.ingress.annotations | indent 4 }}
spec:
rules:
{{ if ne $hostNameNamespaced $hostNameFull }}

View File

@ -114,6 +114,9 @@ network:
port: 8774
ingress:
public: true
annotations:
kubernetes.io/ingress.class: "nginx"
ingress.kubernetes.io/rewrite-target: /
external_policy_local: false
node_port:
enabled: false
@ -124,6 +127,9 @@ network:
port: 8775
ingress:
public: true
annotations:
kubernetes.io/ingress.class: "nginx"
ingress.kubernetes.io/rewrite-target: /
external_policy_local: false
node_port:
enabled: false
@ -132,6 +138,9 @@ network:
port: 8778
ingress:
public: true
annotations:
kubernetes.io/ingress.class: "nginx"
ingress.kubernetes.io/rewrite-target: /
node_port:
enabled: false
port: 30778

View File

@ -30,8 +30,7 @@ kind: Ingress
metadata:
name: {{ $ingressName }}
annotations:
kubernetes.io/ingress.class: "nginx"
ingress.kubernetes.io/rewrite-target: /
{{ toJson .Values.network.api.ingress.annotations | indent 4 }}
spec:
rules:
{{ if ne $hostNameNamespaced $hostNameFull }}

View File

@ -128,6 +128,9 @@ network:
api:
ingress:
public: true
annotations:
kubernetes.io/ingress.class: "nginx"
ingress.kubernetes.io/rewrite-target: /
node_port:
enabled: false
port: 30778