-
Notifications
You must be signed in to change notification settings - Fork 0
Add crd only chart, that installs CRDs unconditionally #276
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| # SPDX-FileCopyrightText: 2024 SAP SE or an SAP affiliate company | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| name: Helm CRD OCI Package GHCR | ||
| "on": | ||
| push: | ||
| branches: | ||
| - main | ||
| paths: | ||
| - 'charts/openstack-hypervisor-operator/crds/**' | ||
| workflow_dispatch: {} | ||
| permissions: | ||
| contents: read | ||
| packages: write | ||
| jobs: | ||
| build-and-push-helm-crd-package: | ||
| name: Build and publish Helm CRD Chart OCI | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Check out code | ||
| uses: actions/checkout@v6 | ||
| - name: Install Helm | ||
| uses: azure/setup-helm@v4 | ||
| - name: Sync CRDs from main chart | ||
| run: cp charts/openstack-hypervisor-operator/crds/*.yaml charts/openstack-hypervisor-operator-crd/templates/ | ||
| - name: Lint Helm Chart | ||
| run: helm lint charts/openstack-hypervisor-operator-crd | ||
| - name: Package Helm Chart | ||
| run: | | ||
| # Use run number to auto-increment version on each CRD change | ||
| VERSION="1.0.${{ github.run_number }}" | ||
| echo "Running helm package with version $VERSION" | ||
| helm package charts/openstack-hypervisor-operator-crd --destination ./chart --version "$VERSION" | ||
|
Comment on lines
+28
to
+33
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: cat .github/workflows/helm-crd-oci-package-ghcr.yamlRepository: cobaltcore-dev/openstack-hypervisor-operator Length of output: 1673 🏁 Script executed: # Check the overall structure and triggers of the workflow
head -50 .github/workflows/helm-crd-oci-package-ghcr.yamlRepository: cobaltcore-dev/openstack-hypervisor-operator Length of output: 1673 🏁 Script executed: # Look for any CRD change detection logic in the workflow
grep -n "crd\|CRD\|paths\|on:" .github/workflows/helm-crd-oci-package-ghcr.yamlRepository: cobaltcore-dev/openstack-hypervisor-operator Length of output: 733 Address the risk of versioning without actual code changes via The workflow correctly triggers on CRD file changes via the Consider either:
The current approach of 🤖 Prompt for AI Agents |
||
| - name: Log in to the Container registry | ||
| uses: docker/login-action@v4 | ||
| with: | ||
| password: ${{ secrets.GITHUB_TOKEN }} | ||
| registry: ghcr.io | ||
| username: ${{ github.actor }} | ||
| - name: Push Helm Chart to ghcr.io | ||
| run: helm push ./chart/*.tgz oci://ghcr.io/${{ github.repository_owner }}/charts | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| # Patterns to ignore when building packages. | ||
| .DS_Store | ||
| *.swp | ||
| *.bak | ||
| *.tmp | ||
| *~ | ||
| .git | ||
| .gitignore | ||
| .bzr | ||
| .bzrignore | ||
| .hg | ||
| .hgignore | ||
| .svn | ||
| .empty |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| apiVersion: v2 | ||
| name: openstack-hypervisor-operator-crd | ||
| description: CRDs for the OpenStack Hypervisor Operator | ||
| appVersion: latest | ||
| version: 1.0.0 | ||
| type: application |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider adding the CRD chart metadata to the path filter.
The current path filter only triggers when CRDs in the main chart change. Updates to the CRD-only chart metadata (e.g.,
charts/openstack-hypervisor-operator-crd/Chart.yaml) won't trigger this workflow, preventing you from publishing metadata-only updates.📝 Proposed fix to include CRD chart metadata
push: branches: - main paths: - 'charts/openstack-hypervisor-operator/crds/**' + - 'charts/openstack-hypervisor-operator-crd/**' workflow_dispatch: {}🤖 Prompt for AI Agents