mirror of
https://github.com/helm/charts.git
synced 2026-09-05 12:27:30 +00:00
* Parameterized the target port for https The use case is when you need to go HTTPS -> ELB -> HTTP -> Wordpress. Bumped chart version. Updated readme to include service Includes annotations for httpsTargetPort Signed-off-by: Matt Gardner <hi@mattgardner.me> * Updated documentation and added annotations to values. Signed-off-by: Matt Gardner <hi@mattgardner.com> * Updated chart version and removed redundant default value Signed-off-by: Matt Gardner <hi@mattgardner.com>
51 lines
1.9 KiB
YAML
51 lines
1.9 KiB
YAML
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: {{ template "wordpress.fullname" . }}
|
|
labels:
|
|
app: "{{ template "wordpress.fullname" . }}"
|
|
chart: "{{ template "wordpress.chart" . }}"
|
|
release: {{ .Release.Name | quote }}
|
|
heritage: {{ .Release.Service | quote }}
|
|
annotations:
|
|
{{- if .Values.service.annotations }}
|
|
{{ toYaml .Values.service.annotations | indent 4 }}
|
|
{{- end }}
|
|
spec:
|
|
type: {{ .Values.service.type }}
|
|
{{- if (or (eq .Values.service.type "LoadBalancer") (eq .Values.service.type "NodePort")) }}
|
|
externalTrafficPolicy: {{ .Values.service.externalTrafficPolicy | quote }}
|
|
{{- end }}
|
|
ports:
|
|
- name: http
|
|
port: {{ .Values.service.port }}
|
|
targetPort: http
|
|
{{- if (and (eq .Values.service.type "NodePort") (not (empty .Values.service.nodePorts.http)))}}
|
|
nodePort: {{ .Values.service.nodePorts.http }}
|
|
{{- else if eq .Values.service.type "ClusterIP" }}
|
|
nodePort: null
|
|
{{- end }}
|
|
- name: https
|
|
port: {{ .Values.service.httpsPort }}
|
|
targetPort: {{ .Values.service.httpsTargetPort }}
|
|
{{- if (and (eq .Values.service.type "NodePort") (not (empty .Values.service.nodePorts.https)))}}
|
|
nodePort: {{ .Values.service.nodePorts.https }}
|
|
{{- else if eq .Values.service.type "ClusterIP" }}
|
|
nodePort: null
|
|
{{- end }}
|
|
{{- if .Values.metrics.enabled }}
|
|
- name: metrics
|
|
port: {{ .Values.service.metricsPort }}
|
|
targetPort: metrics
|
|
{{- if (and (eq .Values.service.type "NodePort") (not (empty .Values.service.nodePorts.metrics)))}}
|
|
nodePort: {{ .Values.service.nodePorts.metrics }}
|
|
{{- else if eq .Values.service.type "ClusterIP" }}
|
|
nodePort: null
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- if .Values.service.extraPorts }}
|
|
{{ toYaml .Values.service.extraPorts | indent 4 }}
|
|
{{- end }}
|
|
selector:
|
|
app: "{{ template "wordpress.fullname" . }}"
|