From 5095e3968fe05c519301df43ce8edf06737ae750 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christoph=20St=C3=A4bler?= Date: Tue, 10 Mar 2026 09:27:48 +0100 Subject: [PATCH 1/3] Fix samples --- config/samples/kustomization.yaml | 1 - config/samples/v1alpha1_function.yaml | 10 +++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/config/samples/kustomization.yaml b/config/samples/kustomization.yaml index a096cb3..d2c5d96 100644 --- a/config/samples/kustomization.yaml +++ b/config/samples/kustomization.yaml @@ -1,5 +1,4 @@ ## Append samples of your project ## resources: - v1alpha1_function.yaml -- _v1alpha1_function.yaml # +kubebuilder:scaffold:manifestskustomizesamples diff --git a/config/samples/v1alpha1_function.yaml b/config/samples/v1alpha1_function.yaml index 29a23af..67f634c 100644 --- a/config/samples/v1alpha1_function.yaml +++ b/config/samples/v1alpha1_function.yaml @@ -5,5 +5,13 @@ metadata: app.kubernetes.io/name: func-operator app.kubernetes.io/managed-by: kustomize name: function-sample + namespace: default spec: - # TODO(user): Add fields here + source: + repositoryUrl: https://github.com/your-org/your-function.git + authSecretRef: + name: git-credentials + registry: + path: quay.io/your-username/my-function + authSecretRef: + name: registry-credentials \ No newline at end of file From 44f9d9353dcf60a192ca0d49cb26ab028ee666f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christoph=20St=C3=A4bler?= Date: Tue, 10 Mar 2026 09:31:06 +0100 Subject: [PATCH 2/3] Add CSV base --- .../func-operator.clusterserviceversion.yaml | 47 +++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 config/manifests/bases/func-operator.clusterserviceversion.yaml diff --git a/config/manifests/bases/func-operator.clusterserviceversion.yaml b/config/manifests/bases/func-operator.clusterserviceversion.yaml new file mode 100644 index 0000000..27fd6e2 --- /dev/null +++ b/config/manifests/bases/func-operator.clusterserviceversion.yaml @@ -0,0 +1,47 @@ +apiVersion: operators.coreos.com/v1alpha1 +kind: ClusterServiceVersion +metadata: + annotations: + alm-examples: '[]' + capabilities: Basic Install + name: func-operator.v0.0.0 + namespace: placeholder +spec: + apiservicedefinitions: {} + customresourcedefinitions: + owned: + - description: Function is the Schema for the functions API. + displayName: Function + kind: Function + name: functions.functions.dev + version: v1alpha1 + description: Operator for serverless functions + displayName: Functions Operator + icon: + - base64data: "" + mediatype: "" + install: + spec: + deployments: null + strategy: "" + installModes: + - supported: false + type: OwnNamespace + - supported: false + type: SingleNamespace + - supported: false + type: MultiNamespace + - supported: true + type: AllNamespaces + keywords: + - faas + links: + - name: Func Operator + url: https://func-operator.domain + maintainers: + - email: email@example.com + name: creydr + maturity: alpha + provider: + name: knative + version: 0.0.0 From 5c75a879acec57c9e782f5c99212c23ceac7ad3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christoph=20St=C3=A4bler?= Date: Tue, 10 Mar 2026 09:31:18 +0100 Subject: [PATCH 3/3] Add bundle build to release workflow --- .github/workflows/release.yml | 42 +++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e6774c0..4071fcd 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -18,6 +18,7 @@ on: env: REGISTRY: ghcr.io IMAGE_NAME: ${{ github.repository }} + BUNDLE_IMAGE_NAME: ${{ github.repository }}-bundle jobs: build-push-release: @@ -137,6 +138,47 @@ jobs: mv dist/install.yaml func-operator.yaml + - name: Generate bundle manifests + run: | + # Use digest from whichever build step ran (latest or non-latest) + if [ "${{ steps.version.outputs.is_latest }}" == "true" ]; then + IMAGE_DIGEST="${{ steps.build_latest.outputs.digest }}" + else + IMAGE_DIGEST="${{ steps.build_non_latest.outputs.digest }}" + fi + + make bundle \ + IMG=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}@${IMAGE_DIGEST} \ + VERSION=${{ steps.version.outputs.full }} \ + USE_IMAGE_DIGESTS=true + + - name: Build and push bundle image (latest version) + if: steps.version.outputs.is_latest == 'true' + uses: docker/build-push-action@v6 + with: + context: . + file: bundle.Dockerfile + platforms: linux/amd64 + push: true + tags: | + ${{ env.REGISTRY }}/${{ env.BUNDLE_IMAGE_NAME }}:v${{ steps.version.outputs.full }} + ${{ env.REGISTRY }}/${{ env.BUNDLE_IMAGE_NAME }}:v${{ steps.version.outputs.major_minor }} + ${{ env.REGISTRY }}/${{ env.BUNDLE_IMAGE_NAME }}:v${{ steps.version.outputs.major }} + ${{ env.REGISTRY }}/${{ env.BUNDLE_IMAGE_NAME }}:latest + + - name: Build and push bundle image (non-latest version) + if: steps.version.outputs.is_latest == 'false' + uses: docker/build-push-action@v6 + with: + context: . + file: bundle.Dockerfile + platforms: linux/amd64 + push: true + tags: | + ${{ env.REGISTRY }}/${{ env.BUNDLE_IMAGE_NAME }}:v${{ steps.version.outputs.full }} + ${{ env.REGISTRY }}/${{ env.BUNDLE_IMAGE_NAME }}:v${{ steps.version.outputs.major_minor }} + ${{ env.REGISTRY }}/${{ env.BUNDLE_IMAGE_NAME }}:v${{ steps.version.outputs.major }} + - name: Create GitHub Release env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}