Skip to content

Commit

Permalink
Additional documentation updates
Browse files Browse the repository at this point in the history
  • Loading branch information
AnchorArray committed Jan 26, 2024
1 parent 1166e08 commit 7e48514
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 18 deletions.
7 changes: 5 additions & 2 deletions charts/langkit/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,11 @@

### Credentials

Retrieve or [Create access tokens](https://docs.whylabs.ai/docs/whylabs-capabilities/#access-token-management)
which must be stored in Kubernetes `Secrets`.
Retrieve or [Create WhyLabs API Key](https://docs.whylabs.ai/docs/whylabs-capabilities/#access-token-management)
which must be stored in a `whylabs-api-key` Kubernetes secret, described below.

Generate a random value for the `langkit-api-secret` Kubernetes secret, also
described below. This is required to call into the container.

Use the the following commands to create the secrets in your Kubernets cluster.
Change the `--namespace` value if you will be deploying into a namespace other
Expand Down
31 changes: 15 additions & 16 deletions charts/langkit/templates/NOTES.txt
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
1. Get the application URL by running these commands:
{{- if contains "NodePort" .Values.service.type }}
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "langkit.fullname" . }})
export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
echo 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.
You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "langkit.fullname" . }}'
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "langkit.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}")
echo http://$SERVICE_IP:{{ .Values.service.port }}
{{- else if contains "ClusterIP" .Values.service.type }}
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "langkit.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:8080 to use your application"
kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8080:$CONTAINER_PORT
{{- end }}
Your Langkit application has been installed.

1. Verify the deployment:

kubectl get pods \
-n {{ .Release.Namespace }} \
-l app.kubernetes.io/instance={{ .Release.Name }}

2. Ensure that the {{ .Values.secrets.whylabsApiKey.name }} and {{ .Values.secrets.langkitApiSecret.name }} secrets exist in the {{ .Release.Namespace }} Namespace. If these secrets are added after the Helm chart is deployed or if they are updated, the deployment will need to be restarted:

kubectl rollout restart deployment \
-n {{ .Release.Namespace }} \
{{ include "langkit.fullname" . }}


0 comments on commit 7e48514

Please sign in to comment.