Skip to content

Commit

Permalink
fix: NOTES file
Browse files Browse the repository at this point in the history
  • Loading branch information
omidasadpour committed Feb 7, 2024
1 parent c5c93b3 commit 4847144
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions charts/rollups-node/templates/NOTES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,12 @@
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 {{ include "validator.fullname" . }}'
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "validator.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}")
echo http://$SERVICE_IP:4000/graphql
export SERVICE_NAME=$(kubectl get svc --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "validator.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
export SERVICE_PORT=$(kubectl get svc --namespace {{ .Release.Namespace }} $SERVICE_NAME -o jsonpath="{.spec.ports[0].port}")
echo http://$SERVICE_IP:$SERVICE_PORT/graphql
{{- else if contains "ClusterIP" .Values.validator.service.type }}
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "validator.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
export CONTAINER_PORT=$(kubectl get pod --namespace {{ .Release.Namespace }} $POD_NAME -o jsonpath="{.spec.containers[0].ports[0].containerPort}")
echo "Visit http://127.0.0.1:4000/graphql to use your application"
kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8080:$CONTAINER_PORT
export SERVICE_NAME=$(kubectl get svc --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "validator.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
export SERVICE_PORT=$(kubectl get svc --namespace {{ .Release.Namespace }} $SERVICE_NAME -o jsonpath="{.spec.ports[0].port}")
echo "Visit http://127.0.0.1:8080/graphql to use your application"
kubectl --namespace {{ .Release.Namespace }} port-forward svc/$SERVICE_NAME 8080:$SERVICE_PORT
{{- end }}

0 comments on commit 4847144

Please sign in to comment.