diff --git a/barbican/templates/ingress-api.yaml b/barbican/templates/ingress-api.yaml index a79f89681f..d99397d36f 100644 --- a/barbican/templates/ingress-api.yaml +++ b/barbican/templates/ingress-api.yaml @@ -17,29 +17,43 @@ limitations under the License. {{- if .Values.manifests.ingress_api }} {{- $envAll := . }} {{- if .Values.network.api.ingress.public }} +{{- $backendServiceType := "key-manager" }} +{{- $backendPort := "b-api" }} +{{- $ingressName := tuple $backendServiceType "public" $envAll | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }} +{{- $backendName := tuple $backendServiceType "internal" $envAll | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }} +{{- $hostName := tuple $backendServiceType "public" $envAll | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }} +{{- $hostNameNamespaced := tuple $backendServiceType "public" $envAll | include "helm-toolkit.endpoints.hostname_namespaced_endpoint_lookup" }} +{{- $hostNameFull := tuple $backendServiceType "public" $envAll | include "helm-toolkit.endpoints.hostname_fqdn_endpoint_lookup" }} --- apiVersion: extensions/v1beta1 kind: Ingress metadata: - name: {{ tuple "key-manager" "public" . | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }} + name: {{ $ingressName }} annotations: kubernetes.io/ingress.class: "nginx" ingress.kubernetes.io/rewrite-target: / spec: rules: - - host: {{ tuple "key-manager" "public" . | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }} +{{ if ne $hostNameNamespaced $hostNameFull }} +{{- range $key1, $vHost := tuple $hostName $hostNameNamespaced $hostNameFull }} + - host: {{ $vHost }} http: paths: - path: / backend: - serviceName: {{ tuple "key-manager" "internal" . | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }} - servicePort: b-api - - host: {{ tuple "key-manager" "public" . | include "helm-toolkit.endpoints.hostname_fqdn_endpoint_lookup" }} + serviceName: {{ $backendName }} + servicePort: {{ $backendPort }} +{{- end }} +{{- else }} +{{- range $key1, $vHost := tuple $hostName $hostNameNamespaced }} + - host: {{ $vHost }} http: paths: - path: / backend: - serviceName: {{ tuple "key-manager" "internal" . | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }} - servicePort: b-api + serviceName: {{ $backendName }} + servicePort: {{ $backendPort }} +{{- end }} +{{- end }} {{- end }} {{- end }} diff --git a/barbican/values.yaml b/barbican/values.yaml index 60334ee901..ae4cfa018c 100644 --- a/barbican/values.yaml +++ b/barbican/values.yaml @@ -304,6 +304,7 @@ secrets: user: barbican-db-user endpoints: + cluster_domain_suffix: cluster.local identity: name: keystone auth: @@ -325,6 +326,8 @@ endpoints: hosts: default: keystone-api public: keystone + host_fqdn_overide: + default: null path: default: /v3 scheme: @@ -339,6 +342,8 @@ endpoints: hosts: default: barbican-api public: barbican + host_fqdn_overide: + default: null path: default: /v1 scheme: @@ -357,6 +362,8 @@ endpoints: password: password hosts: default: mariadb + host_fqdn_overide: + default: null path: /barbican scheme: mysql+pymysql port: @@ -372,6 +379,8 @@ endpoints: password: password hosts: default: rabbitmq + host_fqdn_overide: + default: null path: / scheme: rabbit port: @@ -380,6 +389,8 @@ endpoints: oslo_cache: hosts: default: memcached + host_fqdn_overide: + default: null port: memcache: default: 11211 diff --git a/ceph/values.yaml b/ceph/values.yaml index 0154b47b4d..ea8432d3a4 100644 --- a/ceph/values.yaml +++ b/ceph/values.yaml @@ -274,9 +274,12 @@ storageclass: user_secret_name: pvc-ceph-client-key endpoints: + cluster_domain_suffix: cluster.local ceph_mon: hosts: default: ceph-mon + host_fqdn_overide: + default: null port: mon: default: 6789 diff --git a/cinder/templates/ingress-api.yaml b/cinder/templates/ingress-api.yaml index 49aa06c332..a96804fed5 100644 --- a/cinder/templates/ingress-api.yaml +++ b/cinder/templates/ingress-api.yaml @@ -17,29 +17,43 @@ limitations under the License. {{- if .Values.manifests.ingress_api }} {{- $envAll := . }} {{- if .Values.network.api.ingress.public }} +{{- $backendServiceType := "volume" }} +{{- $backendPort := "c-api" }} +{{- $ingressName := tuple $backendServiceType "public" $envAll | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }} +{{- $backendName := tuple $backendServiceType "internal" $envAll | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }} +{{- $hostName := tuple $backendServiceType "public" $envAll | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }} +{{- $hostNameNamespaced := tuple $backendServiceType "public" $envAll | include "helm-toolkit.endpoints.hostname_namespaced_endpoint_lookup" }} +{{- $hostNameFull := tuple $backendServiceType "public" $envAll | include "helm-toolkit.endpoints.hostname_fqdn_endpoint_lookup" }} --- apiVersion: extensions/v1beta1 kind: Ingress metadata: - name: {{ tuple "volume" "public" . | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }} + name: {{ $ingressName }} annotations: kubernetes.io/ingress.class: "nginx" ingress.kubernetes.io/rewrite-target: / spec: rules: - - host: {{ tuple "volume" "public" . | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }} +{{ if ne $hostNameNamespaced $hostNameFull }} +{{- range $key1, $vHost := tuple $hostName $hostNameNamespaced $hostNameFull }} + - host: {{ $vHost }} http: paths: - path: / backend: - serviceName: {{ tuple "volume" "internal" . | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }} - servicePort: c-api - - host: {{ tuple "volume" "public" . | include "helm-toolkit.endpoints.hostname_fqdn_endpoint_lookup" }} + serviceName: {{ $backendName }} + servicePort: {{ $backendPort }} +{{- end }} +{{- else }} +{{- range $key1, $vHost := tuple $hostName $hostNameNamespaced }} + - host: {{ $vHost }} http: paths: - path: / backend: - serviceName: {{ tuple "volume" "internal" . | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }} - servicePort: c-api + serviceName: {{ $backendName }} + servicePort: {{ $backendPort }} +{{- end }} +{{- end }} {{- end }} {{- end }} diff --git a/cinder/values.yaml b/cinder/values.yaml index f1c78849c8..68f76d0950 100644 --- a/cinder/values.yaml +++ b/cinder/values.yaml @@ -455,6 +455,7 @@ secrets: # this swaps the service name and type, and should be rolled out to other # services. endpoints: + cluster_domain_suffix: cluster.local identity: name: keystone auth: @@ -476,6 +477,8 @@ endpoints: hosts: default: keystone-api public: keystone + host_fqdn_overide: + default: null path: default: /v3 scheme: @@ -490,6 +493,8 @@ endpoints: hosts: default: glance-api public: glance + host_fqdn_overide: + default: null path: default: null scheme: @@ -503,6 +508,8 @@ endpoints: hosts: default: glance-registry public: glance-reg + host_fqdn_overide: + default: null path: default: null scheme: @@ -516,6 +523,8 @@ endpoints: hosts: default: cinder-api public: cinder + host_fqdn_overide: + default: null path: default: '/v1/%(tenant_id)s' scheme: @@ -529,6 +538,8 @@ endpoints: hosts: default: cinder-api public: cinder + host_fqdn_overide: + default: null path: default: '/v2/%(tenant_id)s' scheme: @@ -542,6 +553,8 @@ endpoints: hosts: default: cinder-api public: cinder + host_fqdn_overide: + default: null path: default: '/v3/%(tenant_id)s' scheme: @@ -560,6 +573,8 @@ endpoints: password: password hosts: default: mariadb + host_fqdn_overide: + default: null path: /cinder scheme: mysql+pymysql port: @@ -575,6 +590,8 @@ endpoints: password: password hosts: default: rabbitmq + host_fqdn_overide: + default: null path: / scheme: rabbit port: @@ -583,6 +600,8 @@ endpoints: oslo_cache: hosts: default: memcached + host_fqdn_overide: + default: null port: memcache: default: 11211 diff --git a/glance/templates/ingress-api.yaml b/glance/templates/ingress-api.yaml index 2983240e20..f16b46e102 100644 --- a/glance/templates/ingress-api.yaml +++ b/glance/templates/ingress-api.yaml @@ -17,30 +17,44 @@ limitations under the License. {{- if .Values.manifests.ingress_api }} {{- $envAll := . }} {{- if .Values.network.api.ingress.public }} +{{- $backendServiceType := "image" }} +{{- $backendPort := "g-api" }} +{{- $ingressName := tuple $backendServiceType "public" $envAll | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }} +{{- $backendName := tuple $backendServiceType "internal" $envAll | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }} +{{- $hostName := tuple $backendServiceType "public" $envAll | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }} +{{- $hostNameNamespaced := tuple $backendServiceType "public" $envAll | include "helm-toolkit.endpoints.hostname_namespaced_endpoint_lookup" }} +{{- $hostNameFull := tuple $backendServiceType "public" $envAll | include "helm-toolkit.endpoints.hostname_fqdn_endpoint_lookup" }} --- apiVersion: extensions/v1beta1 kind: Ingress metadata: - name: {{ tuple "image" "public" . | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }} + 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 }} spec: rules: - - host: {{ tuple "image" "public" . | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }} +{{ if ne $hostNameNamespaced $hostNameFull }} +{{- range $key1, $vHost := tuple $hostName $hostNameNamespaced $hostNameFull }} + - host: {{ $vHost }} http: paths: - path: / backend: - serviceName: {{ tuple "image" "internal" . | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }} - servicePort: g-api - - host: {{ tuple "image" "public" . | include "helm-toolkit.endpoints.hostname_fqdn_endpoint_lookup" }} + serviceName: {{ $backendName }} + servicePort: {{ $backendPort }} +{{- end }} +{{- else }} +{{- range $key1, $vHost := tuple $hostName $hostNameNamespaced }} + - host: {{ $vHost }} http: paths: - path: / backend: - serviceName: {{ tuple "image" "internal" . | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }} - servicePort: g-api + serviceName: {{ $backendName }} + servicePort: {{ $backendPort }} +{{- end }} +{{- end }} {{- end }} {{- end }} diff --git a/glance/templates/ingress-registry.yaml b/glance/templates/ingress-registry.yaml index e2edd39d49..825dc262d2 100644 --- a/glance/templates/ingress-registry.yaml +++ b/glance/templates/ingress-registry.yaml @@ -17,29 +17,43 @@ limitations under the License. {{- if .Values.manifests.ingress_registry }} {{- $envAll := . }} {{- if .Values.network.registry.ingress.public }} +{{- $backendServiceType := "image_registry" }} +{{- $backendPort := "g-reg" }} +{{- $ingressName := tuple $backendServiceType "public" $envAll | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }} +{{- $backendName := tuple $backendServiceType "internal" $envAll | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }} +{{- $hostName := tuple $backendServiceType "public" $envAll | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }} +{{- $hostNameNamespaced := tuple $backendServiceType "public" $envAll | include "helm-toolkit.endpoints.hostname_namespaced_endpoint_lookup" }} +{{- $hostNameFull := tuple $backendServiceType "public" $envAll | include "helm-toolkit.endpoints.hostname_fqdn_endpoint_lookup" }} --- apiVersion: extensions/v1beta1 kind: Ingress metadata: - name: {{ tuple "image_registry" "public" . | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }} + name: {{ $ingressName }} annotations: kubernetes.io/ingress.class: "nginx" ingress.kubernetes.io/rewrite-target: / spec: rules: - - host: {{ tuple "image_registry" "public" . | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }} +{{ if ne $hostNameNamespaced $hostNameFull }} +{{- range $key1, $vHost := tuple $hostName $hostNameNamespaced $hostNameFull }} + - host: {{ $vHost }} http: paths: - path: / backend: - serviceName: {{ tuple "image_registry" "internal" . | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }} - servicePort: g-reg - - host: {{ tuple "image_registry" "public" . | include "helm-toolkit.endpoints.hostname_fqdn_endpoint_lookup" }} + serviceName: {{ $backendName }} + servicePort: {{ $backendPort }} +{{- end }} +{{- else }} +{{- range $key1, $vHost := tuple $hostName $hostNameNamespaced }} + - host: {{ $vHost }} http: paths: - path: / backend: - serviceName: {{ tuple "image_registry" "internal" . | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }} - servicePort: g-reg + serviceName: {{ $backendName }} + servicePort: {{ $backendPort }} +{{- end }} +{{- end }} {{- end }} {{- end }} diff --git a/glance/values.yaml b/glance/values.yaml index e51eb23be8..93f49a5215 100644 --- a/glance/values.yaml +++ b/glance/values.yaml @@ -269,6 +269,7 @@ secrets: # values, but should include all endpoints # required by this chart endpoints: + cluster_domain_suffix: cluster.local identity: name: keystone auth: @@ -290,6 +291,8 @@ endpoints: hosts: default: keystone-api public: keystone + host_fqdn_overide: + default: null path: default: /v3 scheme: @@ -304,6 +307,8 @@ endpoints: hosts: default: glance-api public: glance + host_fqdn_overide: + default: null path: default: null scheme: @@ -317,6 +322,8 @@ endpoints: hosts: default: glance-registry public: glance-reg + host_fqdn_overide: + default: null path: default: null scheme: @@ -335,6 +342,8 @@ endpoints: password: password hosts: default: mariadb + host_fqdn_overide: + default: null path: /glance scheme: mysql+pymysql port: @@ -343,6 +352,8 @@ endpoints: oslo_cache: hosts: default: memcached + host_fqdn_overide: + default: null port: memcache: default: 11211 @@ -356,6 +367,8 @@ endpoints: password: password hosts: default: rabbitmq + host_fqdn_overide: + default: null path: / scheme: rabbit port: diff --git a/heat/templates/ingress-api.yaml b/heat/templates/ingress-api.yaml index 375a5619f3..1b1bf6389a 100644 --- a/heat/templates/ingress-api.yaml +++ b/heat/templates/ingress-api.yaml @@ -17,29 +17,43 @@ limitations under the License. {{- if .Values.manifests.ingress_api }} {{- $envAll := . }} {{- if .Values.network.api.ingress.public }} +{{- $backendServiceType := "orchestration" }} +{{- $backendPort := "h-api" }} +{{- $ingressName := tuple $backendServiceType "public" $envAll | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }} +{{- $backendName := tuple $backendServiceType "internal" $envAll | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }} +{{- $hostName := tuple $backendServiceType "public" $envAll | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }} +{{- $hostNameNamespaced := tuple $backendServiceType "public" $envAll | include "helm-toolkit.endpoints.hostname_namespaced_endpoint_lookup" }} +{{- $hostNameFull := tuple $backendServiceType "public" $envAll | include "helm-toolkit.endpoints.hostname_fqdn_endpoint_lookup" }} --- apiVersion: extensions/v1beta1 kind: Ingress metadata: - name: {{ tuple "orchestration" "public" . | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }} + name: {{ $ingressName }} annotations: kubernetes.io/ingress.class: "nginx" ingress.kubernetes.io/rewrite-target: / spec: rules: - - host: {{ tuple "orchestration" "public" . | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }} +{{ if ne $hostNameNamespaced $hostNameFull }} +{{- range $key1, $vHost := tuple $hostName $hostNameNamespaced $hostNameFull }} + - host: {{ $vHost }} http: paths: - path: / backend: - serviceName: {{ tuple "orchestration" "internal" . | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }} - servicePort: h-api - - host: {{ tuple "orchestration" "public" . | include "helm-toolkit.endpoints.hostname_fqdn_endpoint_lookup" }} + serviceName: {{ $backendName }} + servicePort: {{ $backendPort }} +{{- end }} +{{- else }} +{{- range $key1, $vHost := tuple $hostName $hostNameNamespaced }} + - host: {{ $vHost }} http: paths: - path: / backend: - serviceName: {{ tuple "orchestration" "internal" . | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }} - servicePort: h-api + serviceName: {{ $backendName }} + servicePort: {{ $backendPort }} +{{- end }} +{{- end }} {{- end }} {{- end }} diff --git a/heat/templates/ingress-cfn.yaml b/heat/templates/ingress-cfn.yaml index 2b80f3fd0d..6b7089e082 100644 --- a/heat/templates/ingress-cfn.yaml +++ b/heat/templates/ingress-cfn.yaml @@ -17,29 +17,43 @@ limitations under the License. {{- if .Values.manifests.ingress_cfn }} {{- $envAll := . }} {{- if .Values.network.cfn.ingress.public }} +{{- $backendServiceType := "cloudformation" }} +{{- $backendPort := "h-cfn" }} +{{- $ingressName := tuple $backendServiceType "public" $envAll | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }} +{{- $backendName := tuple $backendServiceType "internal" $envAll | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }} +{{- $hostName := tuple $backendServiceType "public" $envAll | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }} +{{- $hostNameNamespaced := tuple $backendServiceType "public" $envAll | include "helm-toolkit.endpoints.hostname_namespaced_endpoint_lookup" }} +{{- $hostNameFull := tuple $backendServiceType "public" $envAll | include "helm-toolkit.endpoints.hostname_fqdn_endpoint_lookup" }} --- apiVersion: extensions/v1beta1 kind: Ingress metadata: - name: {{ tuple "cloudformation" "public" . | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }} + name: {{ $ingressName }} annotations: kubernetes.io/ingress.class: "nginx" ingress.kubernetes.io/rewrite-target: / spec: rules: - - host: {{ tuple "cloudformation" "public" . | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }} +{{ if ne $hostNameNamespaced $hostNameFull }} +{{- range $key1, $vHost := tuple $hostName $hostNameNamespaced $hostNameFull }} + - host: {{ $vHost }} http: paths: - path: / backend: - serviceName: {{ tuple "cloudformation" "internal" . | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }} - servicePort: h-cfn - - host: {{ tuple "cloudformation" "public" . | include "helm-toolkit.endpoints.hostname_fqdn_endpoint_lookup" }} + serviceName: {{ $backendName }} + servicePort: {{ $backendPort }} +{{- end }} +{{- else }} +{{- range $key1, $vHost := tuple $hostName $hostNameNamespaced }} + - host: {{ $vHost }} http: paths: - path: / backend: - serviceName: {{ tuple "cloudformation" "internal" . | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }} - servicePort: h-cfn + serviceName: {{ $backendName }} + servicePort: {{ $backendPort }} +{{- end }} +{{- end }} {{- end }} {{- end }} diff --git a/heat/templates/ingress-cloudwatch.yaml b/heat/templates/ingress-cloudwatch.yaml index a190a30e2b..5e2c4178d4 100644 --- a/heat/templates/ingress-cloudwatch.yaml +++ b/heat/templates/ingress-cloudwatch.yaml @@ -17,29 +17,43 @@ limitations under the License. {{- if .Values.manifests.ingress_cloudwatch }} {{- $envAll := . }} {{- if .Values.network.cloudwatch.ingress.public }} +{{- $backendServiceType := "cloudwatch" }} +{{- $backendPort := "h-cwh" }} +{{- $ingressName := tuple $backendServiceType "public" $envAll | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }} +{{- $backendName := tuple $backendServiceType "internal" $envAll | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }} +{{- $hostName := tuple $backendServiceType "public" $envAll | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }} +{{- $hostNameNamespaced := tuple $backendServiceType "public" $envAll | include "helm-toolkit.endpoints.hostname_namespaced_endpoint_lookup" }} +{{- $hostNameFull := tuple $backendServiceType "public" $envAll | include "helm-toolkit.endpoints.hostname_fqdn_endpoint_lookup" }} --- apiVersion: extensions/v1beta1 kind: Ingress metadata: - name: {{ tuple "cloudwatch" "public" . | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }} + name: {{ $ingressName }} annotations: kubernetes.io/ingress.class: "nginx" ingress.kubernetes.io/rewrite-target: / spec: rules: - - host: {{ tuple "cloudwatch" "public" . | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }} +{{ if ne $hostNameNamespaced $hostNameFull }} +{{- range $key1, $vHost := tuple $hostName $hostNameNamespaced $hostNameFull }} + - host: {{ $vHost }} http: paths: - path: / backend: - serviceName: {{ tuple "cloudwatch" "internal" . | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }} - servicePort: h-cwh - - host: {{ tuple "cloudwatch" "public" . | include "helm-toolkit.endpoints.hostname_fqdn_endpoint_lookup" }} + serviceName: {{ $backendName }} + servicePort: {{ $backendPort }} +{{- end }} +{{- else }} +{{- range $key1, $vHost := tuple $hostName $hostNameNamespaced }} + - host: {{ $vHost }} http: paths: - path: / backend: - serviceName: {{ tuple "cloudwatch" "internal" . | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }} - servicePort: h-cwh + serviceName: {{ $backendName }} + servicePort: {{ $backendPort }} +{{- end }} +{{- end }} {{- end }} {{- end }} diff --git a/heat/values.yaml b/heat/values.yaml index d808f735b2..c6cec8f735 100644 --- a/heat/values.yaml +++ b/heat/values.yaml @@ -296,6 +296,7 @@ secrets: # values, but should include all endpoints # required by this chart endpoints: + cluster_domain_suffix: cluster.local identity: name: keystone auth: @@ -331,6 +332,8 @@ endpoints: hosts: default: keystone-api public: keystone + host_fqdn_overide: + default: null path: default: /v3 scheme: @@ -345,6 +348,8 @@ endpoints: hosts: default: heat-api public: heat + host_fqdn_overide: + default: null path: default: '/v1/%(project_id)s' scheme: @@ -358,6 +363,8 @@ endpoints: hosts: default: heat-cfn public: cloudformation + host_fqdn_overide: + default: null path: default: /v1 scheme: @@ -372,6 +379,8 @@ endpoints: hosts: default: heat-cloudwatch public: cloudwatch + host_fqdn_overide: + default: null path: default: null type: null @@ -391,6 +400,8 @@ endpoints: password: password hosts: default: mariadb + host_fqdn_overide: + default: null path: /heat scheme: mysql+pymysql port: @@ -399,6 +410,8 @@ endpoints: oslo_cache: hosts: default: memcached + host_fqdn_overide: + default: null port: memcache: default: 11211 @@ -412,6 +425,8 @@ endpoints: password: password hosts: default: rabbitmq + host_fqdn_overide: + default: null path: / scheme: rabbit port: diff --git a/helm-toolkit/templates/endpoints/_authenticated_endpoint_uri_lookup.tpl b/helm-toolkit/templates/endpoints/_authenticated_endpoint_uri_lookup.tpl index d912fc47a3..b28bba3961 100644 --- a/helm-toolkit/templates/endpoints/_authenticated_endpoint_uri_lookup.tpl +++ b/helm-toolkit/templates/endpoints/_authenticated_endpoint_uri_lookup.tpl @@ -30,11 +30,9 @@ limitations under the License. {{- $context := index . 4 -}} {{- $endpointMap := index $context.Values.endpoints $type }} {{- $userMap := index $endpointMap.auth $userclass }} -{{- $fqdn := default "svc.cluster.local" $context.Release.Namespace -}} -{{- if $context.Values.endpoints.fqdn -}} -{{- $fqdn := $context.Values.endpoints.fqdn -}} -{{- end -}} +{{- $clusterSuffix := printf "%s.%s" "svc" $context.Values.endpoints.cluster_domain_suffix }} {{- with $endpointMap -}} +{{- $namespace := .namespace | default $context.Release.Namespace }} {{- $endpointScheme := .scheme }} {{- $endpointUser := index $userMap "username" }} {{- $endpointPass := index $userMap "password" }} @@ -42,6 +40,8 @@ limitations under the License. {{- $endpointPortMAP := index .port $port }} {{- $endpointPort := index $endpointPortMAP $endpoint | default (index $endpointPortMAP "default") }} {{- $endpointPath := .path | default "" }} -{{- printf "%s://%s:%s@%s.%s:%1.f%s" $endpointScheme $endpointUser $endpointPass $endpointHost $fqdn $endpointPort $endpointPath -}} +{{- $endpointClusterHostname := printf "%s.%s.%s" $endpointHost $namespace $clusterSuffix }} +{{- $endpointHostname := index .host_fqdn_overide $endpoint | default .host_fqdn_overide.default | default $endpointClusterHostname }} +{{- printf "%s://%s:%s@%s:%1.f%s" $endpointScheme $endpointUser $endpointPass $endpointHostname $endpointPort $endpointPath -}} {{- end -}} {{- end -}} diff --git a/helm-toolkit/templates/endpoints/_host_and_port_endpoint_uri_lookup.tpl b/helm-toolkit/templates/endpoints/_host_and_port_endpoint_uri_lookup.tpl index d5a190526f..c9154db356 100644 --- a/helm-toolkit/templates/endpoints/_host_and_port_endpoint_uri_lookup.tpl +++ b/helm-toolkit/templates/endpoints/_host_and_port_endpoint_uri_lookup.tpl @@ -27,16 +27,16 @@ limitations under the License. {{- $endpoint := index . 1 -}} {{- $port := index . 2 -}} {{- $context := index . 3 -}} +{{- $clusterSuffix := printf "%s.%s" "svc" $context.Values.endpoints.cluster_domain_suffix }} {{- $endpointMap := index $context.Values.endpoints $type }} -{{- $fqdn := default "svc.cluster.local" $context.Release.Namespace -}} -{{- if $context.Values.endpoints.fqdn -}} -{{- $fqdn := $context.Values.endpoints.fqdn -}} -{{- end -}} {{- with $endpointMap -}} +{{- $namespace := .namespace | default $context.Release.Namespace }} {{- $endpointScheme := .scheme }} {{- $endpointHost := index .hosts $endpoint | default .hosts.default }} {{- $endpointPortMAP := index .port $port }} {{- $endpointPort := index $endpointPortMAP $endpoint | default (index $endpointPortMAP "default") }} -{{- printf "%s.%s:%1.f" $endpointHost $fqdn $endpointPort -}} +{{- $endpointClusterHostname := printf "%s.%s.%s" $endpointHost $namespace $clusterSuffix }} +{{- $endpointHostname := index .host_fqdn_overide $endpoint | default .host_fqdn_overide.default | default $endpointClusterHostname }} +{{- printf "%s:%1.f" $endpointHostname $endpointPort -}} {{- end -}} {{- end -}} diff --git a/helm-toolkit/templates/endpoints/_hostname_fqdn_endpoint_lookup.tpl b/helm-toolkit/templates/endpoints/_hostname_fqdn_endpoint_lookup.tpl index afc6fce554..916efc9c2f 100644 --- a/helm-toolkit/templates/endpoints/_hostname_fqdn_endpoint_lookup.tpl +++ b/helm-toolkit/templates/endpoints/_hostname_fqdn_endpoint_lookup.tpl @@ -24,14 +24,14 @@ limitations under the License. {{- $type := index . 0 -}} {{- $endpoint := index . 1 -}} {{- $context := index . 2 -}} +{{- $clusterSuffix := printf "%s.%s" "svc" $context.Values.endpoints.cluster_domain_suffix }} {{- $endpointMap := index $context.Values.endpoints $type }} -{{- $fqdn := default "svc.cluster.local" $context.Release.Namespace -}} -{{- if $context.Values.endpoints.fqdn -}} -{{- $fqdn := $context.Values.endpoints.fqdn -}} -{{- end -}} {{- with $endpointMap -}} +{{- $namespace := .namespace | default $context.Release.Namespace }} {{- $endpointScheme := .scheme }} {{- $endpointHost := index .hosts $endpoint | default .hosts.default }} -{{- printf "%s.%s" $endpointHost $fqdn -}} +{{- $endpointClusterHostname := printf "%s.%s.%s" $endpointHost $namespace $clusterSuffix }} +{{- $endpointHostname := index .host_fqdn_overide $endpoint | default .host_fqdn_overide.default | default $endpointClusterHostname }} +{{- printf "%s" $endpointHostname -}} {{- end -}} {{- end -}} diff --git a/helm-toolkit/templates/endpoints/_hostname_namespaced_endpoint_lookup.tpl b/helm-toolkit/templates/endpoints/_hostname_namespaced_endpoint_lookup.tpl new file mode 100644 index 0000000000..5541c727f0 --- /dev/null +++ b/helm-toolkit/templates/endpoints/_hostname_namespaced_endpoint_lookup.tpl @@ -0,0 +1,36 @@ +{{/* +Copyright 2017 The Openstack-Helm Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/}} + +# This function returns hostnames from endpoint definitions for use cases +# where the uri style return is not appropriate, and only the hostname +# portion is used or relevant in the template: +# { tuple "memcache" "internal" . | include "helm-toolkit.endpoints.hostname_namespaced_endpoint_lookup" } +# returns: internal_host_namespaced + +{{- define "helm-toolkit.endpoints.hostname_namespaced_endpoint_lookup" -}} +{{- $type := index . 0 -}} +{{- $endpoint := index . 1 -}} +{{- $context := index . 2 -}} +{{- $endpointMap := index $context.Values.endpoints $type }} +{{- with $endpointMap -}} +{{- $namespace := .namespace | default $context.Release.Namespace }} +{{- $endpointScheme := .scheme }} +{{- $endpointHost := index .hosts $endpoint | default .hosts.default }} +{{- $endpointClusterHostname := printf "%s.%s" $endpointHost $namespace }} +{{- $endpointHostname := index .host_fqdn_overide $endpoint | default .host_fqdn_overide.default | default $endpointClusterHostname }} +{{- printf "%s" $endpointHostname -}} +{{- end -}} +{{- end -}} diff --git a/helm-toolkit/templates/endpoints/_hostname_short_endpoint_lookup.tpl b/helm-toolkit/templates/endpoints/_hostname_short_endpoint_lookup.tpl index 099697ca37..3c6135736d 100644 --- a/helm-toolkit/templates/endpoints/_hostname_short_endpoint_lookup.tpl +++ b/helm-toolkit/templates/endpoints/_hostname_short_endpoint_lookup.tpl @@ -28,6 +28,7 @@ limitations under the License. {{- with $endpointMap -}} {{- $endpointScheme := .scheme }} {{- $endpointHost := index .hosts $endpoint | default .hosts.default}} -{{- printf "%s" $endpointHost -}} +{{- $endpointHostname := printf "%s" $endpointHost }} +{{- printf "%s" $endpointHostname -}} {{- end -}} {{- end -}} diff --git a/helm-toolkit/templates/endpoints/_keystone_endpoint_uri_lookup.tpl b/helm-toolkit/templates/endpoints/_keystone_endpoint_uri_lookup.tpl index 0dc8e5edd2..fa9a6dda8a 100644 --- a/helm-toolkit/templates/endpoints/_keystone_endpoint_uri_lookup.tpl +++ b/helm-toolkit/templates/endpoints/_keystone_endpoint_uri_lookup.tpl @@ -24,17 +24,17 @@ limitations under the License. {{- $endpoint := index . 1 -}} {{- $port := index . 2 -}} {{- $context := index . 3 -}} +{{- $clusterSuffix := printf "%s.%s" "svc" $context.Values.endpoints.cluster_domain_suffix }} {{- $endpointMap := index $context.Values.endpoints $type }} -{{- $fqdn := default "svc.cluster.local" $context.Release.Namespace -}} -{{- if $context.Values.endpoints.fqdn -}} -{{- $fqdn := $context.Values.endpoints.fqdn -}} -{{- end -}} {{- with $endpointMap -}} +{{- $namespace := $endpointMap.namespace | default $context.Release.Namespace }} {{- $endpointScheme := index .scheme $endpoint | default .scheme.default }} {{- $endpointHost := index .hosts $endpoint | default .hosts.default }} {{- $endpointPortMAP := index .port $port }} {{- $endpointPort := index $endpointPortMAP $endpoint | default (index $endpointPortMAP "default") }} {{- $endpointPath := index .path $endpoint | default .path.default | default "/" }} -{{- printf "%s://%s.%s:%1.f%s" $endpointScheme $endpointHost $fqdn $endpointPort $endpointPath -}} +{{- $endpointClusterHostname := printf "%s.%s.%s" $endpointHost $namespace $clusterSuffix }} +{{- $endpointHostname := index .host_fqdn_overide $endpoint | default .host_fqdn_overide.default | default $endpointClusterHostname }} +{{- printf "%s://%s:%1.f%s" $endpointScheme $endpointHostname $endpointPort $endpointPath -}} {{- end -}} {{- end -}} diff --git a/horizon/templates/ingress-api.yaml b/horizon/templates/ingress-api.yaml index dd62bbd0d1..513d338698 100644 --- a/horizon/templates/ingress-api.yaml +++ b/horizon/templates/ingress-api.yaml @@ -17,29 +17,31 @@ limitations under the License. {{- if .Values.manifests.ingress_api }} {{- $envAll := . }} {{- if .Values.network.ingress.public }} +{{- $backendServiceType := "dashboard" }} +{{- $backendPort := "http" }} +{{- $ingressName := tuple $backendServiceType "public" $envAll | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }} +{{- $backendName := tuple $backendServiceType "internal" $envAll | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }} +{{- $hostName := tuple $backendServiceType "public" $envAll | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }} +{{- $hostNameNamespaced := tuple $backendServiceType "public" $envAll | include "helm-toolkit.endpoints.hostname_namespaced_endpoint_lookup" }} +{{- $hostNameFull := tuple $backendServiceType "public" $envAll | include "helm-toolkit.endpoints.hostname_fqdn_endpoint_lookup" }} --- apiVersion: extensions/v1beta1 kind: Ingress metadata: - name: {{ tuple "dashboard" "public" . | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }} + name: {{ $ingressName }} annotations: kubernetes.io/ingress.class: "nginx" ingress.kubernetes.io/rewrite-target: / spec: rules: - - host: {{ tuple "dashboard" "public" . | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }} +{{- range $key1, $vHost := tuple $hostName $hostNameNamespaced $hostNameFull }} + - host: {{ $vHost }} http: paths: - path: / backend: - serviceName: {{ tuple "dashboard" "internal" . | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }} - servicePort: http - - host: {{ tuple "dashboard" "public" . | include "helm-toolkit.endpoints.hostname_fqdn_endpoint_lookup" }} - http: - paths: - - path: / - backend: - serviceName: {{ tuple "dashboard" "internal" . | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }} - servicePort: http + serviceName: {{ $backendName }} + servicePort: {{ $backendPort }} +{{- end }} {{- end }} {{- end }} diff --git a/horizon/values.yaml b/horizon/values.yaml index d727c7db1b..7b569aead5 100644 --- a/horizon/values.yaml +++ b/horizon/values.yaml @@ -1190,11 +1190,14 @@ secrets: # values, but should include all endpoints # required by this chart endpoints: + cluster_domain_suffix: cluster.local identity: name: keystone hosts: default: keystone-api public: keystone + host_fqdn_overide: + default: null path: default: /v3 scheme: @@ -1207,6 +1210,8 @@ endpoints: oslo_cache: hosts: default: memcached + host_fqdn_overide: + default: null port: memcache: default: 11211 @@ -1215,6 +1220,8 @@ endpoints: hosts: default: horizon-int public: horizon + host_fqdn_overide: + default: null path: default: null scheme: @@ -1232,6 +1239,8 @@ endpoints: password: password hosts: default: mariadb + host_fqdn_overide: + default: null path: /horizon scheme: mysql+pymysql port: diff --git a/keystone/templates/ingress-api.yaml b/keystone/templates/ingress-api.yaml index 76101d6cc3..313bb605f1 100644 --- a/keystone/templates/ingress-api.yaml +++ b/keystone/templates/ingress-api.yaml @@ -17,29 +17,43 @@ limitations under the License. {{- if .Values.manifests.ingress_api }} {{- $envAll := . }} {{- if .Values.network.api.ingress.public }} +{{- $backendServiceType := "identity" }} +{{- $backendPort := "ks-pub" }} +{{- $ingressName := tuple $backendServiceType "public" $envAll | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }} +{{- $backendName := tuple $backendServiceType "internal" $envAll | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }} +{{- $hostName := tuple $backendServiceType "public" $envAll | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }} +{{- $hostNameNamespaced := tuple $backendServiceType "public" $envAll | include "helm-toolkit.endpoints.hostname_namespaced_endpoint_lookup" }} +{{- $hostNameFull := tuple $backendServiceType "public" $envAll | include "helm-toolkit.endpoints.hostname_fqdn_endpoint_lookup" }} --- apiVersion: extensions/v1beta1 kind: Ingress metadata: - name: {{ tuple "identity" "public" . | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }} + name: {{ $ingressName }} annotations: kubernetes.io/ingress.class: "nginx" ingress.kubernetes.io/rewrite-target: / spec: rules: - - host: {{ tuple "identity" "public" . | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }} +{{ if ne $hostNameNamespaced $hostNameFull }} +{{- range $key1, $vHost := tuple $hostName $hostNameNamespaced $hostNameFull }} + - host: {{ $vHost }} http: paths: - path: / backend: - serviceName: {{ tuple "identity" "internal" . | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }} - servicePort: ks-pub - - host: {{ tuple "identity" "public" . | include "helm-toolkit.endpoints.hostname_fqdn_endpoint_lookup" }} + serviceName: {{ $backendName }} + servicePort: {{ $backendPort }} +{{- end }} +{{- else }} +{{- range $key1, $vHost := tuple $hostName $hostNameNamespaced }} + - host: {{ $vHost }} http: paths: - path: / backend: - serviceName: {{ tuple "identity" "internal" . | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }} - servicePort: ks-pub + serviceName: {{ $backendName }} + servicePort: {{ $backendPort }} +{{- end }} +{{- end }} {{- end }} {{- end }} diff --git a/keystone/templates/job-db-sync.yaml b/keystone/templates/job-db-sync.yaml index 0ae0b7c9f5..0471c52d8e 100644 --- a/keystone/templates/job-db-sync.yaml +++ b/keystone/templates/job-db-sync.yaml @@ -43,9 +43,9 @@ spec: env: - name: OS_BOOTSTRAP_ADMIN_URL value: {{ tuple "identity" "admin" "admin" . | include "helm-toolkit.endpoints.keystone_endpoint_uri_lookup" }} - - name: OS_BOOTSTRAP_PUBLIC_URL - value: {{ tuple "identity" "internal" "api" . | include "helm-toolkit.endpoints.keystone_endpoint_uri_lookup" }} - name: OS_BOOTSTRAP_INTERNAL_URL + value: {{ tuple "identity" "internal" "api" . | include "helm-toolkit.endpoints.keystone_endpoint_uri_lookup" }} + - name: OS_BOOTSTRAP_PUBLIC_URL value: {{ tuple "identity" "public" "api" . | include "helm-toolkit.endpoints.keystone_endpoint_uri_lookup" }} {{- with $env := dict "ksUserSecret" .Values.secrets.identity.admin }} {{- include "helm-toolkit.snippets.keystone_openrc_env_vars" $env | indent 12 }} diff --git a/keystone/values.yaml b/keystone/values.yaml index 2d8ccb4bcd..cdd890f24e 100644 --- a/keystone/values.yaml +++ b/keystone/values.yaml @@ -460,7 +460,9 @@ secrets: # values, but should include all endpoints # required by this chart endpoints: + cluster_domain_suffix: cluster.local identity: + namespace: null name: keystone auth: admin: @@ -473,6 +475,8 @@ endpoints: hosts: default: keystone-api public: keystone + host_fqdn_overide: + default: null path: default: /v3 scheme: @@ -483,6 +487,7 @@ endpoints: api: default: 80 oslo_db: + namespace: null auth: admin: username: root @@ -492,12 +497,15 @@ endpoints: password: password hosts: default: mariadb + host_fqdn_overide: + default: null path: /keystone scheme: mysql+pymysql port: mysql: default: 3306 oslo_messaging: + namespace: null auth: admin: username: admin @@ -507,14 +515,19 @@ endpoints: password: password hosts: default: rabbitmq + host_fqdn_overide: + default: null path: /openstack scheme: rabbit port: amqp: default: 5672 oslo_cache: + namespace: null hosts: default: memcached + host_fqdn_overide: + default: null port: memcache: default: 11211 diff --git a/magnum/templates/ingress-api.yaml b/magnum/templates/ingress-api.yaml index 0cf1394044..fed2058303 100644 --- a/magnum/templates/ingress-api.yaml +++ b/magnum/templates/ingress-api.yaml @@ -17,29 +17,43 @@ limitations under the License. {{- if .Values.manifests.ingress_api }} {{- $envAll := . }} {{- if .Values.network.api.ingress.public }} +{{- $backendServiceType := "container-infra" }} +{{- $backendPort := "m-api" }} +{{- $ingressName := tuple $backendServiceType "public" $envAll | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }} +{{- $backendName := tuple $backendServiceType "internal" $envAll | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }} +{{- $hostName := tuple $backendServiceType "public" $envAll | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }} +{{- $hostNameNamespaced := tuple $backendServiceType "public" $envAll | include "helm-toolkit.endpoints.hostname_namespaced_endpoint_lookup" }} +{{- $hostNameFull := tuple $backendServiceType "public" $envAll | include "helm-toolkit.endpoints.hostname_fqdn_endpoint_lookup" }} --- apiVersion: extensions/v1beta1 kind: Ingress metadata: - name: {{ tuple "container-infra" "public" . | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }} + name: {{ $ingressName }} annotations: kubernetes.io/ingress.class: "nginx" ingress.kubernetes.io/rewrite-target: / spec: rules: - - host: {{ tuple "container-infra" "public" . | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }} +{{ if ne $hostNameNamespaced $hostNameFull }} +{{- range $key1, $vHost := tuple $hostName $hostNameNamespaced $hostNameFull }} + - host: {{ $vHost }} http: paths: - path: / backend: - serviceName: {{ tuple "container-infra" "internal" . | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }} - servicePort: m-api - - host: {{ tuple "container-infra" "public" . | include "helm-toolkit.endpoints.hostname_fqdn_endpoint_lookup" }} + serviceName: {{ $backendName }} + servicePort: {{ $backendPort }} +{{- end }} +{{- else }} +{{- range $key1, $vHost := tuple $hostName $hostNameNamespaced }} + - host: {{ $vHost }} http: paths: - path: / backend: - serviceName: {{ tuple "container-infra" "internal" . | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }} - servicePort: m-api + serviceName: {{ $backendName }} + servicePort: {{ $backendPort }} +{{- end }} +{{- end }} {{- end }} {{- end }} diff --git a/magnum/values.yaml b/magnum/values.yaml index aa4cf7732d..6dee895887 100644 --- a/magnum/values.yaml +++ b/magnum/values.yaml @@ -168,6 +168,7 @@ secrets: # values, but should include all endpoints # required by this chart endpoints: + cluster_domain_suffix: cluster.local identity: name: keystone auth: @@ -189,6 +190,8 @@ endpoints: hosts: default: keystone-api public: keystone + host_fqdn_overide: + default: null path: default: /v3 scheme: @@ -203,6 +206,8 @@ endpoints: hosts: default: magnum-api public: magnum + host_fqdn_overide: + default: null path: default: /v1 scheme: @@ -221,6 +226,8 @@ endpoints: password: password hosts: default: mariadb + host_fqdn_overide: + default: null path: /magnum scheme: mysql+pymysql port: @@ -229,6 +236,8 @@ endpoints: oslo_cache: hosts: default: memcached + host_fqdn_overide: + default: null port: memcache: default: 11211 @@ -242,6 +251,8 @@ endpoints: password: password hosts: default: rabbitmq + host_fqdn_overide: + default: null path: / scheme: rabbit port: diff --git a/mariadb/values.yaml b/mariadb/values.yaml index 46acd094a3..adf115a297 100644 --- a/mariadb/values.yaml +++ b/mariadb/values.yaml @@ -71,6 +71,7 @@ resources: # values, but should include all endpoints # required by this chart endpoints: + cluster_domain_suffix: cluster.local oslo_db: auth: admin: @@ -79,6 +80,8 @@ endpoints: hosts: default: mariadb discovery: mariadb-discovery + host_fqdn_overide: + default: null path: null scheme: mysql+pymysql port: diff --git a/mistral/templates/ingress-api.yaml b/mistral/templates/ingress-api.yaml index 52253c2688..c11bf5ba86 100644 --- a/mistral/templates/ingress-api.yaml +++ b/mistral/templates/ingress-api.yaml @@ -17,29 +17,43 @@ limitations under the License. {{- if .Values.manifests.ingress_api }} {{- $envAll := . }} {{- if .Values.network.api.ingress.public }} +{{- $backendServiceType := "workflow" }} +{{- $backendPort := "w-api" }} +{{- $ingressName := tuple $backendServiceType "public" $envAll | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }} +{{- $backendName := tuple $backendServiceType "internal" $envAll | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }} +{{- $hostName := tuple $backendServiceType "public" $envAll | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }} +{{- $hostNameNamespaced := tuple $backendServiceType "public" $envAll | include "helm-toolkit.endpoints.hostname_namespaced_endpoint_lookup" }} +{{- $hostNameFull := tuple $backendServiceType "public" $envAll | include "helm-toolkit.endpoints.hostname_fqdn_endpoint_lookup" }} --- apiVersion: extensions/v1beta1 kind: Ingress metadata: - name: {{ tuple "workflow" "public" . | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }} + name: {{ $ingressName }} annotations: kubernetes.io/ingress.class: "nginx" ingress.kubernetes.io/rewrite-target: / spec: rules: - - host: {{ tuple "workflow" "public" . | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }} +{{ if ne $hostNameNamespaced $hostNameFull }} +{{- range $key1, $vHost := tuple $hostName $hostNameNamespaced $hostNameFull }} + - host: {{ $vHost }} http: paths: - path: / backend: - serviceName: {{ tuple "workflow" "internal" . | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }} - servicePort: w-api - - host: {{ tuple "workflow" "public" . | include "helm-toolkit.endpoints.hostname_fqdn_endpoint_lookup" }} + serviceName: {{ $backendName }} + servicePort: {{ $backendPort }} +{{- end }} +{{- else }} +{{- range $key1, $vHost := tuple $hostName $hostNameNamespaced }} + - host: {{ $vHost }} http: paths: - path: / backend: - serviceName: {{ tuple "workflow" "internal" . | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }} - servicePort: w-api + serviceName: {{ $backendName }} + servicePort: {{ $backendPort }} +{{- end }} +{{- end }} {{- end }} {{- end }} diff --git a/mistral/values.yaml b/mistral/values.yaml index c5327f04ef..6f987c36c5 100644 --- a/mistral/values.yaml +++ b/mistral/values.yaml @@ -129,6 +129,7 @@ secrets: # values, but should include all endpoints # required by this chart endpoints: + cluster_domain_suffix: cluster.local identity: name: keystone auth: @@ -150,6 +151,8 @@ endpoints: hosts: default: keystone-api public: keystone + host_fqdn_overide: + default: null path: default: /v3 scheme: @@ -164,6 +167,8 @@ endpoints: hosts: default: mistral-api public: mistral + host_fqdn_overide: + default: null path: default: /v2 scheme: @@ -182,6 +187,8 @@ endpoints: password: password hosts: default: mariadb + host_fqdn_overide: + default: null path: /mistral scheme: mysql+pymysql port: @@ -197,6 +204,8 @@ endpoints: password: password hosts: default: rabbitmq + host_fqdn_overide: + default: null path: / scheme: rabbit port: @@ -205,6 +214,8 @@ endpoints: oslo_cache: hosts: default: memcached + host_fqdn_overide: + default: null port: memcache: default: 11211 diff --git a/neutron/templates/ingress-server.yaml b/neutron/templates/ingress-server.yaml index 21fa867117..b3e4bfd69a 100644 --- a/neutron/templates/ingress-server.yaml +++ b/neutron/templates/ingress-server.yaml @@ -17,29 +17,43 @@ limitations under the License. {{- if .Values.manifests.ingress_server }} {{- $envAll := . }} {{- if .Values.network.server.ingress.public }} +{{- $backendServiceType := "network" }} +{{- $backendPort := "q-api" }} +{{- $ingressName := tuple $backendServiceType "public" $envAll | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }} +{{- $backendName := tuple $backendServiceType "internal" $envAll | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }} +{{- $hostName := tuple $backendServiceType "public" $envAll | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }} +{{- $hostNameNamespaced := tuple $backendServiceType "public" $envAll | include "helm-toolkit.endpoints.hostname_namespaced_endpoint_lookup" }} +{{- $hostNameFull := tuple $backendServiceType "public" $envAll | include "helm-toolkit.endpoints.hostname_fqdn_endpoint_lookup" }} --- apiVersion: extensions/v1beta1 kind: Ingress metadata: - name: {{ tuple "network" "public" . | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }} + name: {{ $ingressName }} annotations: kubernetes.io/ingress.class: "nginx" ingress.kubernetes.io/rewrite-target: / spec: rules: - - host: {{ tuple "network" "public" . | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }} +{{ if ne $hostNameNamespaced $hostNameFull }} +{{- range $key1, $vHost := tuple $hostName $hostNameNamespaced $hostNameFull }} + - host: {{ $vHost }} http: paths: - path: / backend: - serviceName: {{ tuple "network" "internal" . | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }} - servicePort: q-api - - host: {{ tuple "network" "public" . | include "helm-toolkit.endpoints.hostname_fqdn_endpoint_lookup" }} + serviceName: {{ $backendName }} + servicePort: {{ $backendPort }} +{{- end }} +{{- else }} +{{- range $key1, $vHost := tuple $hostName $hostNameNamespaced }} + - host: {{ $vHost }} http: paths: - path: / backend: - serviceName: {{ tuple "network" "internal" . | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }} - servicePort: q-api + serviceName: {{ $backendName }} + servicePort: {{ $backendPort }} +{{- end }} +{{- end }} {{- end }} {{- end }} diff --git a/neutron/values.yaml b/neutron/values.yaml index 71530fcd0b..33e78bc68c 100644 --- a/neutron/values.yaml +++ b/neutron/values.yaml @@ -809,6 +809,7 @@ secrets: # values, but should include all endpoints # required by this chart endpoints: + cluster_domain_suffix: cluster.local oslo_db: auth: admin: @@ -819,6 +820,8 @@ endpoints: password: password hosts: default: mariadb + host_fqdn_overide: + default: null path: /neutron scheme: mysql+pymysql port: @@ -834,6 +837,8 @@ endpoints: password: password hosts: default: rabbitmq + host_fqdn_overide: + default: null path: / scheme: rabbit port: @@ -842,6 +847,8 @@ endpoints: oslo_cache: hosts: default: memcached + host_fqdn_overide: + default: null port: memcache: default: 11211 @@ -850,6 +857,8 @@ endpoints: hosts: default: nova-api public: nova + host_fqdn_overide: + default: null path: default: "/v2/%(tenant_id)s" scheme: @@ -883,6 +892,8 @@ endpoints: hosts: default: keystone-api public: keystone + host_fqdn_overide: + default: null path: default: /v3 scheme: @@ -897,6 +908,8 @@ endpoints: hosts: default: neutron-server public: neutron + host_fqdn_overide: + default: null path: default: null scheme: diff --git a/nova/templates/ingress-metadata.yaml b/nova/templates/ingress-metadata.yaml index 41bbc0ef8f..9741d6d9b1 100644 --- a/nova/templates/ingress-metadata.yaml +++ b/nova/templates/ingress-metadata.yaml @@ -17,29 +17,43 @@ limitations under the License. {{- if .Values.manifests.ingress_metadata }} {{- $envAll := . }} {{- if .Values.network.metadata.ingress.public }} +{{- $backendServiceType := "compute_metadata" }} +{{- $backendPort := "n-meta" }} +{{- $ingressName := tuple $backendServiceType "public" $envAll | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }} +{{- $backendName := tuple $backendServiceType "internal" $envAll | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }} +{{- $hostName := tuple $backendServiceType "public" $envAll | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }} +{{- $hostNameNamespaced := tuple $backendServiceType "public" $envAll | include "helm-toolkit.endpoints.hostname_namespaced_endpoint_lookup" }} +{{- $hostNameFull := tuple $backendServiceType "public" $envAll | include "helm-toolkit.endpoints.hostname_fqdn_endpoint_lookup" }} --- apiVersion: extensions/v1beta1 kind: Ingress metadata: - name: {{ tuple "compute_metadata" "public" . | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }} + name: {{ $ingressName }} annotations: kubernetes.io/ingress.class: "nginx" ingress.kubernetes.io/rewrite-target: / spec: rules: - - host: {{ tuple "compute_metadata" "public" . | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }} +{{ if ne $hostNameNamespaced $hostNameFull }} +{{- range $key1, $vHost := tuple $hostName $hostNameNamespaced $hostNameFull }} + - host: {{ $vHost }} http: paths: - path: / backend: - serviceName: {{ tuple "compute_metadata" "internal" . | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }} - servicePort: n-meta - - host: {{ tuple "compute_metadata" "public" . | include "helm-toolkit.endpoints.hostname_fqdn_endpoint_lookup" }} + serviceName: {{ $backendName }} + servicePort: {{ $backendPort }} +{{- end }} +{{- else }} +{{- range $key1, $vHost := tuple $hostName $hostNameNamespaced }} + - host: {{ $vHost }} http: paths: - path: / backend: - serviceName: {{ tuple "compute_metadata" "internal" . | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }} - servicePort: n-meta + serviceName: {{ $backendName }} + servicePort: {{ $backendPort }} +{{- end }} +{{- end }} {{- end }} {{- end }} diff --git a/nova/templates/ingress-osapi.yaml b/nova/templates/ingress-osapi.yaml index 9c07986a3b..5264cf9ab7 100644 --- a/nova/templates/ingress-osapi.yaml +++ b/nova/templates/ingress-osapi.yaml @@ -17,29 +17,43 @@ limitations under the License. {{- if .Values.manifests.ingress_osapi }} {{- $envAll := . }} {{- if .Values.network.osapi.ingress.public }} +{{- $backendServiceType := "compute" }} +{{- $backendPort := "n-api" }} +{{- $ingressName := tuple $backendServiceType "public" $envAll | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }} +{{- $backendName := tuple $backendServiceType "internal" $envAll | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }} +{{- $hostName := tuple $backendServiceType "public" $envAll | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }} +{{- $hostNameNamespaced := tuple $backendServiceType "public" $envAll | include "helm-toolkit.endpoints.hostname_namespaced_endpoint_lookup" }} +{{- $hostNameFull := tuple $backendServiceType "public" $envAll | include "helm-toolkit.endpoints.hostname_fqdn_endpoint_lookup" }} --- apiVersion: extensions/v1beta1 kind: Ingress metadata: - name: {{ tuple "compute" "public" . | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }} + name: {{ $ingressName }} annotations: kubernetes.io/ingress.class: "nginx" ingress.kubernetes.io/rewrite-target: / spec: rules: - - host: {{ tuple "compute" "public" . | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }} +{{ if ne $hostNameNamespaced $hostNameFull }} +{{- range $key1, $vHost := tuple $hostName $hostNameNamespaced $hostNameFull }} + - host: {{ $vHost }} http: paths: - path: / backend: - serviceName: {{ tuple "compute" "internal" . | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }} - servicePort: n-api - - host: {{ tuple "compute" "public" . | include "helm-toolkit.endpoints.hostname_fqdn_endpoint_lookup" }} + serviceName: {{ $backendName }} + servicePort: {{ $backendPort }} +{{- end }} +{{- else }} +{{- range $key1, $vHost := tuple $hostName $hostNameNamespaced }} + - host: {{ $vHost }} http: paths: - path: / backend: - serviceName: {{ tuple "compute" "internal" . | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }} - servicePort: n-api + serviceName: {{ $backendName }} + servicePort: {{ $backendPort }} +{{- end }} +{{- end }} {{- end }} {{- end }} diff --git a/nova/values.yaml b/nova/values.yaml index fc43c2c29d..bd339fb5d8 100644 --- a/nova/values.yaml +++ b/nova/values.yaml @@ -674,6 +674,7 @@ secrets: # values, but should include all endpoints # required by this chart endpoints: + cluster_domain_suffix: cluster.local oslo_db: auth: admin: @@ -684,6 +685,8 @@ endpoints: password: password hosts: default: mariadb + host_fqdn_overide: + default: null path: /nova scheme: mysql+pymysql port: @@ -699,6 +702,8 @@ endpoints: password: password hosts: default: mariadb + host_fqdn_overide: + default: null path: /nova_api scheme: mysql+pymysql port: @@ -714,6 +719,8 @@ endpoints: password: password hosts: default: rabbitmq + host_fqdn_overide: + default: null path: / scheme: rabbit port: @@ -722,6 +729,8 @@ endpoints: oslo_cache: hosts: default: memcached + host_fqdn_overide: + default: null port: memcache: default: 11211 @@ -746,6 +755,8 @@ endpoints: hosts: default: keystone-api public: keystone + host_fqdn_overide: + default: null path: default: /v3 scheme: @@ -760,6 +771,8 @@ endpoints: hosts: default: glance-api public: glance + host_fqdn_overide: + default: null path: default: null scheme: @@ -773,6 +786,8 @@ endpoints: hosts: default: nova-api public: nova + host_fqdn_overide: + default: null path: default: "/v2/%(tenant_id)s" scheme: @@ -788,6 +803,8 @@ endpoints: hosts: default: nova-metadata public: metadata + host_fqdn_overide: + default: null path: default: / scheme: @@ -801,6 +818,8 @@ endpoints: hosts: default: neutron-server public: neutron + host_fqdn_overide: + default: null path: default: null scheme: diff --git a/rabbitmq/values.yaml b/rabbitmq/values.yaml index cf90383531..4306c1bfbb 100644 --- a/rabbitmq/values.yaml +++ b/rabbitmq/values.yaml @@ -70,9 +70,12 @@ enabled_plugins: erlang_cookie: openstack-cookie endpoints: + cluster_domain_suffix: cluster.local etcd: hosts: default: etcd + host_fqdn_overide: + default: null port: 2379 autocluster: diff --git a/senlin/templates/ingress-api.yaml b/senlin/templates/ingress-api.yaml index e23d60a807..8253c551e8 100644 --- a/senlin/templates/ingress-api.yaml +++ b/senlin/templates/ingress-api.yaml @@ -17,29 +17,43 @@ limitations under the License. {{- if .Values.manifests.ingress_api }} {{- $envAll := . }} {{- if .Values.network.api.ingress.public }} +{{- $backendServiceType := "clustering" }} +{{- $backendPort := "s-api" }} +{{- $ingressName := tuple $backendServiceType "public" $envAll | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }} +{{- $backendName := tuple $backendServiceType "internal" $envAll | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }} +{{- $hostName := tuple $backendServiceType "public" $envAll | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }} +{{- $hostNameNamespaced := tuple $backendServiceType "public" $envAll | include "helm-toolkit.endpoints.hostname_namespaced_endpoint_lookup" }} +{{- $hostNameFull := tuple $backendServiceType "public" $envAll | include "helm-toolkit.endpoints.hostname_fqdn_endpoint_lookup" }} --- apiVersion: extensions/v1beta1 kind: Ingress metadata: - name: {{ tuple "clustering" "public" . | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }} + name: {{ $ingressName }} annotations: kubernetes.io/ingress.class: "nginx" ingress.kubernetes.io/rewrite-target: / spec: rules: - - host: {{ tuple "clustering" "public" . | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }} +{{ if ne $hostNameNamespaced $hostNameFull }} +{{- range $key1, $vHost := tuple $hostName $hostNameNamespaced $hostNameFull }} + - host: {{ $vHost }} http: paths: - path: / backend: - serviceName: {{ tuple "clustering" "internal" . | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }} - servicePort: s-api - - host: {{ tuple "clustering" "public" . | include "helm-toolkit.endpoints.hostname_fqdn_endpoint_lookup" }} + serviceName: {{ $backendName }} + servicePort: {{ $backendPort }} +{{- end }} +{{- else }} +{{- range $key1, $vHost := tuple $hostName $hostNameNamespaced }} + - host: {{ $vHost }} http: paths: - path: / backend: - serviceName: {{ tuple "clustering" "internal" . | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }} - servicePort: s-api + serviceName: {{ $backendName }} + servicePort: {{ $backendPort }} +{{- end }} +{{- end }} {{- end }} {{- end }} diff --git a/senlin/values.yaml b/senlin/values.yaml index 38edb1cdd5..45383bfce8 100644 --- a/senlin/values.yaml +++ b/senlin/values.yaml @@ -172,6 +172,7 @@ secrets: # values, but should include all endpoints # required by this chart endpoints: + cluster_domain_suffix: cluster.local identity: name: keystone auth: @@ -193,6 +194,8 @@ endpoints: hosts: default: keystone-api public: keystone + host_fqdn_overide: + default: null path: default: /v3 scheme: @@ -207,6 +210,8 @@ endpoints: hosts: default: senlin-api public: senlin + host_fqdn_overide: + default: null path: default: null scheme: @@ -225,6 +230,8 @@ endpoints: password: password hosts: default: mariadb + host_fqdn_overide: + default: null path: /senlin scheme: mysql+pymysql port: @@ -233,6 +240,8 @@ endpoints: oslo_cache: hosts: default: memcached + host_fqdn_overide: + default: null port: memcache: default: 11211 @@ -246,6 +255,8 @@ endpoints: password: password hosts: default: rabbitmq + host_fqdn_overide: + default: null path: / scheme: rabbit port: