diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml index aca64080..2f4f38e0 100644 --- a/.github/workflows/master.yml +++ b/.github/workflows/master.yml @@ -9,6 +9,8 @@ on: jobs: build: + permissions: + packages: write runs-on: ubuntu-latest steps: - uses: actions/checkout@v6 @@ -61,3 +63,20 @@ jobs: name: push latest if it's a release if: ${{ ! endsWith( env.app_ver, '-SNAPSHOT' ) }} run: docker buildx imagetools create docker.io/obsidiandynamics/kafdrop:$app_ver --tag docker.io/obsidiandynamics/kafdrop:latest + + # Helm chart release + - + name: Login to GHCR + if: ${{ ! endsWith( env.app_ver, '-SNAPSHOT' ) }} + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${ GITHUB_REPOSITORY_OWNER } + password: ${{ secrets.GITHUB_TOKEN }} + - + name: publish chart to GitHub packages + if: ${{ ! endsWith( env.app_ver, '-SNAPSHOT' ) }} + run: | + helm dependency build charts/kafdrop + helm package charts/kafdrop --version "$app_ver" + helm push "kafdrop-$app_ver.tgz" oci://ghcr.io/"${GITHUB_REPOSITORY_OWNER}"/charts diff --git a/README.md b/README.md index d98e912f..a565ce35 100644 --- a/README.md +++ b/README.md @@ -121,20 +121,18 @@ Then access the web UI at [http://localhost:9000](http://localhost:9000). > **Hey there!** We hope you really like Kafdrop! Please take a moment to [⭐](https://github.com/obsidiandynamics/kafdrop)the repo or [Tweet](https://twitter.com/intent/tweet?url=https%3A%2F%2Fgithub.com%2Fobsidiandynamics%2Fkafdrop&text=Get%20Kafdrop%20%E2%80%94%20a%20web-based%20UI%20for%20viewing%20%23ApacheKafka%20topics%20and%20browsing%20consumers%20) about it. ## Running in Kubernetes (using a Helm Chart) -Clone the repository (if necessary): -```sh -git clone https://github.com/obsidiandynamics/kafdrop && cd kafdrop -``` Apply the chart: ```sh -helm upgrade -i kafdrop chart --set image.tag=3.x.x \ +helm upgrade -i kafdrop ghcr.io/dan-hill2802/charts/kafdrop --version x.x.x --set image.tag=3.x.x \ --set kafka.brokerConnect= \ --set server.servlet.contextPath="/" \ --set cmdArgs="--message.format=AVRO --schemaregistry.connect=http://localhost:8080" \ #optional --set jvm.opts="-Xms32M -Xmx64M" ``` +Replace `--version x.x.x` with the desired chart version. [Available versions](https://github.com/obsidiandynamics/kafdrop/pkgs/container/charts%2Fkafdrop/versions) + For all Helm configuration options, have a peek into [chart/values.yaml](chart/values.yaml). Replace `3.x.x` with the image tag of [obsidiandynamics/kafdrop](https://hub.docker.com/r/obsidiandynamics/kafdrop). Services will be bound on port 9000 by default (node port 30900). diff --git a/chart/.helmignore b/charts/kafdrop/.helmignore similarity index 100% rename from chart/.helmignore rename to charts/kafdrop/.helmignore diff --git a/chart/Chart.yaml b/charts/kafdrop/Chart.yaml similarity index 100% rename from chart/Chart.yaml rename to charts/kafdrop/Chart.yaml diff --git a/chart/templates/NOTES.txt b/charts/kafdrop/templates/NOTES.txt similarity index 100% rename from chart/templates/NOTES.txt rename to charts/kafdrop/templates/NOTES.txt diff --git a/chart/templates/_helpers.tpl b/charts/kafdrop/templates/_helpers.tpl similarity index 100% rename from chart/templates/_helpers.tpl rename to charts/kafdrop/templates/_helpers.tpl diff --git a/chart/templates/deployment.yaml b/charts/kafdrop/templates/deployment.yaml similarity index 100% rename from chart/templates/deployment.yaml rename to charts/kafdrop/templates/deployment.yaml diff --git a/chart/templates/ingress.yaml b/charts/kafdrop/templates/ingress.yaml similarity index 100% rename from chart/templates/ingress.yaml rename to charts/kafdrop/templates/ingress.yaml diff --git a/chart/templates/service.yaml b/charts/kafdrop/templates/service.yaml similarity index 100% rename from chart/templates/service.yaml rename to charts/kafdrop/templates/service.yaml diff --git a/chart/values.yaml b/charts/kafdrop/values.yaml similarity index 100% rename from chart/values.yaml rename to charts/kafdrop/values.yaml