Files
devops-infra-helm-charts-gcp/helm-templates/victoria-metrics-cluster-latest/templates/service-external-name.yaml
T
2026-08-26 03:39:42 +05:30

23 lines
823 B
YAML

{{- $ctx := dict "helm" . }}
{{- $app := .Values.vmselect }}
{{- if and (kindIs "map" $app) $app.enabled ($app.service).enabled (default false $app.splitService) }}
{{- if ($app.externalService).enabled }}
{{- $service := $app.service }}
{{- $_ := set $ctx "extraLabels" $service.labels }}
{{- $_ := set $ctx "appKey" "vmselect" }}
{{- $fullname := include "vm.plain.fullname" $ctx }}
apiVersion: v1
kind: Service
metadata:
{{- with $service.annotations }}
annotations: {{ toYaml . | nindent 4 }}
{{- end }}
labels: {{ include "vm.labels" $ctx | nindent 4 }}
{{- $_ := unset $ctx "extraLabels" }}
name: {{ $app.externalService.name}}
namespace: {{ include "vm.namespace" $ }}
spec:
type: ExternalName
externalName: {{ $fullname }}.{{ include "vm.namespace" $ }}.svc.cluster.local
{{- end }}
{{- end }}