mirror of
https://github.com/bitnami/charts.git
synced 2026-03-08 08:47:24 +08:00
[stable/wildfly] Add service.port to values.yaml
Signed-off-by: Javier J. Salmeron Garcia <jsalmeron@bitnami.com>
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
name: wildfly
|
||||
version: 1.1.1
|
||||
version: 2.0.0
|
||||
appVersion: 14.0.1
|
||||
description: Chart for Wildfly
|
||||
keywords:
|
||||
|
||||
@@ -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` |
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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" . }}
|
||||
|
||||
@@ -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: <to set explicitly, choose port between 30000-32767>
|
||||
## mgmt: <to set explicitly, choose port between 30000-32767>
|
||||
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/
|
||||
|
||||
Reference in New Issue
Block a user