diff --git a/bitnami/wildfly/Chart.yaml b/bitnami/wildfly/Chart.yaml index c98d7ab2ba..f9c5c32ba5 100644 --- a/bitnami/wildfly/Chart.yaml +++ b/bitnami/wildfly/Chart.yaml @@ -1,5 +1,5 @@ name: wildfly -version: 1.1.1 +version: 2.0.0 appVersion: 14.0.1 description: Chart for Wildfly keywords: diff --git a/bitnami/wildfly/README.md b/bitnami/wildfly/README.md index d47e5ffee5..bfd776b82c 100644 --- a/bitnami/wildfly/README.md +++ b/bitnami/wildfly/README.md @@ -55,7 +55,13 @@ The following tables lists the configurable parameters of the WildFly chart and | `image.pullSecrets` | Specify image pull secrets | `nil` (does not add image pull secrets to deployed pods) | | `wildflyUsername` | WildFly admin user | `user` | | `wildflyPassword` | WildFly admin password | _random 10 character alphanumeric string_ | -| `serviceType` | Kubernetes Service type | `LoadBalancer` | +| `service.type` | Kubernetes Service type | `LoadBalancer` | +| `service.port` | Service HTTP port | `80` | +| `service.mgmtPort` | Service Management port | `9990` | +| `service.nodePorts.http` | Kubernetes http node port | `""` | +| `service.nodePorts.mgmt` | Kubernetes management node port | `""` | +| `service.externalTrafficPolicy` | Enable client source IP preservation | `Cluster` | +| `service.loadBalancerIP` | LoadBalancer service IP address | `""` | | `persistence.enabled` | Enable persistence using PVC | `true` | | `persistence.storageClass` | PVC Storage Class for WildFly volume | `nil` (uses alpha storage class annotation) | | `persistence.accessMode` | PVC Access Mode for WildFly volume | `ReadWriteOnce` | diff --git a/bitnami/wildfly/templates/NOTES.txt b/bitnami/wildfly/templates/NOTES.txt index e6f5f777a8..14ff56213f 100644 --- a/bitnami/wildfly/templates/NOTES.txt +++ b/bitnami/wildfly/templates/NOTES.txt @@ -3,24 +3,25 @@ 1. Get the WildFly 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 "fullname" . }}) export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}") echo 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 "fullname" . }} service before proceeding ** ** Watch the status using: kubectl get svc --namespace {{ .Release.Namespace }} -w {{ template "fullname" . }} ** export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ template "fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}") - echo URL : http://$SERVICE_IP/ - echo Management Url : http://$SERVICE_IP:9990/ -{{- else if contains "ClusterIP" .Values.serviceType }} +{{- $port:=.Values.service.port | toString }} + echo URL : http://$SERVICE_IP{{- if ne $port "80" }}:{{ .Values.service.port }}{{ end }}/ + echo Management Url : http://$SERVICE_IP:{{ .Values.service.mgmtPort }}/ +{{- else if contains "ClusterIP" .Values.service.type }} echo URL : http://127.0.0.1:8080/ echo Management URL : http://127.0.0.1:9990/ - kubectl port-forward --namespace {{ .Release.Namespace }} svc/{{ template "fullname" . }} 8080:8080 9990:9990 + kubectl port-forward --namespace {{ .Release.Namespace }} svc/{{ template "fullname" . }} 8080:{{ .Values.service.port}} 9990:{{ .Values.service.mgmtPort }} {{- end }} 2. Login with the following credentials diff --git a/bitnami/wildfly/templates/svc.yaml b/bitnami/wildfly/templates/svc.yaml index 6be072b6b1..f6f24642e0 100644 --- a/bitnami/wildfly/templates/svc.yaml +++ b/bitnami/wildfly/templates/svc.yaml @@ -8,13 +8,25 @@ 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 }} + {{- if (and (eq .Values.service.type "LoadBalancer") (not (empty .Values.service.loadBalancerIP))) }} + loadBalancerIP: {{ .Values.service.loadBalancerIP }} + {{- end }} ports: - name: http - port: 80 + 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: mgmt - port: 9990 + port: {{ .Values.service.mgmtPort}} targetPort: mgmt + {{- if (and (eq .Values.service.type "NodePort") (not (empty .Values.service.nodePorts.mgmt)))}} + nodePort: {{ .Values.service.nodePorts.mgmt }} + {{- end }} selector: app: {{ template "fullname" . }} diff --git a/bitnami/wildfly/values.yaml b/bitnami/wildfly/values.yaml index 38f02a786b..cd0bde2d2d 100644 --- a/bitnami/wildfly/values.yaml +++ b/bitnami/wildfly/values.yaml @@ -41,7 +41,24 @@ wildflyUsername: user ## Kubernetes configuration ## For minikube, set this to NodePort, elsewhere use LoadBalancer ## -serviceType: LoadBalancer +service: + type: LoadBalancer + # HTTP Port + port: 80 + # Management Port + mgmtPort: 9990 + ## + ## loadBalancerIP: + ## nodePorts: + ## http: + ## mgmt: + nodePorts: + http: "" + mgmt: "" + ## 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/