mirror of
https://github.com/h44z/wg-portal
synced 2025-02-26 05:49:14 +00:00
* Initial chart version * Add CI/CD for chart * Fix admin creds template * Add command, args, env, envFrom * Render volumes and volumeMounts with tpl * Change persistance accessMode type * Add update strategy config * Use custom types in docs * Add startup probe config * Fix web.external_url config
25 lines
1.4 KiB
Plaintext
25 lines
1.4 KiB
Plaintext
{{- $serviceName := printf "%s-web" (include "wg-portal.fullname" .) -}}
|
|
{{- $servicePort := .Values.service.web.port }}
|
|
|
|
{{- if not .Values.ingress.enabled }}
|
|
Get the application URL by running these commands:
|
|
{{- if eq "ClusterIP" .Values.service.web.type }}
|
|
kubectl --namespace {{ .Release.Namespace }} port-forward svc/{{ $serviceName }} {{ $servicePort }}:{{ $servicePort }}
|
|
|
|
Visit http://127.0.0.1:{{ $servicePort }} to use your application
|
|
|
|
{{- else if eq "LoadBalancer" .Values.service.web.type }}
|
|
NOTE: It may take a few minutes for the LoadBalancer IP to be available.
|
|
You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ $serviceName }}'
|
|
export SERVICE_IP=$(kubectl get --namespace {{ .Release.Namespace }} svc {{ $serviceName }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}")
|
|
echo http://$SERVICE_IP:{{ $servicePort }}
|
|
|
|
{{- else if eq "NodePort" .Values.service.web.type }}
|
|
export NODE_IP=$(kubectl get --namespace {{ .Release.Namespace }} nodes -o jsonpath="{.items[0].status.addresses[0].address}")
|
|
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} svc {{ $serviceName }} -o jsonpath="{.spec.ports[0].nodePort}" )
|
|
echo http://$NODE_IP:$NODE_PORT
|
|
{{- end }}
|
|
{{- else }}
|
|
Visit http{{ if .Values.ingress.tls }}s{{ end }}://{{ .Values.ingress.host }}{{ .Values.ingress.path }} to use your application
|
|
{{- end }}
|