Skip to content

Commit

Permalink
fix chart notes
Browse files Browse the repository at this point in the history
Signed-off-by: Lance-Drane <[email protected]>
  • Loading branch information
Lance-Drane committed Aug 12, 2024
1 parent 644e340 commit 523860b
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 31 deletions.
17 changes: 9 additions & 8 deletions charts/broker-2-http/templates/NOTES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,30 +20,31 @@ Access the pod you want to debug by executing

In order to replicate the container startup scripts execute this command:

/docker-entrypoint.sh uvicorn --host=0.0.0.0 --port=8001 src.main:app
/app/bin

{{- else }}

{{- $port := .Values.service.port | toString }}
Get the base URL by running these commands:

{{- 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 {{ include "common.names.fullname" . }}'

export SERVICE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].port}" services {{ include "common.names.fullname" . }})
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "common.names.fullname" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
echo "http://${SERVICE_IP}:${SERVICE_PORT}"
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "common.names.fullname" . }} --template "{{ "{{ range (index .status.loadBalancer.ingress 0) }}{{ . }}{{ end }}" }}")
echo "Healthcheck URL: http://$SERVICE_IP{{- if ne $port "80" }}:{{ .Values.service.port }}{{ end }}/healthcheck"

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

export SERVICE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].port}" services {{ include "common.names.fullname" . }})
kubectl port-forward --namespace {{ .Release.Namespace }} svc/{{ include "common.names.fullname" . }} ${SERVICE_PORT}:${SERVICE_PORT} &
echo "http://127.0.0.1:${SERVICE_PORT}"
kubectl port-forward --namespace {{ .Release.Namespace }} svc/{{ include "common.names.fullname" . }} {{ .Values.service.port }}:{{ .Values.service.port }} &
echo "Healthcheck URL: http://127.0.0.1{{- if ne $port "80" }}:{{ .Values.service.port }}{{ end }}/healthcheck"

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

export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "common.names.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 "Healthcheck URL: http://${NODE_IP}:${NODE_PORT}/healthcheck"

{{- end }}
{{- end }}
Expand Down
2 changes: 1 addition & 1 deletion charts/broker-2-http/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ spec:
- name: PROXYAPP_APP_PORT
value: {{ .Values.containerPort | quote }}
- name: PROXYAPP_TOPIC_PREFIX
value: {{ required "app.config.topic_prefix not set (i.e. 'organization.facility.system')" .Values.app.topic_prefix | quote }}
value: {{ required "app.topic_prefix not set (i.e. 'organization.facility.system')" .Values.app.topic_prefix | quote }}
- name: PROXYAPP_APP_USERNAME
value: {{ .Values.app.username | quote }}
- name: PROXYAPP_APP_PASSWORD
Expand Down
25 changes: 3 additions & 22 deletions charts/http-2-broker/templates/NOTES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,32 +20,13 @@ Access the pod you want to debug by executing

In order to replicate the container startup scripts execute this command:

/docker-entrypoint.sh uvicorn --host=0.0.0.0 --port=8001 src.main:app
/app/bin

{{- else }}

{{- if contains "LoadBalancer" .Values.service.type }}
The chart is being deployed as normal. If the container is constantly restarting, please check to make sure you are connecting to
all appropriate backing services.

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 {{ include "common.names.fullname" . }}'

export SERVICE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].port}" services {{ include "common.names.fullname" . }})
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "common.names.fullname" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
echo "http://${SERVICE_IP}:${SERVICE_PORT}"

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

export SERVICE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].port}" services {{ include "common.names.fullname" . }})
kubectl port-forward --namespace {{ .Release.Namespace }} svc/{{ include "common.names.fullname" . }} ${SERVICE_PORT}:${SERVICE_PORT} &
echo "http://127.0.0.1:${SERVICE_PORT}"

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

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

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

{{- include "common.warnings.rollingTag" .Values.image }}

0 comments on commit 523860b

Please sign in to comment.