Merge pull request #936 from bitnami/apacheSVC

[bitnami/apache] Add service.type to values.yaml
This commit is contained in:
Javier J. Salmerón-García
2018-11-21 13:34:14 +01:00
committed by GitHub
4 changed files with 47 additions and 8 deletions
+1 -1
View File
@@ -1,5 +1,5 @@
name: apache
version: 2.1.2
version: 3.0.0
appVersion: 2.4.37
description: Chart for Apache HTTP Server
keywords:
+8
View File
@@ -52,6 +52,14 @@ The following tables lists the configurable parameters of the Apache chart and t
| `image.tag` | Apache Image tag | `{VERSION}` |
| `image.pullPolicy` | Apache image pull policy | `Always` |
| `image.pullSecrets` | Specify image pull secrets | `nil` (does not add image pull secrets to deployed pods) |
| `service.type` | Kubernetes Service type | `LoadBalancer` |
| `service.port` | Service HTTP port | `80` |
| `service.httpsPort` | Service HTTPS port | `443` |
| `service.nodePorts.http` | Kubernetes http node port | `""` |
| `service.nodePorts.https` | Kubernetes https node port | `""` |
| `service.externalTrafficPolicy` | Enable client source IP preservation | `Cluster` |
| `service.loadBalancerIP` | LoadBalancer service IP address | `""` |
Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example,
+19 -7
View File
@@ -8,13 +8,25 @@ metadata:
release: "{{ .Release.Name }}"
heritage: "{{ .Release.Service }}"
spec:
type: LoadBalancer
type: {{ .Values.service.type }}
{{- if (or (eq .Values.service.type "LoadBalancer") (eq .Values.service.type "NodePort")) }}
externalTrafficPolicy: {{ .Values.service.externalTrafficPolicy | quote }}
{{- end }}
{{- if (and (eq .Values.service.type "LoadBalancer") (not (empty .Values.service.loadBalancerIP))) }}
loadBalancerIP: {{ .Values.service.loadBalancerIP }}
{{- end }}
ports:
- name: http
port: 80
targetPort: http
- name: https
port: 443
targetPort: https
- 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 }}
{{- end }}
- name: https
port: {{ .Values.service.httpsPort }}
targetPort: https
{{- if (and (eq .Values.service.type "NodePort") (not (empty .Values.service.nodePorts.https)))}}
nodePort: {{ .Values.service.nodePorts.https }}
{{- end }}
selector:
app: {{ template "fullname" . }}
+19
View File
@@ -21,3 +21,22 @@ image:
##
# pullSecrets:
# - myRegistrKeySecretName
service:
type: LoadBalancer
# HTTP Port
port: 80
# HTTPS Port
httpsPort: 443
##
## nodePorts:
## http: <to set explicitly, choose port between 30000-32767>
## https: <to set explicitly, choose port between 30000-32767>
## loadBalancerIP:
nodePorts:
http: ""
https: ""
## Enable client source IP preservation
## ref http://kubernetes.io/docs/tasks/access-application-cluster/create-external-load-balancer/#preserving-the-client-source-ip
##
externalTrafficPolicy: Cluster