Add option to set external policy to local for openstack services

External traffic policy "local" would be preffered when openstack
service is accessed from external via node port. This option has an
effect only when service node port is enabled.

Change-Id: Ic68cfc59dc39dc842d4790deffa70efe433dd7a6
This commit is contained in:
Hyunsun Moon 2017-11-02 14:37:09 +09:00
parent 5df00a4d78
commit 0808cf5198
22 changed files with 55 additions and 6 deletions

View File

@ -32,5 +32,8 @@ spec:
{{ tuple $envAll "barbican" "api" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 4 }} {{ tuple $envAll "barbican" "api" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 4 }}
{{ if .Values.network.api.node_port.enabled }} {{ if .Values.network.api.node_port.enabled }}
type: NodePort type: NodePort
{{ if .Values.network.api.external_policy_local }}
externalTrafficPolicy: Local
{{ end }}
{{ end }} {{ end }}
{{- end }} {{- end }}

View File

@ -134,6 +134,7 @@ network:
api: api:
ingress: ingress:
public: true public: true
external_policy_local: false
node_port: node_port:
enabled: false enabled: false
port: 39486 port: 39486

View File

@ -32,5 +32,8 @@ spec:
{{ tuple $envAll "cinder" "api" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 4 }} {{ tuple $envAll "cinder" "api" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 4 }}
{{ if .Values.network.api.node_port.enabled }} {{ if .Values.network.api.node_port.enabled }}
type: NodePort type: NodePort
{{ if .Values.network.api.external_policy_local }}
externalTrafficPolicy: Local
{{ end }}
{{ end }} {{ end }}
{{- end }} {{- end }}

View File

@ -195,6 +195,7 @@ network:
api: api:
ingress: ingress:
public: true public: true
external_policy_local: false
node_port: node_port:
enabled: false enabled: false
port: 30877 port: 30877

View File

@ -32,5 +32,8 @@ spec:
{{ tuple $envAll "glance" "api" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 4 }} {{ tuple $envAll "glance" "api" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 4 }}
{{ if .Values.network.api.node_port.enabled }} {{ if .Values.network.api.node_port.enabled }}
type: NodePort type: NodePort
{{ if .Values.network.api.external_policy_local }}
externalTrafficPolicy: Local
{{ end }}
{{ end }} {{ end }}
{{- end }} {{- end }}

View File

@ -32,5 +32,8 @@ spec:
{{ tuple $envAll "glance" "registry" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 4 }} {{ tuple $envAll "glance" "registry" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 4 }}
{{ if .Values.network.registry.node_port.enabled }} {{ if .Values.network.registry.node_port.enabled }}
type: NodePort type: NodePort
{{ if .Values.network.registry.external_policy_local }}
externalTrafficPolicy: Local
{{ end }}
{{ end }} {{ end }}
{{- end }} {{- end }}

View File

@ -275,12 +275,14 @@ network:
ingress: ingress:
public: true public: true
proxy_body_size: 1024M proxy_body_size: 1024M
external_policy_local: false
node_port: node_port:
enabled: false enabled: false
port: 30092 port: 30092
registry: registry:
ingress: ingress:
public: true public: true
external_policy_local: false
node_port: node_port:
enabled: false enabled: false
port: 30091 port: 30091

View File

@ -32,5 +32,8 @@ spec:
{{ tuple $envAll "gnocchi" "api" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 4 }} {{ tuple $envAll "gnocchi" "api" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 4 }}
{{ if .Values.network.api.node_port.enabled }} {{ if .Values.network.api.node_port.enabled }}
type: NodePort type: NodePort
{{ if .Values.network.api.external_policy_local }}
externalTrafficPolicy: Local
{{ end }}
{{ end }} {{ end }}
{{- end }} {{- end }}

View File

@ -27,6 +27,7 @@ network:
api: api:
ingress: ingress:
public: true public: true
external_policy_local: false
node_port: node_port:
enabled: false enabled: false
port: 8041 port: 8041

View File

@ -32,5 +32,8 @@ spec:
{{ tuple $envAll "heat" "api" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 4 }} {{ tuple $envAll "heat" "api" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 4 }}
{{ if .Values.network.api.node_port.enabled }} {{ if .Values.network.api.node_port.enabled }}
type: NodePort type: NodePort
{{ if .Values.network.api.external_policy_local }}
externalTrafficPolicy: Local
{{ end }}
{{ end }} {{ end }}
{{- end }} {{- end }}

View File

@ -221,6 +221,7 @@ network:
api: api:
ingress: ingress:
public: true public: true
external_policy_local: false
node_port: node_port:
enabled: false enabled: false
port: 30004 port: 30004

View File

