blob: b995fdc6af0010d45b4443650fecef33c217cf89 [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_api }}
16{{- $envAll := . }}
17---
18apiVersion: v1
19kind: Service
20metadata:
21 name: {{ tuple "key-manager" "internal" . | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }}
22spec:
23 ports:
24 - name: b-api
Oleksandr Kozachenkoa10d7852023-02-02 22:01:16 +010025 port: {{ tuple "key-manager" "service" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
Mohammed Naserf3f59a72023-01-15 21:02:04 -050026 {{ if .Values.network.api.node_port.enabled }}
27 nodePort: {{ .Values.network.api.node_port.port }}
28 {{ end }}
29 selector:
30{{ tuple $envAll "barbican" "api" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 4 }}
31 {{ if .Values.network.api.node_port.enabled }}
32 type: NodePort
33 {{ if .Values.network.api.external_policy_local }}
34 externalTrafficPolicy: Local
35 {{ end }}
36 {{ end }}
37{{- end }}