diff --git a/barbican/templates/service-ingress-api.yaml b/barbican/templates/service-ingress-api.yaml index c7001cd4..76c40661 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 03f99f18..559e97d5 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 6486758f..b21c0db0 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 d1a23f32..6fe2abcf 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 a36b45bc..c8656848 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 9f56e2ce..d614c5cf 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 690ef978..269a681f 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 6aedca46..36da627f 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 d0ef649f..437d38ba 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 af402ead..4134008a 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 00000000..859b4b11 --- /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 c300fb6d..b279e740 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 8b74b8cf..37ab0aa6 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 ae8678df..21d222c5 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 79546a64..113f67c7 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 b3e473f2..0c76f467 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 9ba0b0bd..ab472e8c 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 5610b879..bcb509e5 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 e7663f06..1645b35e 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 fecc0adf..ee4ac7ae 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 aff81afd..98bff28c 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 ab5a269c..91f559b2 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 e2f0d925..2bf0d908 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 f7cc6f02..55b1570e 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 }}