@ -23,9 +23,9 @@ metadata:
name: {{ tuple "dashboard" "internal" . | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }} name: {{ tuple "dashboard" "internal" . | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }}
spec: spec:
ports: ports:
{{ if .Values.network.enable_node_port }} {{ if .Values.network.node_port.enabled }}
- name: http - name: http
nodePort: {{ .Values.network.node_port }} nodePort: {{ .Values.network.node_port.port }}
port: {{ .Values.network.port }} port: {{ .Values.network.port }}
protocol: TCP protocol: TCP
targetPort: {{ .Values.network.port }} targetPort: {{ .Values.network.port }}
@ -37,7 +37,10 @@ spec:
{{ end }} {{ end }}
selector: selector:
{{ tuple $envAll "horizon" "server" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 4 }} {{ tuple $envAll "horizon" "server" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 4 }}
{{ if .Values.network.enable_node_port }} {{ if .Values.network.node_port.enabled }}
type: NodePort type: NodePort
{{ if .Values.network.external_policy_local }}
externalTrafficPolicy: Local
{{ end }}
{{ end }} {{ end }}
{{- end }} {{- end }}

View File

@ -33,11 +33,13 @@ labels:
node_selector_value: enabled node_selector_value: enabled
network: network:
port: 80
ingress: ingress:
public: true public: true
port: 80 external_policy_local: false
node_port: 31000 node_port:
enable_node_port: false enabled: false
port: 31000
# Use "True" and "False" as Titlecase strings with quotes, boolean # Use "True" and "False" as Titlecase strings with quotes, boolean
# values will not work # values will not work

View File

@ -37,5 +37,8 @@ spec:
{{ tuple $envAll "keystone" "api" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 4 }} {{ tuple $envAll "keystone" "api" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 4 }}
{{ if or (.Values.network.api.node_port.enabled) (.Values.network.admin.node_port.enabled) }} {{ if or (.Values.network.api.node_port.enabled) (.Values.network.admin.node_port.enabled) }}
type: NodePort type: NodePort
{{ if .Values.network.api.external_policy_local }}
externalTrafficPolicy: Local
{{ end }}
{{ end }} {{ end }}
{{- end }} {{- end }}

View File

@ -53,6 +53,7 @@ network:
port: 80 port: 80
ingress: ingress:
public: true public: true
external_policy_local: false
node_port: node_port:
enabled: false enabled: false
port: 30500 port: 30500

View File

@ -32,5 +32,8 @@ spec:
{{ tuple $envAll "magnum" "api" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 4 }} {{ tuple $envAll "magnum" "api" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 4 }}
{{ if .Values.network.api.node_port.enabled }} {{ if .Values.network.api.node_port.enabled }}
type: NodePort type: NodePort
{{ if .Values.network.api.external_policy_local }}
externalTrafficPolicy: Local
{{ end }}
{{ end }} {{ end }}
{{- end }} {{- end }}

View File

@ -115,6 +115,7 @@ network:
api: api:
ingress: ingress:
public: true public: true
external_policy_local: false
node_port: node_port:
enabled: false enabled: false
port: 30511 port: 30511

View File

@ -32,5 +32,8 @@ spec:
{{ tuple $envAll "neutron" "server" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 4 }} {{ tuple $envAll "neutron" "server" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 4 }}
{{ if .Values.network.server.node_port.enabled }} {{ if .Values.network.server.node_port.enabled }}
type: NodePort type: NodePort
{{ if .Values.network.server.external_policy_local }}
externalTrafficPolicy: Local
{{ end }}
{{ end }} {{ end }}
{{- end }} {{- end }}

View File

@ -91,6 +91,7 @@ network:
port: 9696 port: 9696
ingress: ingress:
public: true public: true
external_policy_local: false
node_port: node_port:
enabled: false enabled: false
port: 30096 port: 30096

View File

@ -32,5 +32,8 @@ spec:
{{ tuple $envAll "nova" "metadata" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 4 }} {{ tuple $envAll "nova" "metadata" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 4 }}
{{ if .Values.network.metadata.node_port.enabled }} {{ if .Values.network.metadata.node_port.enabled }}
type: NodePort type: NodePort
{{ if .Values.network.metadata.external_policy_local }}
externalTrafficPolicy: Local
{{ end }}
{{ end }} {{ end }}
{{- end }} {{- end }}

View File

@ -32,5 +32,8 @@ spec:
{{ tuple $envAll "nova" "os-api" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 4 }} {{ tuple $envAll "nova" "os-api" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 4 }}
{{ if .Values.network.osapi.node_port.enabled }} {{ if .Values.network.osapi.node_port.enabled }}
type: NodePort type: NodePort
{{ if .Values.network.osapi.external_policy_local }}
externalTrafficPolicy: Local
{{ end }}
{{ end }} {{ end }}
{{- end }} {{- end }}

View File

@ -109,6 +109,7 @@ network:
port: 8774 port: 8774
ingress: ingress:
public: true public: true
external_policy_local: false
node_port: node_port:
enabled: false enabled: false
port: 30774 port: 30774
@ -118,6 +119,7 @@ network:
port: 8775 port: 8775
ingress: ingress:
public: true public: true
external_policy_local: false
node_port: node_port:
enabled: false enabled: false
port: 30775 port: 30775