Add ClusterIP and NodePort deployment
This commit is contained in:
parent
98c1114244
commit
fa9a9767c9
10 changed files with 525 additions and 31 deletions
34
helm/easyhaproxy/templates/service.yaml
Normal file
34
helm/easyhaproxy/templates/service.yaml
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
{{ if .Values.service.create }}
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
metadata:
|
||||
name: {{ include "easyhaproxy.fullname" . }}
|
||||
namespace: {{ .Release.Namespace }}
|
||||
labels:
|
||||
{{- include "easyhaproxy.labels" . | nindent 4 }}
|
||||
annotations:
|
||||
{{- toYaml .Values.service.annotations | nindent 4 }}
|
||||
spec:
|
||||
type: {{ .Values.service.type }}
|
||||
ports:
|
||||
- name: http
|
||||
port: 80
|
||||
{{ if eq .Values.service.type "NodePort" }}nodePort: {{ .Values.binding.ports.http }}{{ end }}
|
||||
- name: https
|
||||
port: 443
|
||||
{{ if eq .Values.service.type "NodePort" }}nodePort: {{ .Values.binding.ports.https }}{{ end }}
|
||||
- name: stats
|
||||
port: 1936
|
||||
{{ if eq .Values.service.type "NodePort" }}nodePort: {{ .Values.binding.ports.stats }}{{ end }}
|
||||
{{- range $port := .Values.binding.additionalPorts }}
|
||||
- name: extra{{ $port }}
|
||||
port: {{ $port }}
|
||||
{{ if eq $.Values.service.type "NodePort" }}nodePort: {{ $port }}{{ end }}
|
||||
{{- end }}
|
||||
|
||||
|
||||
selector:
|
||||
{{- include "easyhaproxy.selectorLabels" . | nindent 4 }}
|
||||
{{ end }}
|
||||
Loading…
Add table
Add a link
Reference in a new issue