blob: c7075b10a7b29a5028db1cdbff02c0bb053caff8 [file] [log] [blame]
Mohammed Naserf3f59a72023-01-15 21:02:04 -05001{{/*
2Licensed under the Apache License, Version 2.0 (the "License");
3you may not use this file except in compliance with the License.
4You may obtain a copy of the License at
5
6 http://www.apache.org/licenses/LICENSE-2.0
7
8Unless required by applicable law or agreed to in writing, software
9distributed under the License is distributed on an "AS IS" BASIS,
10WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11See the License for the specific language governing permissions and
12limitations under the License.
13*/}}
14
15{{- if .Values.manifests.service_server }}
16{{- $envAll := . }}
17---
18apiVersion: v1
19kind: Service
20metadata:
21 name: {{ tuple "network" "internal" . | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }}
22spec:
23 ports:
24 - name: q-api
25 port: {{ tuple "network" "service" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
26 {{ if .Values.network.server.node_port.enabled }}
27 nodePort: {{ .Values.network.server.node_port.port }}
28 {{ end }}
Rico Lin71132432024-07-03 02:15:57 +080029 - name: q-policy
30 port: {{ tuple "network" "service" "policy_server" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
31 {{ if .Values.network.server.node_port.enabled }}
32 nodePort: {{ .Values.network.server.node_port.port }}
33 {{ end }}
Mohammed Naserf3f59a72023-01-15 21:02:04 -050034 selector:
35{{ tuple $envAll "neutron" "server" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 4 }}
36 {{ if .Values.network.server.node_port.enabled }}
37 type: NodePort
38 {{ if .Values.network.server.external_policy_local }}
39 externalTrafficPolicy: Local
40 {{ end }}
41 {{ end }}
42{{- end }}