Skip to content
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

Helm charts #184

Merged
merged 7 commits into from
Jul 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions .github/workflows/delete-release-helm-chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Description: This workflow is used to communicate Kuadrant helm charts repo that a release has been deleted.

name: Delete Release Helm Chart
on:
release:
types:
- deleted
jobs:
delete_chart_release:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4
- name: Parse Tag
run: |
tag=${{ github.event.release.tag_name || inputs.operatorTag }}
echo "OPERATOR_VERSION=${tag#v}" >> $GITHUB_ENV
- name: Sync deleted Helm Chart with repository
run: |
make helm-sync-package-deleted \
VERSION=${{env.OPERATOR_VERSION}} \
HELM_WORKFLOWS_TOKEN=${{ secrets.HELM_WORKFLOWS_TOKEN }}
52 changes: 52 additions & 0 deletions .github/workflows/release-helm-chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# Description: This workflow is used to release the Helm chart to the GitHub repository. The chart manifests should be already
# built with the target `helm-build` and the manifests changes already committed to the tag to be released.

name: Release Helm Chart
on:
release:
types:
- published
workflow_dispatch:
inputs:
operatorTag:
description: Operator bundle version tag
default: v0.0.0
type: string
jobs:
chart_release:
runs-on: ubuntu-latest
permissions:
contents: write

steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.ref }}
fetch-depth: 0

- name: Package Helm Chart
run: |
make helm-package

- name: Parse Tag
run: |
tag=${{ github.event.release.tag_name || inputs.operatorTag }}
echo "OPERATOR_VERSION=${tag#v}" >> $GITHUB_ENV

- name: Upload package to GitHub Release
uses: svenstaro/upload-release-action@v2
id: upload-chart
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: limitador-operator-${{ env.OPERATOR_VERSION }}.tgz
asset_name: chart-limitador-operator-${{ env.OPERATOR_VERSION }}.tgz
tag: ${{ github.ref }}
overwrite: true

- name: Sync Helm Chart with repository
run: |
make helm-sync-package-created \
VERSION=${{env.OPERATOR_VERSION}} \
HELM_WORKFLOWS_TOKEN=${{ secrets.HELM_WORKFLOWS_TOKEN }} \
BROWSER_DOWNLOAD_URL=${{ steps.upload-chart.outputs.browser_download_url }}
20 changes: 20 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,23 @@ OPM = $(shell which opm)
endif
endif

HELM = ./bin/helm
HELM_VERSION = v3.15.0
$(HELM):
@{ \
set -e ;\
mkdir -p $(dir $(HELM)) ;\
OS=$(shell go env GOOS) && ARCH=$(shell go env GOARCH) && \
curl -sL -o helm.tar.gz https://get.helm.sh/helm-$(HELM_VERSION)-$${OS}-$${ARCH}.tar.gz ;\
tar -zxvf helm.tar.gz ;\
mv $${OS}-$${ARCH}/helm $(HELM) ;\
chmod +x $(HELM) ;\
rm -rf $${OS}-$${ARCH} helm.tar.gz ;\
}

.PHONY: helm
helm: $(HELM) ## Download helm locally if necessary.

##@ Development

manifests: controller-gen kustomize authorino-manifests ## Generate WebhookConfiguration, ClusterRole and CustomResourceDefinition objects.
Expand Down Expand Up @@ -335,3 +352,6 @@ verify-bundle: bundle $(YQ) ## Verify bundle update.
.PHONY: verify-fmt
verify-fmt: fmt ## Verify fmt update.
git diff --exit-code ./api ./controllers

# Include last to avoid changing MAKEFILE_LIST used above
include ./make/*.mk
23 changes: 23 additions & 0 deletions charts/authorino-operator/.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/
6 changes: 6 additions & 0 deletions charts/authorino-operator/Chart.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
dependencies:
- name: cert-manager
repository: https://charts.jetstack.io
version: v1.12.1
digest: sha256:cf2f92d263aebcba3c235c2ad2389870afdd4db489c4ac3c6ad3813621432c90
generated: "2024-06-26T17:00:05.675481+02:00"
28 changes: 28 additions & 0 deletions charts/authorino-operator/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
apiVersion: v2
name: authorino-operator
description: Kubernetes operator for managing Authorino instances, a K8s-native AuthN/AuthZ service to protect your APIs.
home: https://kuadrant.io
icon: https://raw.githubusercontent.com/Kuadrant/kuadrant.github.io/main/static/img/apple-touch-icon.png
keywords:
- authorino
- authn
- authz
- authorization
- authentication
- service protection
- kubernetes
- kuadrant
sources:
- https://github.com/Kuadrant/authorino-operator/
- https://github.com/Kuadrant/authorino/
kubeVersion: ">=1.19.0-0"
type: application
# The version will be properly set when the chart is released matching the operator version
version: "0.0.0"
maintainers:
- email: mcassola@redhat.com
name: Guilherme Cassolato
- email: didier@redhat.com
name: Didier Di Cesare
- email: eastizle@redhat.com
name: Eguzki Astiz Lezaun
Loading
Loading