Your commit message

This commit is contained in:
zeaslity
2024-11-27 10:33:20 +08:00
commit 080c7bb97f
911 changed files with 168439 additions and 0 deletions

View File

@@ -0,0 +1,34 @@
{{- $fullname := include "rabbitmq.fullname" . }}
{{- $labels := include "rabbitmq.labels" . }}
{{- $selectorLabels := include "rabbitmq.selectorLabels" . }}
{{- range $service := .Values.extraServices }}
apiVersion: v1
kind: Service
metadata:
name: {{ $fullname }}-{{ $service.name }}
labels:
{{- $labels | nindent 4 }}
{{- with $service.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
type: {{ $service.type }}
ports:
- port: {{ $service.port }}
targetPort: {{ $service.name }}
protocol: {{ $service.protocol }}
name: {{ $service.name }}
{{- if and ( or (eq $service.type "LoadBalancer") (eq $service.type "NodePort") ) ($service.nodePort) }}
nodePort: {{ $service.nodePort }}
{{- end }}
{{- if and (eq $service.type "LoadBalancer") ($service.loadBalancerIP) }}
loadBalancerIP: {{ $service.loadBalancerIP }}
{{- end }}
{{- if $service.clusterIP }}
clusterIP: {{ $service.clusterIP }}
{{- end }}
selector:
{{- $selectorLabels | nindent 4 }}
---
{{- end }}