Files
helm-k3s/clusters/default/apps/drone/templates/drone-svc.yaml
2025-07-04 20:36:49 +05:30

23 lines
586 B
YAML

---
apiVersion: v1
kind: Service
metadata:
name: "{{ .Values.name }}-service"
namespace: {{ .Values.namespace }}
spec:
selector:
app.kubernetes.io/name: {{ .Values.name }}
{{- if eq .Values.service.type "LoadBalancer" }}
type: LoadBalancer
{{- else if eq .Values.service.type "NodePort" }}
type: NodePort
{{- end }}
ports:
- {{- if eq .Values.service.type "LoadBalancer" }}
port: {{ .Values.service.port }}
{{- else if eq .Values.service.type "NodePort" }}
nodePort: {{ .Values.service.nodePort }}
{{- end }}
targetPort: 80
protocol: TCP