Skip to content

Commit

Permalink
[stable/joomla] Improve notes to access deployed services (helm#7013)
Browse files Browse the repository at this point in the history
* Improve notes to access deployed services

* Add namespace to port-forward command

Signed-off-by: aba182 <ajwilhel@gmail.com>
  • Loading branch information
juan131 authored and aba182 committed Sep 7, 2018
1 parent 1ec6f3f commit 27e6ecd
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion stable/joomla/Chart.yaml
@@ -1,5 +1,5 @@
name: joomla
version: 2.0.7
version: 2.0.8
appVersion: 3.8.11
description: PHP content management system (CMS) for publishing web content
keywords:
Expand Down
11 changes: 6 additions & 5 deletions stable/joomla/templates/NOTES.txt
Expand Up @@ -19,20 +19,21 @@

export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ template "joomla.fullname" . }})
export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
echo http://$NODE_IP:$NODE_PORT/
echo "Joomla! URL: http://$NODE_IP:$NODE_PORT/"

{{- else if contains "LoadBalancer" .Values.service.type }}

NOTE: It may take a few minutes for the LoadBalancer IP to be available.
Watch the status with: 'kubectl get svc --namespace {{ .Release.Namespace }} -w {{ template "joomla.fullname" . }}'

export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ template "joomla.fullname" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
echo http://$SERVICE_IP/
echo "Joomla! URL: http://$SERVICE_IP/"

{{- else if contains "ClusterIP" .Values.service.type }}

export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ template "joomla.fullname" . }}" -o jsonpath="{.items[0].metadata.name}")
echo http://127.0.0.1:8080/
kubectl port-forward $POD_NAME 8080:80
echo "Joomla! URL: http://127.0.0.1:8080/"
kubectl port-forward --namespace {{ .Release.Namespace }} svc/{{ template "joomla.fullname" . }} 8080:80

{{- end }}
{{- end }}

Expand Down

0 comments on commit 27e6ecd

Please sign in to comment.