config/kubernetes/applications/stx-openstack/stx-openstack-helm/stx-openstack-helm/keystone-api-proxy/templates/service.yaml

32 lines
985 B
YAML

{{/*
#
# Copyright (c) 2019 Wind River Systems, Inc.
#
# SPDX-License-Identifier: Apache-2.0
#
*/}}
{{- if .Values.manifests.service_api }}
{{- $envAll := . }}
---
apiVersion: v1
kind: Service
metadata:
name: {{ tuple "keystone-api-proxy" "internal" . | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }}
spec:
ports:
- name: ks-api-proxy
port: {{ tuple "keystone-api-proxy" "internal" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
{{ if .Values.network.keystone_api_proxy.node_port.enabled }}
nodePort: {{ .Values.network.keystone_api_proxy.node_port.port }}
{{ end }}
selector:
{{ tuple $envAll "dcorch" "keystone-api-proxy" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 4 }}
{{ if .Values.network.keystone_api_proxy.node_port.enabled }}
type: NodePort
{{ if .Values.network.keystone_api_proxy.external_policy_local }}
externalTrafficPolicy: Local
{{ end }}
{{ end }}
{{- end }}