From 507600e898c15bd757428bfc3f262bbd31ff3a28 Mon Sep 17 00:00:00 2001 From: Pete Birley Date: Sat, 10 Mar 2018 18:13:22 +0000 Subject: [PATCH] Ingress controller service: consolidate to helm-toolkit This PS consolidates the Ingress controller service, that is used to resolve internal requests to public endpoints correctly, to helm-toolkit. Change-Id: If7c7deca1b8289a32709f7dc7c936883469aadfe --- barbican/templates/service-ingress-api.yaml | 18 ++------ ceilometer/templates/service-ingress-api.yaml | 18 ++------ cinder/templates/service-ingress-api.yaml | 18 ++------ congress/templates/service-ingress-api.yaml | 18 ++------ glance/templates/service-ingress-api.yaml | 18 ++------ .../templates/service-ingress-registry.yaml | 18 ++------ gnocchi/templates/service-ingress-api.yaml | 18 ++------ heat/templates/service-ingress-api.yaml | 18 ++------ heat/templates/service-ingress-cfn.yaml | 18 ++------ .../templates/service-ingress-cloudwatch.yaml | 18 ++------ .../templates/manifests/_service-ingress.tpl | 43 +++++++++++++++++++ horizon/templates/service-ingress.yaml | 18 ++------ ironic/templates/service-ingress-api.yaml | 14 +----- keystone/templates/service-ingress-api.yaml | 18 ++------ magnum/templates/service-ingress-api.yaml | 18 ++------ mistral/templates/service-ingress-api.yaml | 18 ++------ .../templates/service-ingress-neutron.yaml | 17 ++------ .../bin/_nova-api-metadata-init.sh.tpl | 3 +- nova/templates/configmap-etc.yaml | 6 +-- nova/templates/service-ingress-metadata.yaml | 21 ++------- nova/templates/service-ingress-osapi.yaml | 18 ++------ nova/templates/service-ingress-placement.yaml | 18 ++------ nova/values.yaml | 5 ++- senlin/templates/service-ingress-api.yaml | 18 ++------ 24 files changed, 108 insertions(+), 307 deletions(-) create mode 100644 helm-toolkit/templates/manifests/_service-ingress.tpl diff --git a/barbican/templates/service-ingress-api.yaml b/barbican/templates/service-ingress-api.yaml index c7001cd42f..76c406619c 100644 --- a/barbican/templates/service-ingress-api.yaml +++ b/barbican/templates/service-ingress-api.yaml @@ -14,19 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */}} -{{- if .Values.manifests.service_ingress_api }} -{{- $envAll := . }} -{{- if .Values.network.api.ingress.public }} ---- -apiVersion: v1 -kind: Service -metadata: - name: {{ tuple "key-manager" "public" . | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }} -spec: - ports: - - name: http - port: 80 - selector: - app: ingress-api -{{- end }} +{{- if and .Values.manifests.service_ingress_api .Values.network.api.ingress.public }} +{{- $serviceIngressOpts := dict "envAll" . "backendServiceType" "key-manager" -}} +{{ $serviceIngressOpts | include "helm-toolkit.manifests.service_ingress" }} {{- end }} diff --git a/ceilometer/templates/service-ingress-api.yaml b/ceilometer/templates/service-ingress-api.yaml index 03f99f18a0..559e97d5be 100644 --- a/ceilometer/templates/service-ingress-api.yaml +++ b/ceilometer/templates/service-ingress-api.yaml @@ -14,19 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */}} -{{- if .Values.manifests.service_ingress_api }} -{{- $envAll := . }} -{{- if .Values.network.api.ingress.public }} ---- -apiVersion: v1 -kind: Service -metadata: - name: {{ tuple "metering" "public" . | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }} -spec: - ports: - - name: http - port: 80 - selector: - app: ingress-api -{{- end }} +{{- if and .Values.manifests.service_ingress_api .Values.network.api.ingress.public }} +{{- $serviceIngressOpts := dict "envAll" . "backendServiceType" "metering" -}} +{{ $serviceIngressOpts | include "helm-toolkit.manifests.service_ingress" }} {{- end }} diff --git a/cinder/templates/service-ingress-api.yaml b/cinder/templates/service-ingress-api.yaml index 6486758f2b..b21c0db0f8 100644 --- a/cinder/templates/service-ingress-api.yaml +++ b/cinder/templates/service-ingress-api.yaml @@ -14,19 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */}} -{{- if .Values.manifests.service_ingress_api }} -{{- $envAll := . }} -{{- if .Values.network.api.ingress.public }} ---- -apiVersion: v1 -kind: Service -metadata: - name: {{ tuple "volume" "public" . | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }} -spec: - ports: - - name: http - port: 80 - selector: - app: ingress-api -{{- end }} +{{- if and .Values.manifests.service_ingress_api .Values.network.api.ingress.public }} +{{- $serviceIngressOpts := dict "envAll" . "backendServiceType" "volume" -}} +{{ $serviceIngressOpts | include "helm-toolkit.manifests.service_ingress" }} {{- end }} diff --git a/congress/templates/service-ingress-api.yaml b/congress/templates/service-ingress-api.yaml index d1a23f3283..6fe2abcfbb 100644 --- a/congress/templates/service-ingress-api.yaml +++ b/congress/templates/service-ingress-api.yaml @@ -14,19 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */}} -{{- if .Values.manifests.service_ingress_api }} -{{- $envAll := . }} -{{- if .Values.network.api.ingress.public }} ---- -apiVersion: v1 -kind: Service -metadata: - name: {{ tuple "policy" "public" . | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }} -spec: - ports: - - name: http - port: 80 - selector: - app: ingress-api -{{- end }} +{{- if and .Values.manifests.service_ingress_api .Values.network.api.ingress.public }} +{{- $serviceIngressOpts := dict "envAll" . "backendServiceType" "policy" -}} +{{ $serviceIngressOpts | include "helm-toolkit.manifests.service_ingress" }} {{- end }} diff --git a/glance/templates/service-ingress-api.yaml b/glance/templates/service-ingress-api.yaml index a36b45bca7..c865684840 100644 --- a/glance/templates/service-ingress-api.yaml +++ b/glance/templates/service-ingress-api.yaml @@ -14,19 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */}} -{{- if .Values.manifests.service_ingress_api }} -{{- $envAll := . }} -{{- if .Values.network.api.ingress.public }} ---- -apiVersion: v1 -kind: Service -metadata: - name: {{ tuple "image" "public" . | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }} -spec: - ports: - - name: http - port: 80 - selector: - app: ingress-api -{{- end }} +{{- if and .Values.manifests.service_ingress_api .Values.network.api.ingress.public }} +{{- $serviceIngressOpts := dict "envAll" . "backendServiceType" "image" -}} +{{ $serviceIngressOpts | include "helm-toolkit.manifests.service_ingress" }} {{- end }} diff --git a/glance/templates/service-ingress-registry.yaml b/glance/templates/service-ingress-registry.yaml index 9f56e2ce14..d614c5cf7d 100644 --- a/glance/templates/service-ingress-registry.yaml +++ b/glance/templates/service-ingress-registry.yaml @@ -14,19 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */}} -{{- if .Values.manifests.service_ingress_registry }} -{{- $envAll := . }} -{{- if .Values.network.registry.ingress.public }} ---- -apiVersion: v1 -kind: Service -metadata: - name: {{ tuple "image_registry" "public" . | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }} -spec: - ports: - - name: http - port: 80 - selector: - app: ingress-api -{{- end }} +{{- if and .Values.manifests.service_ingress_registry .Values.network.registry.ingress.public }} +{{- $serviceIngressOpts := dict "envAll" . "backendServiceType" "image_registry" -}} +{{ $serviceIngressOpts | include "helm-toolkit.manifests.service_ingress" }} {{- end }} diff --git a/gnocchi/templates/service-ingress-api.yaml b/gnocchi/templates/service-ingress-api.yaml index 690ef97811..269a681f49 100644 --- a/gnocchi/templates/service-ingress-api.yaml +++ b/gnocchi/templates/service-ingress-api.yaml @@ -14,19 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */}} -{{- if .Values.manifests.service_ingress_api }} -{{- $envAll := . }} -{{- if .Values.network.api.ingress.public }} ---- -apiVersion: v1 -kind: Service -metadata: - name: {{ tuple "metric" "public" . | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }} -spec: - ports: - - name: http - port: 80 - selector: - app: ingress-api -{{- end }} +{{- if and .Values.manifests.service_ingress_api .Values.network.api.ingress.public }} +{{- $serviceIngressOpts := dict "envAll" . "backendServiceType" "metric" -}} +{{ $serviceIngressOpts | include "helm-toolkit.manifests.service_ingress" }} {{- end }} diff --git a/heat/templates/service-ingress-api.yaml b/heat/templates/service-ingress-api.yaml index 6aedca4657..36da627fad 100644 --- a/heat/templates/service-ingress-api.yaml +++ b/heat/templates/service-ingress-api.yaml @@ -14,19 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */}} -{{- if .Values.manifests.service_ingress_api }} -{{- $envAll := . }} -{{- if .Values.network.api.ingress.public }} ---- -apiVersion: v1 -kind: Service -metadata: - name: {{ tuple "orchestration" "public" . | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }} -spec: - ports: - - name: http - port: 80 - selector: - app: ingress-api -{{- end }} +{{- if and .Values.manifests.service_ingress_api .Values.network.api.ingress.public }} +{{- $serviceIngressOpts := dict "envAll" . "backendServiceType" "orchestration" -}} +{{ $serviceIngressOpts | include "helm-toolkit.manifests.service_ingress" }} {{- end }} diff --git a/heat/templates/service-ingress-cfn.yaml b/heat/templates/service-ingress-cfn.yaml index d0ef649fcb..437d38ba64 100644 --- a/heat/templates/service-ingress-cfn.yaml +++ b/heat/templates/service-ingress-cfn.yaml @@ -14,19 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */}} -{{- if .Values.manifests.service_ingress_cfn }} -{{- $envAll := . }} -{{- if .Values.network.cfn.ingress.public }} ---- -apiVersion: v1 -kind: Service -metadata: - name: {{ tuple "cloudformation" "public" . | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }} -spec: - ports: - - name: http - port: 80 - selector: - app: ingress-api -{{- end }} +{{- if and .Values.manifests.service_ingress_cfn .Values.network.cfn.ingress.public }} +{{- $serviceIngressOpts := dict "envAll" . "backendServiceType" "cloudformation" -}} +{{ $serviceIngressOpts | include "helm-toolkit.manifests.service_ingress" }} {{- end }} diff --git a/heat/templates/service-ingress-cloudwatch.yaml b/heat/templates/service-ingress-cloudwatch.yaml index af402ead0e..4134008a36 100644 --- a/heat/templates/service-ingress-cloudwatch.yaml +++ b/heat/templates/service-ingress-cloudwatch.yaml @@ -14,19 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */}} -{{- if .Values.manifests.service_ingress_cloudwatch }} -{{- $envAll := . }} -{{- if .Values.network.cloudwatch.ingress.public }} ---- -apiVersion: v1 -kind: Service -metadata: - name: {{ tuple "cloudwatch" "public" . | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }} -spec: - ports: - - name: http - port: 80 - selector: - app: ingress-api -{{- end }} +{{- if and .Values.manifests.service_ingress_cloudwatch .Values.network.cloudwatch.ingress.public }} +{{- $serviceIngressOpts := dict "envAll" . "backendServiceType" "cloudwatch" -}} +{{ $serviceIngressOpts | include "helm-toolkit.manifests.service_ingress" }} {{- end }} diff --git a/helm-toolkit/templates/manifests/_service-ingress.tpl b/helm-toolkit/templates/manifests/_service-ingress.tpl new file mode 100644 index 0000000000..859b4b1161 --- /dev/null +++ b/helm-toolkit/templates/manifests/_service-ingress.tpl @@ -0,0 +1,43 @@ +{{/* +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 creates a manifest for a services ingress rules. +# It can be used in charts dict created similar to the following: +# {- $serviceIngressOpts := dict "envAll" . "backendServiceType" "key-manager" -} +# { $serviceIngressOpts | include "helm-toolkit.manifests.service_ingress" } + +{{- define "helm-toolkit.manifests.service_ingress" -}} +{{- $envAll := index . "envAll" -}} +{{- $backendServiceType := index . "backendServiceType" -}} +--- +apiVersion: v1 +kind: Service +metadata: + name: {{ tuple $backendServiceType "public" $envAll | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }} +spec: + ports: + - name: http + port: 80 + selector: + app: ingress-api +{{- if index $envAll.Values.endpoints $backendServiceType }} +{{- if index $envAll.Values.endpoints $backendServiceType "ip" }} +{{- if index $envAll.Values.endpoints $backendServiceType "ip" "ingress" }} + clusterIP: {{ (index $envAll.Values.endpoints $backendServiceType "ip" "ingress") }} +{{- end }} +{{- end }} +{{- end }} +{{- end }} diff --git a/horizon/templates/service-ingress.yaml b/horizon/templates/service-ingress.yaml index c300fb6d0a..b279e7405b 100644 --- a/horizon/templates/service-ingress.yaml +++ b/horizon/templates/service-ingress.yaml @@ -14,19 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */}} -{{- if .Values.manifests.service_ingress }} -{{- $envAll := . }} -{{- if .Values.network.dashboard.ingress.public }} ---- -apiVersion: v1 -kind: Service -metadata: - name: {{ tuple "dashboard" "public" . | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }} -spec: - ports: - - name: http - port: 80 - selector: - app: ingress-api -{{- end }} +{{- if and .Values.manifests.service_ingress .Values.network.dashboard.ingress.public }} +{{- $serviceIngressOpts := dict "envAll" . "backendServiceType" "dashboard" -}} +{{ $serviceIngressOpts | include "helm-toolkit.manifests.service_ingress" }} {{- end }} diff --git a/ironic/templates/service-ingress-api.yaml b/ironic/templates/service-ingress-api.yaml index 8b74b8cf1b..37ab0aa6c7 100644 --- a/ironic/templates/service-ingress-api.yaml +++ b/ironic/templates/service-ingress-api.yaml @@ -15,16 +15,6 @@ limitations under the License. */}} {{- if and .Values.manifests.service_ingress_api .Values.network.api.ingress.public }} -{{- $envAll := . }} ---- -apiVersion: v1 -kind: Service -metadata: - name: {{ tuple "baremetal" "public" . | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }} -spec: - ports: - - name: http - port: 80 - selector: - app: ingress-api +{{- $serviceIngressOpts := dict "envAll" . "backendServiceType" "baremetal" -}} +{{ $serviceIngressOpts | include "helm-toolkit.manifests.service_ingress" }} {{- end }} diff --git a/keystone/templates/service-ingress-api.yaml b/keystone/templates/service-ingress-api.yaml index ae8678df86..21d222c5ab 100644 --- a/keystone/templates/service-ingress-api.yaml +++ b/keystone/templates/service-ingress-api.yaml @@ -14,19 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */}} -{{- if .Values.manifests.service_ingress_api }} -{{- $envAll := . }} -{{- if .Values.network.api.ingress.public }} ---- -apiVersion: v1 -kind: Service -metadata: - name: {{ tuple "identity" "public" . | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }} -spec: - ports: - - name: http - port: 80 - selector: - app: ingress-api -{{- end }} +{{- if and .Values.manifests.service_ingress_api .Values.network.api.ingress.public }} +{{- $serviceIngressOpts := dict "envAll" . "backendServiceType" "identity" -}} +{{ $serviceIngressOpts | include "helm-toolkit.manifests.service_ingress" }} {{- end }} diff --git a/magnum/templates/service-ingress-api.yaml b/magnum/templates/service-ingress-api.yaml index 79546a644e..113f67c751 100644 --- a/magnum/templates/service-ingress-api.yaml +++ b/magnum/templates/service-ingress-api.yaml @@ -14,19 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */}} -{{- if .Values.manifests.service_ingress_api }} -{{- $envAll := . }} -{{- if .Values.network.api.ingress.public }} ---- -apiVersion: v1 -kind: Service -metadata: - name: {{ tuple "container-infra" "public" . | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }} -spec: - ports: - - name: http - port: 80 - selector: - app: ingress-api -{{- end }} +{{- if and .Values.manifests.service_ingress_api .Values.network.api.ingress.public }} +{{- $serviceIngressOpts := dict "envAll" . "backendServiceType" "container-infra" -}} +{{ $serviceIngressOpts | include "helm-toolkit.manifests.service_ingress" }} {{- end }} diff --git a/mistral/templates/service-ingress-api.yaml b/mistral/templates/service-ingress-api.yaml index b3e473f26f..0c76f4678f 100644 --- a/mistral/templates/service-ingress-api.yaml +++ b/mistral/templates/service-ingress-api.yaml @@ -14,19 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */}} -{{- if .Values.manifests.service_ingress_api }} -{{- $envAll := . }} -{{- if .Values.network.api.ingress.public }} ---- -apiVersion: v1 -kind: Service -metadata: - name: {{ tuple "workflow" "public" . | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }} -spec: - ports: - - name: http - port: 80 - selector: - app: ingress-api -{{- end }} +{{- if and .Values.manifests.service_ingress_api .Values.network.api.ingress.public }} +{{- $serviceIngressOpts := dict "envAll" . "backendServiceType" "workflow" -}} +{{ $serviceIngressOpts | include "helm-toolkit.manifests.service_ingress" }} {{- end }} diff --git a/neutron/templates/service-ingress-neutron.yaml b/neutron/templates/service-ingress-neutron.yaml index 9ba0b0bd8d..ab472e8c3a 100644 --- a/neutron/templates/service-ingress-neutron.yaml +++ b/neutron/templates/service-ingress-neutron.yaml @@ -14,18 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */}} -{{- if .Values.manifests.service_ingress_server }} -{{- $envAll := . }} -{{- if .Values.network.server.ingress.public }} ---- -apiVersion: v1 -kind: Service -metadata: - name: {{ tuple "network" "public" . | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }} -spec: - ports: - - port: 80 - selector: - app: ingress-api -{{- end }} +{{- if and .Values.manifests.service_ingress_server .Values.network.server.ingress.public }} +{{- $serviceIngressOpts := dict "envAll" . "backendServiceType" "network" -}} +{{ $serviceIngressOpts | include "helm-toolkit.manifests.service_ingress" }} {{- end }} diff --git a/nova/templates/bin/_nova-api-metadata-init.sh.tpl b/nova/templates/bin/_nova-api-metadata-init.sh.tpl index 5610b87983..bcb509e5ee 100644 --- a/nova/templates/bin/_nova-api-metadata-init.sh.tpl +++ b/nova/templates/bin/_nova-api-metadata-init.sh.tpl @@ -18,7 +18,7 @@ limitations under the License. set -ex -metadata_ip="{{- .Values.network.metadata.ip -}}" +metadata_ip="{{- .Values.endpoints.compute_metadata.ip.ingress -}}" if [ -z "${metadata_ip}" ] ; then metadata_ip=$(getent hosts metadata | awk '{print $1}') fi @@ -27,4 +27,3 @@ cat </tmp/pod-shared/nova-api-metadata.ini [DEFAULT] metadata_host=$metadata_ip EOF - diff --git a/nova/templates/configmap-etc.yaml b/nova/templates/configmap-etc.yaml index e7663f066e..1645b35ea1 100644 --- a/nova/templates/configmap-etc.yaml +++ b/nova/templates/configmap-etc.yaml @@ -103,10 +103,8 @@ limitations under the License. {{- tuple "oslo_cache" "internal" "memcache" . | include "helm-toolkit.endpoints.host_and_port_endpoint_uri_lookup" | set .Values.conf.nova.cache "memcache_servers" | quote | trunc 0 -}} {{- end -}} -{{- if empty .Values.conf.nova.DEFAULT.metadata_host -}} -{{- if .Values.network.metadata.ip -}} -{{- set .Values.conf.nova.DEFAULT "metadata_host" .Values.network.metadata.ip | quote | trunc 0 -}} -{{- end -}} +{{- if and (empty .Values.conf.nova.DEFAULT.metadata_host) .Values.endpoints.compute_metadata.ip.ingress -}} +{{- set .Values.conf.nova.DEFAULT "metadata_host" .Values.endpoints.compute_metadata.ip.ingress | quote | trunc 0 -}} {{- end -}} {{- if empty .Values.conf.nova.DEFAULT.metadata_port -}} diff --git a/nova/templates/service-ingress-metadata.yaml b/nova/templates/service-ingress-metadata.yaml index fecc0adfca..ee4ac7ae1c 100644 --- a/nova/templates/service-ingress-metadata.yaml +++ b/nova/templates/service-ingress-metadata.yaml @@ -14,22 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */}} -{{- if .Values.manifests.service_ingress_metadata }} -{{- $envAll := . }} -{{- if .Values.network.metadata.ingress.public }} ---- -apiVersion: v1 -kind: Service -metadata: - name: {{ tuple "compute_metadata" "public" . | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }} -spec: - ports: - - name: http - port: 80 -{{- if .Values.network.metadata.ip }} - clusterIP: {{ .Values.network.metadata.ip }} -{{- end }} - selector: - app: ingress-api -{{- end }} +{{- if and .Values.manifests.service_ingress_metadata .Values.network.metadata.ingress.public }} +{{- $serviceIngressOpts := dict "envAll" . "backendServiceType" "compute_metadata" -}} +{{ $serviceIngressOpts | include "helm-toolkit.manifests.service_ingress" }} {{- end }} diff --git a/nova/templates/service-ingress-osapi.yaml b/nova/templates/service-ingress-osapi.yaml index aff81afda3..98bff28c1c 100644 --- a/nova/templates/service-ingress-osapi.yaml +++ b/nova/templates/service-ingress-osapi.yaml @@ -14,19 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */}} -{{- if .Values.manifests.service_ingress_osapi }} -{{- $envAll := . }} -{{- if .Values.network.osapi.ingress.public }} ---- -apiVersion: v1 -kind: Service -metadata: - name: {{ tuple "compute" "public" . | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }} -spec: - ports: - - name: http - port: 80 - selector: - app: ingress-api -{{- end }} +{{- if and .Values.manifests.service_ingress_osapi .Values.network.osapi.ingress.public }} +{{- $serviceIngressOpts := dict "envAll" . "backendServiceType" "compute" -}} +{{ $serviceIngressOpts | include "helm-toolkit.manifests.service_ingress" }} {{- end }} diff --git a/nova/templates/service-ingress-placement.yaml b/nova/templates/service-ingress-placement.yaml index ab5a269c1f..91f559b2a7 100644 --- a/nova/templates/service-ingress-placement.yaml +++ b/nova/templates/service-ingress-placement.yaml @@ -14,19 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */}} -{{- if .Values.manifests.service_ingress_placement }} -{{- $envAll := . }} -{{- if .Values.network.placement.ingress.public }} ---- -apiVersion: v1 -kind: Service -metadata: - name: {{ tuple "placement" "public" . | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }} -spec: - ports: - - name: http - port: 80 - selector: - app: ingress-api -{{- end }} +{{- if and .Values.manifests.service_ingress_placement .Values.network.placement.ingress.public }} +{{- $serviceIngressOpts := dict "envAll" . "backendServiceType" "placement" -}} +{{ $serviceIngressOpts | include "helm-toolkit.manifests.service_ingress" }} {{- end }} diff --git a/nova/values.yaml b/nova/values.yaml index e2f0d92551..2bf0d9089e 100644 --- a/nova/values.yaml +++ b/nova/values.yaml @@ -138,8 +138,6 @@ network: enabled: false port: 30774 metadata: - # IF blank, set clusterIP and metadata_host dynamically - ip: port: 8775 ingress: public: true @@ -1254,6 +1252,9 @@ endpoints: default: 6080 compute_metadata: name: nova + ip: + # IF blank, set clusterIP and metadata_host dynamically + ingress: null hosts: default: nova-metadata public: metadata diff --git a/senlin/templates/service-ingress-api.yaml b/senlin/templates/service-ingress-api.yaml index f7cc6f023e..55b1570e48 100644 --- a/senlin/templates/service-ingress-api.yaml +++ b/senlin/templates/service-ingress-api.yaml @@ -14,19 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */}} -{{- if .Values.manifests.service_ingress_api }} -{{- $envAll := . }} -{{- if .Values.network.api.ingress.public }} ---- -apiVersion: v1 -kind: Service -metadata: - name: {{ tuple "clustering" "public" . | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }} -spec: - ports: - - name: http - port: 80 - selector: - app: ingress-api -{{- end }} +{{- if and .Values.manifests.service_ingress_api .Values.network.api.ingress.public }} +{{- $serviceIngressOpts := dict "envAll" . "backendServiceType" "clustering" -}} +{{ $serviceIngressOpts | include "helm-toolkit.manifests.service_ingress" }} {{- end }}