From 12c74dadb825ec2378bf0ec08d3c96b105400a7b Mon Sep 17 00:00:00 2001 From: Morten Olsen Date: Tue, 12 Aug 2025 23:55:38 +0200 Subject: [PATCH] publish operator yaml --- .github/workflows/main.yml | 16 ++++++++- {chart => charts/operator}/Chart.yaml | 0 .../operator}/templates/_helpers.tpl | 0 .../operator}/templates/_storageclass.yaml | 0 .../operator}/templates/clusterrole.yaml | 0 .../templates/clusterrolebinding.yaml | 0 .../operator}/templates/deployment.yaml | 0 .../operator}/templates/serviceaccount.yaml | 0 {chart => charts/operator}/values.yaml | 0 manifests/storageclass.yaml | 10 ------ operator.yaml | 34 +++++++++++++++++++ 11 files changed, 49 insertions(+), 11 deletions(-) rename {chart => charts/operator}/Chart.yaml (100%) rename {chart => charts/operator}/templates/_helpers.tpl (100%) rename {chart => charts/operator}/templates/_storageclass.yaml (100%) rename {chart => charts/operator}/templates/clusterrole.yaml (100%) rename {chart => charts/operator}/templates/clusterrolebinding.yaml (100%) rename {chart => charts/operator}/templates/deployment.yaml (100%) rename {chart => charts/operator}/templates/serviceaccount.yaml (100%) rename {chart => charts/operator}/values.yaml (100%) delete mode 100644 manifests/storageclass.yaml create mode 100644 operator.yaml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 83586da..54f3d45 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -71,9 +71,23 @@ jobs: environment: release runs-on: ubuntu-latest steps: - - uses: release-drafter/release-drafter@v6 + - id: create-release + uses: release-drafter/release-drafter@v6 with: config-name: release-drafter-config.yml publish: true env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - uses: actions/checkout@v4 + + - name: Upload Release Asset + id: upload-release-asset + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create-release.outputs.upload_url }} + asset_path: ./operator.yaml + asset_name: operator.yaml + asset_content_type: application/yaml \ No newline at end of file diff --git a/chart/Chart.yaml b/charts/operator/Chart.yaml similarity index 100% rename from chart/Chart.yaml rename to charts/operator/Chart.yaml diff --git a/chart/templates/_helpers.tpl b/charts/operator/templates/_helpers.tpl similarity index 100% rename from chart/templates/_helpers.tpl rename to charts/operator/templates/_helpers.tpl diff --git a/chart/templates/_storageclass.yaml b/charts/operator/templates/_storageclass.yaml similarity index 100% rename from chart/templates/_storageclass.yaml rename to charts/operator/templates/_storageclass.yaml diff --git a/chart/templates/clusterrole.yaml b/charts/operator/templates/clusterrole.yaml similarity index 100% rename from chart/templates/clusterrole.yaml rename to charts/operator/templates/clusterrole.yaml diff --git a/chart/templates/clusterrolebinding.yaml b/charts/operator/templates/clusterrolebinding.yaml similarity index 100% rename from chart/templates/clusterrolebinding.yaml rename to charts/operator/templates/clusterrolebinding.yaml diff --git a/chart/templates/deployment.yaml b/charts/operator/templates/deployment.yaml similarity index 100% rename from chart/templates/deployment.yaml rename to charts/operator/templates/deployment.yaml diff --git a/chart/templates/serviceaccount.yaml b/charts/operator/templates/serviceaccount.yaml similarity index 100% rename from chart/templates/serviceaccount.yaml rename to charts/operator/templates/serviceaccount.yaml diff --git a/chart/values.yaml b/charts/operator/values.yaml similarity index 100% rename from chart/values.yaml rename to charts/operator/values.yaml diff --git a/manifests/storageclass.yaml b/manifests/storageclass.yaml deleted file mode 100644 index 770ac3c..0000000 --- a/manifests/storageclass.yaml +++ /dev/null @@ -1,10 +0,0 @@ -apiVersion: storage.k8s.io/v1 -kind: StorageClass -metadata: - name: homelab-operator-local-path -provisioner: homelab-operator-local-path -reclaimPolicy: Retain -allowVolumeExpansion: true -volumeBindingMode: Immediate -parameters: - hello: 'world' diff --git a/operator.yaml b/operator.yaml new file mode 100644 index 0000000..98c8dd3 --- /dev/null +++ b/operator.yaml @@ -0,0 +1,34 @@ +apiVersion: v1 +kind: Namespace +metadata: + name: homelab + +--- + +apiVersion: source.toolkit.fluxcd.io/v1 +kind: GitRepository +metadata: + name: homelab + namespace: homelab +spec: + interval: 60m + url: https://github.com/morten-olsen/homelab-operator + ref: + branch: main + +--- + +apiVersion: helm.toolkit.fluxcd.io/v2 +kind: HelmRelease +metadata: + name: operator + namespace: homelab +spec: + releaseName: operator + chart: + spec: + chart: chart + sourceRef: + kind: GitRepository + name: homelab + namespace: homelab \ No newline at end of file