[stable/orangehrm] Add service.port in values.yaml (#9393)

* [stable/orangehrm] add service.type in values.yaml

Signed-off-by: Javier J. Salmeron Garcia <jsalmeron@bitnami.com>

* Add readme

Signed-off-by: Javier J. Salmeron Garcia <jsalmeron@bitnami.com>

* Update NOTES.txt

Signed-off-by: Javier J. Salmeron Garcia <jsalmeron@bitnami.com>

* Fix readme

Signed-off-by: Javier J. Salmeron Garcia <jsalmeron@bitnami.com>

* Fix lint

Signed-off-by: Javier J. Salmeron Garcia <jsalmeron@bitnami.com>

* Remove - in template

Signed-off-by: Javier J. Salmeron Garcia <jsalmeron@bitnami.com>
This commit is contained in:
Javier J. Salmerón-García
2018-11-20 08:29:36 -08:00
committed by k8s-ci-robot
parent c9e0bf092b
commit bb9f6ae32b
5 changed files with 49 additions and 17 deletions
+1 -1
View File
@@ -1,5 +1,5 @@
name: orangehrm
version: 3.2.2
version: 4.0.0
appVersion: 4.2.0-1
description: OrangeHRM is a free HR management system that offers a wealth of modules
to suit the needs of your business.
+6 -1
View File
@@ -62,7 +62,12 @@ The following table lists the configurable parameters of the OrangeHRM chart and
| `smtpUser` | SMTP user | `nil` |
| `smtpPassword` | SMTP password | `nil` |
| `smtpProtocol` | SMTP protocol [`ssl`, `none`] | `nil` |
| `serviceType` | Kubernetes Service type | `LoadBalancer` |
| `service.type` | Kubernetes Service type | `LoadBalancer` |
| `service.port` | Service HTTP port | `80` |
| `service.httpsPort` | Service HTTPS port | `443` |
| `service.externalTrafficPolicy` | Enable client source IP preservation | `Cluster` |
| `service.nodePorts.http` | Kubernetes http node port | `""` |
| `service.nodePorts.https` | Kubernetes https node port | `""` |
| `resources` | CPU/Memory resource requests/limits | Memory: `512Mi`, CPU: `300m` |
| `persistence.enabled` | Enable persistence using PVC | `true` |
| `persistence.apache.storageClass` | PVC Storage Class for Apache volume | `nil` (uses alpha storage class annotation) |
+8 -6
View File
@@ -4,24 +4,26 @@
1. Get the OrangeHRM URL by running:
{{- if contains "NodePort" .Values.serviceType }}
{{- if contains "NodePort" .Values.service.type }}
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ template "orangehrm.fullname" . }})
export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
echo "OrangeHRM URL: http://$NODE_IP:$NODE_PORT/"
{{- else if contains "LoadBalancer" .Values.serviceType }}
{{- else if contains "LoadBalancer" .Values.service.type }}
** Please ensure an external IP is associated to the {{ template "orangehrm.fullname" . }} service before proceeding **
** Watch the status using: kubectl get svc --namespace {{ .Release.Namespace }} -w {{ template "orangehrm.fullname" . }} **
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ template "orangehrm.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}")
echo "OrangeHRM URL: http://$SERVICE_IP/"
{{- else if contains "ClusterIP" .Values.serviceType }}
{{- $port:=.Values.service.port | toString }}
echo "OrangeHRM URL: http://$SERVICE_IP{{- if ne $port "80" }}:{{ .Values.service.port }}{{ end }}/"
{{- else if contains "ClusterIP" .Values.service.type }}
echo "OrangeHRM URL: http://127.0.0.1:8080/"
kubectl port-forward --namespace {{ .Release.Namespace }} svc/{{ template "orangehrm.fullname" . }} 8080:80
kubectl port-forward --namespace {{ .Release.Namespace }} svc/{{ template "orangehrm.fullname" . }} 8080:{{ .Values.service.port }}
{{- end }}
@@ -42,6 +44,6 @@ host. To configure OrangeHRM to use and external database host:
1. Complete your OrangeHRM deployment by running:
helm upgrade {{ .Release.Name }} --set serviceType={{ .Values.serviceType }},mariadb.enabled=false,externalDatabase.host=YOUR_EXTERNAL_DATABASE_HOST stable/orangehrm
helm upgrade {{ .Release.Name }} --set service.type={{ .Values.service.type }},mariadb.enabled=false,externalDatabase.host=YOUR_EXTERNAL_DATABASE_HOST stable/orangehrm
{{- end }}
+16 -7
View File
@@ -8,13 +8,22 @@ metadata:
release: "{{ .Release.Name }}"
heritage: "{{ .Release.Service }}"
spec:
type: {{ .Values.serviceType }}
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: 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 "orangehrm.fullname" . }}
+18 -2
View File
@@ -112,9 +112,25 @@ mariadb:
size: 8Gi
## Kubernetes configuration
## For minikube, set this to NodePort, elsewhere use LoadBalancer
## For minikube, set this to NodePort, elsewhere use LoadBalancer or ClusterIP
##
serviceType: LoadBalancer
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>
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
## Enable persistence using Persistent Volume Claims
## ref: http://kubernetes.io/docs/user-guide/persistent-volumes/