@@ -30,9 +30,9 @@ To access your YOURLS site from outside the cluster follow the steps below:
30
30
31
31
1. Get the YOURLS URL and associate YOURLS hostname to your cluster external IP:
32
32
33
- export CLUSTER_IP=$(minikube ip) # On Minikube. Use: `kubectl cluster-info` on others K8s clusters
34
- echo "YOURLS URL: http{{ if .Values.ingress.tls }}s{{ end }}://{{ .Values.ingress.hostname }}/"
35
- echo "$CLUSTER_IP {{ .Values.ingress.hostname }}" | sudo tee -a /etc/hosts
33
+ export CLUSTER_IP=$(minikube ip) # On Minikube. Use: `kubectl cluster-info` on others K8s clusters
34
+ echo "YOURLS URL: http{{ if .Values.ingress.tls }}s{{ end }}://{{ .Values.ingress.hostname }}/"
35
+ echo "$CLUSTER_IP {{ .Values.ingress.hostname }}" | sudo tee -a /etc/hosts
36
36
37
37
{{- else }}
38
38
{{- $port := .Values.service.port | toString }}
@@ -41,25 +41,25 @@ To access your YOURLS site from outside the cluster follow the steps below:
41
41
42
42
{{- if contains "NodePort" .Values.service.type }}
43
43
44
- export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ template "common.names.fullname" . }})
45
- export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
46
- echo "YOURLS URL: http://$NODE_IP:$NODE_PORT/"
47
- echo "YOURLS Admin URL: http://$NODE_IP:$NODE_PORT/admin"
44
+ export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ template "common.names.fullname" . }})
45
+ export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
46
+ echo "YOURLS URL: http://$NODE_IP:$NODE_PORT/"
47
+ echo "YOURLS Admin URL: http://$NODE_IP:$NODE_PORT/admin"
48
48
49
49
{{- else if contains "LoadBalancer" .Values.service.type }}
50
50
51
51
NOTE: It may take a few minutes for the LoadBalancer IP to be available.
52
52
Watch the status with: 'kubectl get svc --namespace {{ .Release.Namespace }} -w {{ template "common.names.fullname" . }}'
53
53
54
- export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ template "common.names.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}")
55
- echo "YOURLS URL: http://$SERVICE_IP{{- if ne $port "80" }}:{{ .Values.service.port }}{{ end }}/"
56
- echo "YOURLS Admin URL: http://$SERVICE_IP{{- if ne $port "80" }}:{{ .Values.service.port }}{{ end }}/admin"
54
+ export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ template "common.names.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}")
55
+ echo "YOURLS URL: http://$SERVICE_IP{{- if ne $port "80" }}:{{ .Values.service.port }}{{ end }}/"
56
+ echo "YOURLS Admin URL: http://$SERVICE_IP{{- if ne $port "80" }}:{{ .Values.service.port }}{{ end }}/admin"
57
57
58
58
{{- else if contains "ClusterIP" .Values.service.type }}
59
59
60
- kubectl port-forward --namespace {{ .Release.Namespace }} svc/{{ template "common.names.fullname" . }} {{ .Values.service.port }}:{{ .Values.service.port }} &
61
- echo "YOURLS URL: http://127.0.0.1{{- if ne $port "80" }}:{{ .Values.service.port }}{{ end }}/"
62
- echo "YOURLS Admin URL: http://127.0.0.1{{- if ne $port "80" }}:{{ .Values.service.port }}{{ end }}/admin"
60
+ kubectl port-forward --namespace {{ .Release.Namespace }} svc/{{ template "common.names.fullname" . }} {{ .Values.service.port }}:{{ .Values.service.port }} &
61
+ echo "YOURLS URL: http://127.0.0.1{{- if ne $port "80" }}:{{ .Values.service.port }}{{ end }}/"
62
+ echo "YOURLS Admin URL: http://127.0.0.1{{- if ne $port "80" }}:{{ .Values.service.port }}{{ end }}/admin"
63
63
64
64
{{- end }}
65
65
{{- end }}
@@ -68,8 +68,8 @@ To access your YOURLS site from outside the cluster follow the steps below:
68
68
69
69
3. Login with the following credentials below to see your app:
70
70
71
- echo Username: $(kubectl get secret --namespace {{ .Release.Namespace }} {{ template "common.names.fullname" . }} -o jsonpath="{.data.username}" | base64 --decode)
72
- echo Password: $(kubectl get secret --namespace {{ .Release.Namespace }} {{ template "common.names.fullname" . }} -o jsonpath="{.data.password}" | base64 --decode)
71
+ echo Username: $(kubectl get secret --namespace {{ .Release.Namespace }} {{ template "common.names.fullname" . }} -o jsonpath="{.data.username}" | base64 --decode)
72
+ echo Password: $(kubectl get secret --namespace {{ .Release.Namespace }} {{ template "common.names.fullname" . }} -o jsonpath="{.data.password}" | base64 --decode)
73
73
74
74
{{- if .Values.metrics.enabled }}
75
75
@@ -91,14 +91,11 @@ You can access Apache Prometheus metrics following the steps below:
91
91
{{- include "common.warnings.rollingTag" .Values.volumePermissions.image }}
92
92
{{- $passwordValidationErrors := list -}}
93
93
{{- if not .Values.yourls.existingSecret -}}
94
- {{- $yourlsSecretName := include "yourls.secretName" . -}}
95
- {{- $yourlsPassword := dict "valueKey" "yourls.password" "secret" $yourlsSecretName "field" "password" "context" $ -}}
96
- {{- $yourlsPasswordValidationErrors := include "common.validations.values.single.empty" $yourlsPassword -}}
94
+ {{- $yourlsPasswordValidationErrors := include "common.validations.values.single.empty" (dict "valueKey" "yourls.password" "secret" (include "yourls.secretName" .) "field" "password" "context" $) -}}
97
95
{{- $passwordValidationErrors = append $passwordValidationErrors $yourlsPasswordValidationErrors -}}
98
96
{{- end }}
99
97
{{- if .Values.mariadb.enabled }}
100
- {{- $mariadbSecretName := include "yourls.databaseSecretName" . -}}
101
- {{- $mariadbPasswordValidationErrors := include "common.validations.values.mariadb.passwords" (dict "secret" $mariadbSecretName "subchart" true "context" $) -}}
98
+ {{- $mariadbPasswordValidationErrors := include "common.validations.values.mariadb.passwords" (dict "secret" (include "yourls.databaseSecretName" .) "subchart" true "context" $) -}}
102
99
{{- $passwordValidationErrors = append $passwordValidationErrors $mariadbPasswordValidationErrors -}}
103
100
{{- end }}
104
101
{{- include "common.errors.upgrade.passwords.empty" (dict "validationErrors" $passwordValidationErrors "context" $) -}}
0 commit comments