Skip to content

Commit

Permalink
Typos, clarification, oh my
Browse files Browse the repository at this point in the history
  • Loading branch information
AnchorArray committed Jan 19, 2024
1 parent e406b6d commit 6dd9675
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 23 deletions.
46 changes: 39 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,40 +2,72 @@

## 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.
# Set these to as desired
release="${chart_name}"
namespace="${release}"


# Downloads <chart_name>-<chart_version>.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 <release-name> <chart>` 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}"
```
```
36 changes: 20 additions & 16 deletions charts/langkit/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -70,32 +72,34 @@ 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` | |
| nodeSelector | object | `{}` | |
| 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=<langkit-api-key> |
| secrets.whylabsApiKey | string | `"whylabs-api-key"` | from-literal=WHYLABS_API_KEY=<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` | |
Expand Down

0 comments on commit 6dd9675

Please sign in to comment.