-
-
Notifications
You must be signed in to change notification settings - Fork 25
chore: add ci to test deploy with helm #377
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# validate any chart changes under charts directory | ||
name: Chart Test | ||
|
||
env: | ||
HELM_VERSION: v3.17.3 | ||
|
||
on: | ||
push: | ||
# Exclude branches created by Dependabot to avoid triggering current workflow | ||
# for PRs initiated by Dependabot. | ||
branches-ignore: | ||
- 'dependabot/**' | ||
pull_request: | ||
# paths: | ||
# - "charts/**" | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
chart-lint-test: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. chart-deploy-verify? |
||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: install Go | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version-file: go.mod | ||
|
||
- name: Set up Helm | ||
uses: azure/setup-helm@v4 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 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: There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Feel free to polish this in the follow up. |
||
with: | ||
version: ${{ env.HELM_VERSION }} | ||
|
||
- name: Run test-deploy-with-helm | ||
run: | | ||
make test-deploy-with-helm |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,9 +27,9 @@ dependencies: | |
condition: open-webui.enabled | ||
- name: gateway-helm | ||
version: 0.0.0-latest | ||
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" | ||
Comment on lines
-30
to
+34
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I just got the error when I run ...
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 repository There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks, it's strange, I didn't encounter this. I will ask someone else to verify this because it may break users like you. |
||
condition: envoy-ai-gateway.enabled |
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -0,0 +1,40 @@ | ||||||
#!/usr/bin/env bash | ||||||
|
||||||
set -o errexit | ||||||
set -o nounset | ||||||
set -o pipefail | ||||||
|
||||||
REPO_ROOT=$(dirname "${BASH_SOURCE[0]}")/.. | ||||||
|
||||||
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..." | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
$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. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We may make the prometheus operator as a dependency of helm chart as well in the future. |
||||||
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 | ||||||
Comment on lines
+9
to
+40
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just quickly work, I am very willing to reuse it in util.sh in this PR or the next PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we only check the
chart/**
? I think we're only verifying that the helm chart is deployed as expected not the function, right?