Skip to content

Commit

Permalink
First shot of the agent helm chart (kedacore#51)
Browse files Browse the repository at this point in the history
* All our tweaks should go here

If there is another thing to add to our fork, pls add it here.

Example:

```
echo -e "#foo?\n\n bar?" > foo-bar.md # Pls keep adding the changes to standalone files that are not present in the upstream to mitigate the risk of conflict
add foo-bar.md
git commit -s --ammend
yada yada
```

Signed-off-by: Jirka Kremser <jiri.kremser@gmail.com>
Signed-off-by: Jan Wozniak <wozniak.jan@gmail.com>
Signed-off-by: Jirka Kremser <jiri.kremser@gmail.com>

* ensure keda ns in smoketests before chart installation (kedacore#36)

Signed-off-by: Jan Wozniak <wozniak.jan@gmail.com>

* smoke_tests: wait for deployments availability (kedacore#37)

Signed-off-by: Jan Wozniak <wozniak.jan@gmail.com>

* fix keda chart deployment smoketest check missing ns (kedacore#38)

Signed-off-by: Jan Wozniak <wozniak.jan@gmail.com>

* Don't skip the publish step (kedacore#39)

Signed-off-by: Jirka Kremser <jiri.kremser@gmail.com>

* http-add-on: allow fetching certs from secrets (kedacore#40)

Signed-off-by: Jan Wozniak <wozniak.jan@gmail.com>

* http-add-on: disable explicit tls secret mount

Signed-off-by: Jan Wozniak <wozniak.jan@gmail.com>

* restricted scc (kedacore#41)

Signed-off-by: Zbynek Roubalik <zroubalik@gmail.com>

* ci: refactor kedify chart release trigger (kedacore#42)

Signed-off-by: Jan Wozniak <wozniak.jan@gmail.com>

* bump kube-rbax-proxy to v0.16.0 (kedacore#43)

Signed-off-by: Zbynek Roubalik <zroubalik@gmail.com>

* ci: fix missing quote and pipe

Signed-off-by: Jan Wozniak <wozniak.jan@gmail.com>

* http-add-on: attempt HTTP2 upgrade by default (kedacore#45)

Signed-off-by: Jan Wozniak <wozniak.jan@gmail.com>

* http-add-on: allow configuring prometheus and otel collectors (kedacore#46)

* http-add-on: allow configuring prometheus and otel collectors

Signed-off-by: Jan Wozniak <wozniak.jan@gmail.com>

* helm-docs

Signed-off-by: Jan Wozniak <wozniak.jan@gmail.com>

---------

Signed-off-by: Jan Wozniak <wozniak.jan@gmail.com>

* gh release chart: fix env var evaluation (kedacore#47)

Signed-off-by: Jan Wozniak <wozniak.jan@gmail.com>

* http-add-on: metrics service (kedacore#48)

Signed-off-by: Jan Wozniak <wozniak.jan@gmail.com>

* http-add-on: disable interceptor pdb (kedacore#49)

Signed-off-by: Jan Wozniak <wozniak.jan@gmail.com>

* http-add-on: RBAC to emit events (kedacore#50)

Signed-off-by: Jan Wozniak <wozniak.jan@gmail.com>

* First shot of the agent helm chart

Signed-off-by: Jirka Kremser <jiri.kremser@gmail.com>

* more granular rbac

Signed-off-by: Jirka Kremser <jiri.kremser@gmail.com>

* more granular rbac vol 2

Signed-off-by: Jirka Kremser <jiri.kremser@gmail.com>

* Install also CRD and CR if requested, this is done using pre install hook (for crd) and post install hook for CR

Signed-off-by: Jirka Kremser <jiri.kremser@gmail.com>

* fixes for agent chart (kedacore#52)

* fixes for agent chart

Signed-off-by: Jan Wozniak <wozniak.jan@gmail.com>

* image tag proposal

Signed-off-by: Jan Wozniak <wozniak.jan@gmail.com>

* add cluster name + option to disable kedifyconfig

Signed-off-by: Jan Wozniak <wozniak.jan@gmail.com>

* simplify kedify cr template

Signed-off-by: Jan Wozniak <wozniak.jan@gmail.com>

* narrow down autowiring rbac

Signed-off-by: Jan Wozniak <wozniak.jan@gmail.com>

---------

Signed-off-by: Jan Wozniak <wozniak.jan@gmail.com>

---------

Signed-off-by: Jirka Kremser <jiri.kremser@gmail.com>
Signed-off-by: Jan Wozniak <wozniak.jan@gmail.com>
Signed-off-by: Zbynek Roubalik <zroubalik@gmail.com>
Co-authored-by: Jan Wozniak <wozniak.jan@gmail.com>
Co-authored-by: Zbynek Roubalik <zroubalik@gmail.com>
Co-authored-by: Jan Wozniak <jan@kedify.io>
  • Loading branch information
4 people authored Oct 18, 2024
1 parent 74dd91d commit 3fbf7e6
Show file tree
Hide file tree
Showing 23 changed files with 2,534 additions and 2 deletions.
69 changes: 67 additions & 2 deletions .github/workflows/gh-release-chart.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ on:
options:
- keda
- http-add-on
- kedify-agent
permissions:
contents: read

Expand Down Expand Up @@ -72,6 +73,20 @@ jobs:
kubectl wait --timeout=600s -nkeda --for=condition=ready pod -lapp.kubernetes.io/component=interceptor,app.kubernetes.io/part-of=keda-add-ons-http
echo -e "\n\n\n pods:\n\n"
kubectl get pods -A
- name: Smoke test helm rendering and deployability (kedify agent chart)
if: inputs.chart == 'kedify-agent'
run: |
set -o pipefail
kubectl create ns keda --dry-run=client -o yaml | kubectl apply -f -
helm dependency build kedify-agent
helm template ./kedify-agent -nkeda \
--set agent.apiKey=kfy_facefaceface424242d0f7e1963c7d542aee9d62b66c4c705ec70108655b3c000 \
--set agent.orgId=9151f21f-42ab-42ab-42ab-f4af67cddf54 | kubectl apply -f -
sleep 10
kubectl rollout status --timeout=300s -nkeda deploy/kedify-agent
sleep 5
echo -e "\n\n\n pods:\n\n"
kubectl get pods -A
publish:
runs-on: ubuntu-latest
Expand All @@ -81,6 +96,7 @@ jobs:
with:
fetch-depth: 0
- name: Add the -N suffix to chart's version
id: version
run: |
set -xeuo pipefail
version=${{ inputs.version }}
Expand All @@ -94,12 +110,20 @@ jobs:
sed 's/\.\([0-9]\+\)$/-\1/')
version=$(echo "$last_version" | awk -F'-' '{print $1 "-" $2+1}')
fi
echo "newVersion=${version}" >> ${GITHUB_OUTPUT}
sed -i ${{ inputs.chart }}/Chart.yaml -e "s;^version:.*;version: ${version};"
- name: Publish Helm chart
uses: stefanprodan/helm-gh-pages@master
with:
token: ${{ secrets.PAT_TOKEN }}
charts_dir: "."
- name: Push Tag
uses: mathieudutour/github-tag-action@v6.2
with:
github_token: ${{ secrets.PAT_TOKEN }}
create_annotated_tag: true
tag_prefix: ""
custom_tag: ${{ inputs.chart }}-${{ steps.version.outputs.newVersion }}
- name: Create k3s cluster
if: inputs.chart == 'keda'
uses: AbsaOSS/k3d-action@v2
Expand All @@ -126,7 +150,7 @@ jobs:
--create-namespace \
--timeout 300s \
--wait \
--version ${{ inputs.version }} \
--version ${{ steps.version.outputs.newVersion }} \
--set customManagedBy=kedify && break
set +x
[ "$i" = "16" ] && exit 1
Expand All @@ -148,5 +172,46 @@ jobs:
echo -e "\n\nthe following command is supposed to fail:\n\n"
helm template keda kedify/keda \
--version $${{ inputs.version }} \
--version ${{ steps.version.outputs.newVersion }} \
--set crds.install=f4lse || true
- name: Smoke test helm installation
if: inputs.chart == 'kedify-agent'
run: |
# exp-backoff - we wait for pages to become available here
for i in $(seq 16)
do
_sec=$(echo "1.5^$i" | bc)
echo "Waiting ${_sec} seconds.."
sleep ${_sec}
helm repo add kedify https://kedify.github.io/charts || continue
helm repo update
set -x
helm upgrade -i agent kedify/kedify-agent \
-n keda \
--create-namespace \
--set agent.apiKey=kfy_facefaceface424242d0f7e1963c7d542aee9d62b66c4c705ec70108655b3c000 \
--set agent.orgId=9151f21f-42ab-42ab-42ab-f4af67cddf54 \
--timeout 300s \
--wait \
--version ${{ steps.version.outputs.newVersion }} && break
set +x
[ "$i" = "16" ] && exit 1
done
kubectl rollout status --timeout=300s -nkeda deploy/kedify-agent
echo -e "\n\n\n pods:\n\n"
kubectl get pods -A
sleep 5
echo "::group::logs"
kubectl logs -lcontrol-plane=kedify-agent --tail=-1
echo "::endgroup::"
echo "::group::values.yaml"
helm get values -n keda agent
echo "::endgroup::"
echo "::group::resulting YAML manifests"
helm get manifest -n keda agent
echo "::endgroup::"
1 change: 1 addition & 0 deletions kedify-agent/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
charts/*.tgz
23 changes: 23 additions & 0 deletions kedify-agent/.helmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*.orig
*~
# Various IDEs
.project
.idea/
*.tmproj
.vscode/
9 changes: 9 additions & 0 deletions kedify-agent/Chart.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
dependencies:
- name: keda
repository: https://kedify.github.io/charts
version: v2.15.1-0
- name: keda-add-ons-http
repository: https://kedify.github.io/charts
version: v0.8.0-8
digest: sha256:59b25a8b78de8619e36b9d35c08c601c2791b7d23c24243168076fc62cee6c93
generated: "2024-10-18T09:56:29.18376111+02:00"
20 changes: 20 additions & 0 deletions kedify-agent/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
apiVersion: v2
name: kedify-agent
description: Kedify agent - Helm Chart
kubeVersion: ">=v1.23.0-0"
type: application
version: "v0.0.54"
appVersion: "v0.0.54"
dependencies:
- name: keda
repository: https://kedify.github.io/charts
version: v2.15.1-0
condition: keda.enabled
- name: keda-add-ons-http
repository: https://kedify.github.io/charts
version: v0.8.0-8
condition: kedaAddOnsHttp.enabled
home: https://github.com/kedify/charts
sources:
- https://github.com/kedify/agent
- https://github.com/kedify/charts
Loading

0 comments on commit 3fbf7e6

Please sign in to comment.