From 6dd9675bc9c9e78f08569dd43502cd6712e7be72 Mon Sep 17 00:00:00 2001 From: AnchorArray Date: Thu, 18 Jan 2024 18:39:01 -0700 Subject: [PATCH] Typos, clarification, oh my --- README.md | 46 ++++++++++++++++++++++++++++++++++------ charts/langkit/README.md | 36 +++++++++++++++++-------------- 2 files changed, 59 insertions(+), 23 deletions(-) diff --git a/README.md b/README.md index 45d6fbf..27ddc4d 100644 --- a/README.md +++ b/README.md @@ -2,10 +2,34 @@ ## How to use WhyLabs Helm repository +### Example Using the [LangKit Helm Chart](./charts/langkit/) + +#### Quick Start +```shell +helm pull \ + oci://ghcr.io/whylabs/langkit \ + --version "0.2.0" + +helm diff upgrade \ + --allow-unreleased \ + `# set namespace.create to false if the target namespace already exists` \ + --set namespace.create=false \ + --namespace langkit \ + langkit langkit-0.2.0.tgz + +helm upgrade --install \ + `# set namespace.create to false if the target namespace already exists` \ + --set namespace.create=false \ + --namespace langkit \ + langkit langkit-0.2.0.tgz +``` + +#### Extended Example ```shell +# Configure local variables for clarity and simplicity helm_repo="ghcr.io/whylabs" chart_name="langkit" -chart_version="0.1.0" +chart_version="0.2.0" chart="${chart_name}-${chart_version}.tgz" # Release and namespace values mirror other variables for simplicity. @@ -13,29 +37,37 @@ chart="${chart_name}-${chart_version}.tgz" release="${chart_name}" namespace="${release}" - # Downloads -.tgz to your current directory helm pull \ "oci://${helm_repo}/${chart_name}" \ --version "${chart_version}" +# Performs a diff between current and proposed state +# --allow-unreleased flag will perform a diff even if there is no current state, +# i.e. a fresh installation will display all net new resource creation in the diff. +# --set namespace.create=false must be set if target namespace already exists; +# omit this line or set it to "true" if the target namespace should be created. +# Requires the helm-diff plugin to be installed: +# helm plugin install https://github.com/databus23/helm-diff helm diff upgrade \ - `# --allow-unreleased will show a diff for a new install` \ --allow-unreleased \ `# set namespace.create to false if the target namespace already exists` \ --set namespace.create=false \ --namespace "${namespace}" \ - "${release}" . + "${release}" "${chart}" -# Specify the .tgz file as the na +# helm upgrade --install supports installation and upgrades. +# In the `helm upgrade --install ` command, the chart may be +# a chart reference('example/postgres'), a path to a chart directory, a fully qualified +# URL, or a packaged chart (which is what this example uses) helm upgrade --install \ `# set namespace.create to false if the target namespace already exists` \ --set namespace.create=false \ --namespace "${namespace}" \ - "${release}" . + "${release}" "${chart}" # Uninstall helm uninstall \ --namespace "${namespace}" \ "${release}" -``` \ No newline at end of file +``` diff --git a/charts/langkit/README.md b/charts/langkit/README.md index 8181390..c055a5f 100644 --- a/charts/langkit/README.md +++ b/charts/langkit/README.md @@ -21,32 +21,34 @@ kubectl create secret generic langkit-api-secret \ ## Usage ### Template +Display the full YAML manifests as they will be applied. + ```shell # This will use the "langkit" namespace helm template --namespace langkit langkit . ``` ### Diff +View the difference between the current state and desired state. + ```shell # Requires the helm-diff plugin to be installed: # helm plugin install https://github.com/databus23/helm-diff -helm diff \ +helm diff upgrade \ + --allow-unreleased \ `# do not create namespace if it already exists` \ --set namespace.create=false \ - --namespace langkit2 \ - --allow-unreleased \ - upgrade \ - langkit langkit-0.1.0.tgz + --namespace langkit \ + langkit langkit-0.2.0.tgz ``` ### Install/Update ```shell -helm upgrade \ +helm upgrade --install \ `# do not create namespace if it already exists` \ --set namespace.create=false \ --namespace langkit \ - --install \ - langkit langkit-0.1.0.tgz + langkit langkit-0.2.0.tgz ``` ### Uninstall @@ -70,16 +72,15 @@ helm-docs --dry-run | Key | Type | Default | Description | |-----|------|---------|-------------| -| affinity.podAntiAffinity.preferredDuringSchedulingIgnoredDuringExecution[0].podAffinityTerm.labelSelector.matchExpressions[0].key | string | `"app.kubernetes.io/name"` | | -| affinity.podAntiAffinity.preferredDuringSchedulingIgnoredDuringExecution[0].podAffinityTerm.labelSelector.matchExpressions[0].operator | string | `"In"` | | -| affinity.podAntiAffinity.preferredDuringSchedulingIgnoredDuringExecution[0].podAffinityTerm.labelSelector.matchExpressions[0].values[0] | string | `"langkit"` | | -| affinity.podAntiAffinity.preferredDuringSchedulingIgnoredDuringExecution[0].podAffinityTerm.topologyKey | string | `"kubernetes.io/hostname"` | | -| affinity.podAntiAffinity.preferredDuringSchedulingIgnoredDuringExecution[0].weight | int | `100` | | | fullnameOverride | string | `""` | | +| image.containerPort | int | `8000` | | | image.pullPolicy | string | `"IfNotPresent"` | | | image.repository | string | `"whylabs/whylogs"` | | | image.tag | string | `"py-llm-latest"` | | | imagePullSecrets | list | `[]` | | +| livenessProbe.initialDelaySeconds | int | `15` | | +| livenessProbe.periodSeconds | int | `10` | | +| livenessProbe.tcpSocket.port | int | `8000` | | | nameOverride | string | `""` | | | namespace.create | bool | `true` | | | namespace.name | string | `nil` | | @@ -87,15 +88,18 @@ helm-docs --dry-run | podAnnotations | object | `{}` | | | podLabels | object | `{}` | | | podSecurityContext | object | `{}` | | +| readinessProbe.initialDelaySeconds | int | `15` | | +| readinessProbe.periodSeconds | int | `10` | | +| readinessProbe.tcpSocket.port | int | `8000` | | | replicaCount | int | `3` | | | resources.limits.cpu | string | `"8"` | | | resources.limits.memory | string | `"16Gi"` | | | resources.requests.cpu | string | `"4"` | | | resources.requests.memory | string | `"8Gi"` | | -| secrets.langkitApiSecret | string | `"langkit-api-secret"` | from-literal=LANGKIT_API_KEY= | -| secrets.whylabsApiKey | string | `"whylabs-api-key"` | from-literal=WHYLABS_API_KEY= | +| secrets.langkitApiSecret | object | `{"name":"langkit-api-secret"}` | | +| secrets.whylabsApiKey | object | `{"name":"whylabs-api-key"}` | | | securityContext | object | `{}` | | -| service.port | int | `8000` | | +| service.port | int | `80` | | | service.type | string | `"ClusterIP"` | | | serviceAccount.annotations | object | `{}` | | | serviceAccount.automount | bool | `true` | |