Skip to content

Commit

Permalink
Update documentation
Browse files Browse the repository at this point in the history
Signed-off-by: Heba Elayoty <hebaelayoty@gmail.com>
  • Loading branch information
helayoty committed May 3, 2024
1 parent 8cd0900 commit f451528
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 25 deletions.
31 changes: 16 additions & 15 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -152,21 +152,6 @@ vet: ## Run go vet against code.
lint: $(GOLANGCI_LINT)
$(GOLANGCI_LINT) run -v

## --------------------------------------
## Release
## To create a release, run `make release VERSION=x.y.z`
## --------------------------------------
.PHONY: release-manifest
release-manifest:
@sed -i -e 's/^VERSION ?= .*/VERSION ?= ${VERSION}/' ./Makefile
@sed -i -e "s/version: .*/version: ${IMG_TAG}/" ./charts/gpu-provisioner/Chart.yaml
@sed -i -e "s/appVersion: .*/appVersion: ${IMG_TAG}/" ./charts/gpu-provisioner/Chart.yaml
@sed -i -e "s/tag: .*/tag: ${IMG_TAG}/" ./charts/gpu-provisioner/values.yaml
@sed -i -e 's/gpu-provisioner: .*/gpu-provisioner:${IMG_TAG}/' ./charts/gpu-provisioner/README.md
git checkout -b release-${VERSION}
git add ./Makefile ./charts/gpu-provisioner/Chart.yaml ./charts/gpu-provisioner/values.yaml ./charts/gpu-provisioner/README.md
git commit -s -m "release: update manifest and helm charts for ${VERSION}"

## --------------------------------------
## Tests
## --------------------------------------
Expand All @@ -188,3 +173,19 @@ e2etests: ## Run the e2e suite against your local cluster
--ginkgo.timeout=${TEST_TIMEOUT} \
--ginkgo.grace-period=3m \
--ginkgo.vv

## --------------------------------------
## Release
## To create a release, run `make release VERSION=x.y.z`
## --------------------------------------
.PHONY: release-manifest
release-manifest:
@sed -i -e 's/^VERSION ?= .*/VERSION ?= ${VERSION}/' ./Makefile
@sed -i -e "s/version: .*/version: ${IMG_TAG}/" ./charts/gpu-provisioner/Chart.yaml
@sed -i -e "s/appVersion: .*/appVersion: ${IMG_TAG}/" ./charts/gpu-provisioner/Chart.yaml
@sed -i -e "s/tag: .*/tag: ${IMG_TAG}/" ./charts/gpu-provisioner/values.yaml
@sed -i -e 's/gpu-provisioner: .*/gpu-provisioner:${IMG_TAG}/' ./charts/gpu-provisioner/README.md
@sed -i -e 's/CHART_VERSION=.*/CHART_VERSION=${IMG_TAG}/' ./charts/gpu-provisioner/README.md
git checkout -b release-${VERSION}
git add ./Makefile ./charts/gpu-provisioner/Chart.yaml ./charts/gpu-provisioner/values.yaml ./charts/gpu-provisioner/README.md
git commit -s -m "release: update manifest and helm charts for ${VERSION}"
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ gpu-Provisioner is an [Azure Karpenter provider](https://github.com/Azure/karpen
It implements the cloud provider interfaces to realize the following abstraction:
`machine` -> `AKS agent pool` (with vmss and a hard limit of VM count to 1)

```
VERSION=v0.2.0 make docker-build
make az-identity-perm
make az-patch-helm
helm install gpu-provisioner /charts/gpu-provisioner --namespace gpu-provisioner --create-namespace
make az-federated-credential
```
You should have a running controller in `gpu-provisioner` namespace.
## Prerequisites
- An Azure subscription.
- An AKS cluster with [OIDC](https://learn.microsoft.com/en-us/azure/aks/use-oidc-issuer) addon installed. Please refer to the [Karpenter installation guide](https://karpenter.sh/docs/installation/) for more details.
-
## Install gpu-provisioner

Please check the installation guidance [here](./charts/gpu-provisioner/README.md).

```shell
## How to test
After deploying the controller successfully, one can apply the yaml in `/examples` to create a machine CR. A real node will be created and added to the cluster by the controller.

Expand Down
17 changes: 15 additions & 2 deletions charts/gpu-provisioner/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,20 @@ A Helm chart for gpu-provisioner
To install the chart with the release name `gpu-provisioner`:

```bash
helm install gpu-provisioner ./charts/gpu-provisioner --namespace gpu-provisioner --create-namespace
export CHART_VERSION=0.2.0
export CLUSTER_NAME=my-cluster
export AZURE_RESOURCE_GROUP=my-rg
export AZURE_SUBSCRIPTION_ID=my-subscription-id
export MSI_NAME=gpuIdentity

az identity create --name $MSI_NAME --resource-group $CLUSTER_NAME

./hack/deploy/configure-helm-values.sh $CLUSTER_NAME $AZURE_RESOURCE_GROUP $MSI_NAME

helm install gpu-provisioner \
https://github.com/Azure/gpu-provisioner/raw/gh-pages/charts/gpu-provisioner-$CHART_VERSION.tgz \
--values gpu-provisioner-values.yaml --namespace gpu-provisioner --create-namespace --wait
make az-federated-credential
```

## Values
Expand Down Expand Up @@ -47,7 +60,7 @@ helm install gpu-provisioner ./charts/gpu-provisioner --namespace gpu-provisione
| podLabels | object | `{}` | Additional labels for the pod. |
| podSecurityContext | object | `{"fsGroup":1000}` | SecurityContext for the pod. |
| priorityClassName | string | `"system-cluster-critical"` | PriorityClass name for the pod. |
| replicas | int | `2` | Number of replicas. |
| replicas | int | `1` | Number of replicas. |
| revisionHistoryLimit | int | `10` | The number of old ReplicaSets to retain to allow rollback. |
| serviceAccount.annotations | object | `{}` | Additional annotations for the ServiceAccount. |
| serviceAccount.create | bool | `true` | Specifies if a ServiceAccount should be created. |
Expand Down

0 comments on commit f451528

Please sign in to comment.