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

feat: add gateway-api-crds chart #2951

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
66 changes: 66 additions & 0 deletions .github/workflows/release-charts.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: Release Charts

on:
push:
paths:
- .github/workflows/release-charts.yaml
- charts/**
branches:
- main
- feat/gateway-api-crds-chart

jobs:
release:
permissions:
contents: write # to push chart release and create a release (helm/chart-releaser-action)
packages: write # needed for ghcr access
id-token: write # needed for keyless signing

runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4

- name: Fetch history
run: git fetch --prune --unshallow

- name: Configure Git
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "$GITHUB_ACTOR@users.noreply.github.com"

- name: Copy crds to chart templates
run: cp -v config/crd/standard/*.yaml charts/gateway-api-crds/templates/

- name: Set up Helm
uses: azure/setup-helm@v3.5
with:
version: v3.12.0

- name: Run chart-releaser
# TODO: pin chart-releaser, currently the latest release (v1.6.0) does not support skip_upload
uses: helm/chart-releaser-action@13fe82a5149cf0b212e16453d25b3c59f2b4d3ef
with:
skip_existing: true
skip_upload: true
env:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
CR_GENERATE_RELEASE_NOTES: true

# see https://github.com/helm/chart-releaser/issues/183
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Push charts to GHCR
run: |
shopt -s nullglob
for pkg in .cr-release-packages/*; do
if [ -z "${pkg:-}" ]; then
break
fi
helm push "${pkg}" "oci://ghcr.io/${GITHUB_REPOSITORY_OWNER}/charts"
done
23 changes: 23 additions & 0 deletions charts/gateway-api-crds/.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/
19 changes: 19 additions & 0 deletions charts/gateway-api-crds/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
apiVersion: v2
type: application
version: 0.0.1-alpha3
name: gateway-api-crds
icon: https://avatars.githubusercontent.com/u/36015203?s=400&v=4
description: |
A Helm chart that collects custom resource definitions (CRDs) from the Kubernetes Gateway API,
allowing for seamless integration with GitOps tools
keywords:
- kubernetes
- gateway-api
- crds
appVersion: 1.0.0
home: https://gateway-api.sigs.k8s.io
sources:
- https://github.com/kubernetes-sigs/gateway-api
maintainers:
- name: vac
email: dot.fun@protonmail.com
10 changes: 10 additions & 0 deletions charts/gateway-api-crds/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Kubernetes Gateway API CRDs

This chart brings Custom Resource Definitions (CRD) used by Kubernetes Gateway API.

Inspired by the following great resources:

* https://github.com/helm/chart-releaser-action
* https://github.com/prometheus-community/helm-charts/tree/main/charts/prometheus-operator-crds
* https://github.com/kubernetes-sigs/metrics-server/tree/master/charts/metrics-server
* https://github.com/kubernetes/dashboard/tree/master/charts/kubernetes-dashboard
1 change: 1 addition & 0 deletions charts/gateway-api-crds/templates/NOTES.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
See https://github.com/kubernetes-sigs/gateway-api/tree/main/config/crd/standard
4 changes: 4 additions & 0 deletions charts/gateway-api-crds/values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
## Annotations for CRDs
##
#crds:
# annotations: {}