-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs(operator-wand): Add a local-development.md (#79)
- Loading branch information
1 parent
9042ace
commit 10d44ec
Showing
1 changed file
with
98 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
# Helm Chart Operator Development Guide | ||
|
||
This guide provides instructions for local development and testing of the Helm chart operator for the `wandb/helm-charts` repository. It includes setup instructions, development workflow, and guidelines for contributing to the repository. | ||
|
||
## Prerequisites | ||
|
||
- Helm (3.x+) | ||
- kubectl (configured with access to your Kubernetes cluster) | ||
- AWS CLI (configured with the necessary permissions) | ||
- Azure CLI | ||
- Google Cloud SDK | ||
|
||
## Setup | ||
|
||
### 1. Cloud Provider Login | ||
|
||
#### AWS | ||
|
||
Update your kube-context for the EKS cluster: | ||
|
||
```bash | ||
aws eks update-kubeconfig --name smooth-operator --region us-west-2 | ||
``` | ||
|
||
#### Azure | ||
|
||
Log in to Azure CLI: | ||
|
||
```bash | ||
az login | ||
az account set --subscription <Subscription_ID> | ||
az aks get-credentials --resource-group <Resource_Group_Name> --name <AKS_Cluster_Name> | ||
``` | ||
|
||
|
||
#### GCP | ||
|
||
Authenticate with the Google Cloud SDK: | ||
|
||
```bash | ||
gcloud auth login | ||
gcloud container clusters get-credentials YOUR_CLUSTER_NAME --zone YOUR_ZONE --project YOUR_PROJECT | ||
``` | ||
|
||
### 2. Clone the Helm Charts Repository | ||
|
||
Clone the `wandb/helm-charts` repository: | ||
|
||
```bash | ||
git clone https://github.com/wandb/helm-charts.git | ||
cd helm-charts | ||
``` | ||
|
||
### 3. Initial Setup for Development | ||
|
||
Extract the current values from the deployed Helm chart and scale down the `wandb-controller-manager` deployment: | ||
|
||
```bash | ||
helm get values wandb > operator-spec.yaml | ||
kubectl scale --replicas=0 deployment -n wandb wandb-controller-manager | ||
``` | ||
|
||
### 4. Develop and Test Your Changes | ||
|
||
After extracting the current chart values into `operator-spec.yaml`, you can start making your changes to the chart or the operator specifications. | ||
|
||
#### Building Dependencies | ||
|
||
Before deploying your changes, ensure that any chart dependencies are updated: | ||
|
||
```bash | ||
helm dependency build ./charts/operator-wandb | ||
``` | ||
|
||
#### Upgrading the Helm Release | ||
|
||
To apply your changes, upgrade the Helm release with your modified specifications: | ||
|
||
```bash | ||
helm upgrade \ | ||
--install wandb \ | ||
./charts/operator-wandb -f ./operator-spec.yaml | ||
``` | ||
|
||
### 5. Finalizing Development | ||
|
||
After completing your development work: | ||
|
||
1. Ensure to increment the version in `Chart.yaml` of your Helm chart, e.g., `0.10.43`. | ||
2. Scale the `wandb-controller-manager` deployment back up: | ||
|
||
```bash | ||
kubectl scale --replicas=1 deployment -n wandb wandb-controller-manager | ||
``` | ||
|
||
## Contributing | ||
|
||
After testing your changes locally, submit a pull request with your modifications. Ensure your commits are well-documented, and your PR includes a summary of the changes and any testing performed. |