chore: add ci to test deploy with helm#377
chore: add ci to test deploy with helm#377liangyuanpeng wants to merge 1 commit intoInftyAI:mainfrom
Conversation
Signed-off-by: Lan Liang <gcslyp@gmail.com>
| go-version-file: go.mod | ||
|
|
||
| - name: Set up Helm | ||
| uses: azure/setup-helm@v4 |
There was a problem hiding this comment.
Perhaps the preference is to complete the installation of helm in the Makefile. Here, it's just a quick start. I'd be more than happy to update. like add a command: make helm to install helm.
There was a problem hiding this comment.
Feel free to polish this in the follow up.
| export CWD=$(pwd) | ||
| function cleanup { | ||
| if [ $USE_EXISTING_CLUSTER == 'false' ] | ||
| then | ||
| $KIND delete cluster --name $KIND_CLUSTER_NAME | ||
| fi | ||
| } | ||
| function startup { | ||
| if [ $USE_EXISTING_CLUSTER == 'false' ] | ||
| then | ||
| $KIND create cluster --name $KIND_CLUSTER_NAME --image $E2E_KIND_NODE_VERSION --config ./hack/kind-config.yaml | ||
| fi | ||
| } | ||
| function kind_load { | ||
| $KIND load docker-image $IMAGE_TAG --name $KIND_CLUSTER_NAME | ||
| } | ||
| function deploy { | ||
| cd $CWD | ||
| HELM_EXT_OPTS='--namespace=llmaz-system --create-namespace --set controllerManager.manager.image.tag=${LOADER_IMAGE_TAG}' make helm-install | ||
| $KUBECTL wait --timeout=3m --for=condition=ready pods --namespace=llmaz-system -l app!=certgen | ||
| echo "all pods of llmaz-system is ready..." | ||
| $KUBECTL get pod -n llmaz-system | ||
| } | ||
| function deploy_kube_prometheus { | ||
| LATEST=$(curl -s https://api.github.com/repos/prometheus-operator/prometheus-operator/releases/latest | jq -cr .tag_name) | ||
| curl -sL https://github.com/prometheus-operator/prometheus-operator/releases/download/${LATEST}/bundle.yaml | $KUBECTL create -f - | ||
| } | ||
| trap cleanup EXIT | ||
| startup | ||
| kind_load | ||
| deploy_kube_prometheus | ||
| deploy |
There was a problem hiding this comment.
Just quickly work, I am very willing to reuse it in util.sh in this PR or the next PR.
| repository: "oci://registry-1.docker.io/envoyproxy/" | ||
| repository: "oci://registry-1.docker.io/envoyproxy" | ||
| condition: envoy-gateway.enabled | ||
| - name: ai-gateway-helm | ||
| version: v0.0.0-latest | ||
| repository: "oci://registry-1.docker.io/envoyproxy/" | ||
| repository: "oci://registry-1.docker.io/envoyproxy" |
There was a problem hiding this comment.
I just got the error when I run make helm-install , but this change fixed it.
...
Downloading open-webui from repo https://helm.openwebui.com/
Downloading gateway-helm from repo oci://registry-1.docker.io/envoyproxy/
Save error occurred: could not download oci://registry-1.docker.io/envoyproxy//gateway-helm: invalid_reference: invalid repository
Error: could not download oci://registry-1.docker.io/envoyproxy//gateway-helm: invalid_reference: invalid repositoryThere was a problem hiding this comment.
Thanks, it's strange, I didn't encounter this. I will ask someone else to verify this because it may break users like you.
| branches-ignore: | ||
| - 'dependabot/**' | ||
| pull_request: | ||
| # paths: |
There was a problem hiding this comment.
Should we only check the chart/** ? I think we're only verifying that the helm chart is deployed as expected not the function, right?
| go-version-file: go.mod | ||
|
|
||
| - name: Set up Helm | ||
| uses: azure/setup-helm@v4 |
There was a problem hiding this comment.
Feel free to polish this in the follow up.
| $KUBECTL get pod -n llmaz-system | ||
| } | ||
| function deploy_kube_prometheus { | ||
| LATEST=$(curl -s https://api.github.com/repos/prometheus-operator/prometheus-operator/releases/latest | jq -cr .tag_name) |
There was a problem hiding this comment.
We may make the prometheus operator as a dependency of helm chart as well in the future.
| cd $CWD | ||
| HELM_EXT_OPTS='--namespace=llmaz-system --create-namespace --set controllerManager.manager.image.tag=${LOADER_IMAGE_TAG}' make helm-install | ||
| $KUBECTL wait --timeout=3m --for=condition=ready pods --namespace=llmaz-system -l app!=certgen | ||
| echo "all pods of llmaz-system is ready..." |
There was a problem hiding this comment.
| echo "all pods of llmaz-system is ready..." | |
| echo "All pods of llmaz are ready..." |
|
/kind cleanup |
| contents: read | ||
|
|
||
| jobs: | ||
| chart-lint-test: |
|
kindly ping @liangyuanpeng |
|
Hi @liangyuanpeng are you still working on this? |
|
Ping @liangyuanpeng again, we're approaching the deadline of v0.2.0, and we're happy to have this ci guardrail. |
|
Fixed in #432, since @liangyuanpeng is on vacation until 0923. Thanks for the efforts. |
What this PR does / why we need it
Yesterday, I attempted to deploy llmaz using helm, but encountered some issues. This PR fixed the problems and added a CI to ensure that the helm deployment was problem-free.
/kind cleanup
Which issue(s) this PR fixes
Fixes #
Special notes for your reviewer
Does this PR introduce a user-facing change?