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: metadata:
name: {{ $ingressName }} name: {{ $ingressName }}
annotations: annotations:
kubernetes.io/ingress.class: "nginx" {{ toJson .Values.network.api.ingress.annotations | indent 4 }}
ingress.kubernetes.io/rewrite-target: /
spec: spec:
rules: rules:
{{ if ne $hostNameNamespaced $hostNameFull }} {{ if ne $hostNameNamespaced $hostNameFull }}

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -274,7 +274,10 @@ network:
api: api:
ingress: ingress:
public: true 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 external_policy_local: false
node_port: node_port:
enabled: false enabled: false
@ -282,6 +285,9 @@ network:
registry: registry:
ingress: ingress:
public: true public: true
annotations:
kubernetes.io/ingress.class: "nginx"
ingress.kubernetes.io/rewrite-target: /
external_policy_local: false external_policy_local: false
node_port: node_port:
enabled: false enabled: false

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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