Skip to content

Commit 528f623

Browse files
committed
Add crd only chart, that installs CRDs unconditionally
not happy with that, but it seems that's the preferable way currently. Chart is auto-version on every CRD changed and pushed to ghcr.
1 parent 800d17e commit 528f623

File tree

4 files changed

+65
-0
lines changed

4 files changed

+65
-0
lines changed
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# SPDX-FileCopyrightText: 2024 SAP SE or an SAP affiliate company
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
name: Helm CRD OCI Package GHCR
5+
"on":
6+
push:
7+
branches:
8+
- main
9+
paths:
10+
- 'charts/openstack-hypervisor-operator/crds/**'
11+
workflow_dispatch: {}
12+
permissions:
13+
contents: read
14+
packages: write
15+
jobs:
16+
build-and-push-helm-crd-package:
17+
name: Build and publish Helm CRD Chart OCI
18+
runs-on: large_runner_16core_64gb
19+
steps:
20+
- name: Check out code
21+
uses: actions/checkout@v6
22+
with:
23+
fetch-depth: 0
24+
fetch-tags: true
25+
- name: Install Helm
26+
uses: azure/setup-helm@v4
27+
- name: Sync CRDs from main chart
28+
run: |
29+
cp charts/openstack-hypervisor-operator/crds/*.yaml charts/openstack-hypervisor-operator-crd/templates/
30+
- name: Lint Helm Chart
31+
run: helm lint charts/openstack-hypervisor-operator-crd
32+
- name: Package Helm Chart
33+
run: |
34+
# Use run number to auto-increment version on each CRD change
35+
VERSION="1.0.${{ github.run_number }}"
36+
echo "Running helm package with version $VERSION"
37+
helm package charts/openstack-hypervisor-operator-crd --destination ./chart --version "$VERSION"
38+
- name: Log in to the Container registry
39+
uses: docker/login-action@v4
40+
with:
41+
password: ${{ secrets.GITHUB_TOKEN }}
42+
registry: ghcr.io
43+
username: ${{ github.actor }}
44+
- name: Push Helm Chart to ghcr.io
45+
run: helm push ./chart/*.tgz oci://ghcr.io/${{ github.repository_owner }}/charts
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Patterns to ignore when building packages.
2+
.DS_Store
3+
*.swp
4+
*.bak
5+
*.tmp
6+
*~
7+
.git
8+
.gitignore
9+
.bzr
10+
.bzrignore
11+
.hg
12+
.hgignore
13+
.svn
14+
.empty
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
apiVersion: v2
2+
name: openstack-hypervisor-operator-crd
3+
description: CRDs for the OpenStack Hypervisor Operator
4+
appVersion: latest
5+
version: 1.0.0
6+
type: application

charts/openstack-hypervisor-operator-crd/templates/.empty

Whitespace-only changes.

0 commit comments

Comments
 (0)