From 0d4f3d565026edf6964542f4208a604816bd47f2 Mon Sep 17 00:00:00 2001 From: Kevin Carter Date: Sun, 28 Jan 2024 18:07:13 -0600 Subject: [PATCH] Add helm template actions This change will ensure that out helm charts build when changes are made to our helm overrides. Signed-off-by: Kevin Carter --- .github/workflows/helm-cinder.yaml | 53 +++++++++++++++++++++++++++ .github/workflows/helm-glance.yaml | 53 +++++++++++++++++++++++++++ .github/workflows/helm-heat.yaml | 53 +++++++++++++++++++++++++++ .github/workflows/helm-horizon.yaml | 53 +++++++++++++++++++++++++++ .github/workflows/helm-keystone.yaml | 53 +++++++++++++++++++++++++++ .github/workflows/helm-neutron.yaml | 53 +++++++++++++++++++++++++++ .github/workflows/helm-nova.yaml | 53 +++++++++++++++++++++++++++ .github/workflows/helm-octavia.yaml | 53 +++++++++++++++++++++++++++ .github/workflows/helm-placement.yaml | 53 +++++++++++++++++++++++++++ 9 files changed, 477 insertions(+) create mode 100644 .github/workflows/helm-cinder.yaml create mode 100644 .github/workflows/helm-glance.yaml create mode 100644 .github/workflows/helm-heat.yaml create mode 100644 .github/workflows/helm-horizon.yaml create mode 100644 .github/workflows/helm-keystone.yaml create mode 100644 .github/workflows/helm-neutron.yaml create mode 100644 .github/workflows/helm-nova.yaml create mode 100644 .github/workflows/helm-octavia.yaml create mode 100644 .github/workflows/helm-placement.yaml diff --git a/.github/workflows/helm-cinder.yaml b/.github/workflows/helm-cinder.yaml new file mode 100644 index 00000000..b201f205 --- /dev/null +++ b/.github/workflows/helm-cinder.yaml @@ -0,0 +1,53 @@ +name: Helm GitHub Actions for cinder + +on: + pull_request: + paths: + - helm-configs/cinder/** + - .github/workflows/helm-cinder.yaml +jobs: + helm: + strategy: + matrix: + overlays: + - base + - aio + name: Helm + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - uses: azure/setup-helm@v3 + with: + version: latest + token: "${{ secrets.GITHUB_TOKEN }}" + id: helm + - name: Kubectl Install + working-directory: /usr/local/bin/ + run: | + if [ ! -f /usr/local/bin/kubectl ]; then + curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" + chmod +x ./kubectl + fi + - name: Pull OSH submodule + run: | + git submodule update --init submodules/openstack-helm + - name: Make OSH submodule + run: | + cd submodules/openstack-helm + make cinder + - name: Run Helm Template + run: | + cd submodules/openstack-helm + ${{ steps.helm.outputs.helm-path }} template cinder ./cinder \ + --namespace=openstack \ + --wait \ + --timeout 120m \ + -f /opt/genestack/helm-configs/cinder/cinder-helm-overrides.yaml \ + --post-renderer /opt/genestack/kustomize/kustomize.sh \ + --post-renderer-args cinder/${{ matrix.overlays }} > /tmp/rendered.yaml + - name: Return helm Build + uses: actions/upload-artifact@v2 + with: + name: helm-cinder-artifact-${{ matrix.overlays }} + path: /tmp/rendered.yaml diff --git a/.github/workflows/helm-glance.yaml b/.github/workflows/helm-glance.yaml new file mode 100644 index 00000000..7bbe8dd1 --- /dev/null +++ b/.github/workflows/helm-glance.yaml @@ -0,0 +1,53 @@ +name: Helm GitHub Actions for glance + +on: + pull_request: + paths: + - helm-configs/glance/** + - .github/workflows/helm-glance.yaml +jobs: + helm: + strategy: + matrix: + overlays: + - base + - aio + name: Helm + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - uses: azure/setup-helm@v3 + with: + version: latest + token: "${{ secrets.GITHUB_TOKEN }}" + id: helm + - name: Kubectl Install + working-directory: /usr/local/bin/ + run: | + if [ ! -f /usr/local/bin/kubectl ]; then + curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" + chmod +x ./kubectl + fi + - name: Pull OSH submodule + run: | + git submodule update --init submodules/openstack-helm + - name: Make OSH submodule + run: | + cd submodules/openstack-helm + make glance + - name: Run Helm Template + run: | + cd submodules/openstack-helm + ${{ steps.helm.outputs.helm-path }} template glance ./glance \ + --namespace=openstack \ + --wait \ + --timeout 120m \ + -f /opt/genestack/helm-configs/glance/glance-helm-overrides.yaml \ + --post-renderer /opt/genestack/kustomize/kustomize.sh \ + --post-renderer-args glance/${{ matrix.overlays }} > /tmp/rendered.yaml + - name: Return helm Build + uses: actions/upload-artifact@v2 + with: + name: helm-glance-artifact-${{ matrix.overlays }} + path: /tmp/rendered.yaml diff --git a/.github/workflows/helm-heat.yaml b/.github/workflows/helm-heat.yaml new file mode 100644 index 00000000..68629242 --- /dev/null +++ b/.github/workflows/helm-heat.yaml @@ -0,0 +1,53 @@ +name: Helm GitHub Actions for heat + +on: + pull_request: + paths: + - helm-configs/heat/** + - .github/workflows/helm-heat.yaml +jobs: + helm: + strategy: + matrix: + overlays: + - base + - aio + name: Helm + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - uses: azure/setup-helm@v3 + with: + version: latest + token: "${{ secrets.GITHUB_TOKEN }}" + id: helm + - name: Kubectl Install + working-directory: /usr/local/bin/ + run: | + if [ ! -f /usr/local/bin/kubectl ]; then + curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" + chmod +x ./kubectl + fi + - name: Pull OSH submodule + run: | + git submodule update --init submodules/openstack-helm + - name: Make OSH submodule + run: | + cd submodules/openstack-helm + make heat + - name: Run Helm Template + run: | + cd submodules/openstack-helm + ${{ steps.helm.outputs.helm-path }} template heat ./heat \ + --namespace=openstack \ + --wait \ + --timeout 120m \ + -f /opt/genestack/helm-configs/heat/heat-helm-overrides.yaml \ + --post-renderer /opt/genestack/kustomize/kustomize.sh \ + --post-renderer-args heat/${{ matrix.overlays }} > /tmp/rendered.yaml + - name: Return helm Build + uses: actions/upload-artifact@v2 + with: + name: helm-heat-artifact-${{ matrix.overlays }} + path: /tmp/rendered.yaml diff --git a/.github/workflows/helm-horizon.yaml b/.github/workflows/helm-horizon.yaml new file mode 100644 index 00000000..dc8584a7 --- /dev/null +++ b/.github/workflows/helm-horizon.yaml @@ -0,0 +1,53 @@ +name: Helm GitHub Actions for horizon + +on: + pull_request: + paths: + - helm-configs/horizon/** + - .github/workflows/helm-horizon.yaml +jobs: + helm: + strategy: + matrix: + overlays: + - base + - aio + name: Helm + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - uses: azure/setup-helm@v3 + with: + version: latest + token: "${{ secrets.GITHUB_TOKEN }}" + id: helm + - name: Kubectl Install + working-directory: /usr/local/bin/ + run: | + if [ ! -f /usr/local/bin/kubectl ]; then + curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" + chmod +x ./kubectl + fi + - name: Pull OSH submodule + run: | + git submodule update --init submodules/openstack-helm + - name: Make OSH submodule + run: | + cd submodules/openstack-helm + make horizon + - name: Run Helm Template + run: | + cd submodules/openstack-helm + ${{ steps.helm.outputs.helm-path }} template horizon ./horizon \ + --namespace=openstack \ + --wait \ + --timeout 120m \ + -f /opt/genestack/helm-configs/horizon/horizon-helm-overrides.yaml \ + --post-renderer /opt/genestack/kustomize/kustomize.sh \ + --post-renderer-args horizon/${{ matrix.overlays }} > /tmp/rendered.yaml + - name: Return helm Build + uses: actions/upload-artifact@v2 + with: + name: helm-horizon-artifact-${{ matrix.overlays }} + path: /tmp/rendered.yaml diff --git a/.github/workflows/helm-keystone.yaml b/.github/workflows/helm-keystone.yaml new file mode 100644 index 00000000..a61c3d34 --- /dev/null +++ b/.github/workflows/helm-keystone.yaml @@ -0,0 +1,53 @@ +name: Helm GitHub Actions for keystone + +on: + pull_request: + paths: + - helm-configs/keystone/** + - .github/workflows/helm-keystone.yaml +jobs: + helm: + strategy: + matrix: + overlays: + - base + - aio + name: Helm + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - uses: azure/setup-helm@v3 + with: + version: latest + token: "${{ secrets.GITHUB_TOKEN }}" + id: helm + - name: Kubectl Install + working-directory: /usr/local/bin/ + run: | + if [ ! -f /usr/local/bin/kubectl ]; then + curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" + chmod +x ./kubectl + fi + - name: Pull OSH submodule + run: | + git submodule update --init submodules/openstack-helm + - name: Make OSH submodule + run: | + cd submodules/openstack-helm + make keystone + - name: Run Helm Template + run: | + cd submodules/openstack-helm + ${{ steps.helm.outputs.helm-path }} template keystone ./keystone \ + --namespace=openstack \ + --wait \ + --timeout 120m \ + -f /opt/genestack/helm-configs/keystone/keystone-helm-overrides.yaml \ + --post-renderer /opt/genestack/kustomize/kustomize.sh \ + --post-renderer-args keystone/${{ matrix.overlays }} > /tmp/rendered.yaml + - name: Return helm Build + uses: actions/upload-artifact@v2 + with: + name: helm-keystone-artifact-${{ matrix.overlays }} + path: /tmp/rendered.yaml diff --git a/.github/workflows/helm-neutron.yaml b/.github/workflows/helm-neutron.yaml new file mode 100644 index 00000000..c401b238 --- /dev/null +++ b/.github/workflows/helm-neutron.yaml @@ -0,0 +1,53 @@ +name: Helm GitHub Actions for neutron + +on: + pull_request: + paths: + - helm-configs/neutron/** + - .github/workflows/helm-neutron.yaml +jobs: + helm: + strategy: + matrix: + overlays: + - base + - aio + name: Helm + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - uses: azure/setup-helm@v3 + with: + version: latest + token: "${{ secrets.GITHUB_TOKEN }}" + id: helm + - name: Kubectl Install + working-directory: /usr/local/bin/ + run: | + if [ ! -f /usr/local/bin/kubectl ]; then + curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" + chmod +x ./kubectl + fi + - name: Pull OSH submodule + run: | + git submodule update --init submodules/openstack-helm + - name: Make OSH submodule + run: | + cd submodules/openstack-helm + make neutron + - name: Run Helm Template + run: | + cd submodules/openstack-helm + ${{ steps.helm.outputs.helm-path }} template neutron ./neutron \ + --namespace=openstack \ + --wait \ + --timeout 120m \ + -f /opt/genestack/helm-configs/neutron/neutron-helm-overrides.yaml \ + --post-renderer /opt/genestack/kustomize/kustomize.sh \ + --post-renderer-args neutron/${{ matrix.overlays }} > /tmp/rendered.yaml + - name: Return helm Build + uses: actions/upload-artifact@v2 + with: + name: helm-neutron-artifact-${{ matrix.overlays }} + path: /tmp/rendered.yaml diff --git a/.github/workflows/helm-nova.yaml b/.github/workflows/helm-nova.yaml new file mode 100644 index 00000000..1ad74bd8 --- /dev/null +++ b/.github/workflows/helm-nova.yaml @@ -0,0 +1,53 @@ +name: Helm GitHub Actions for nova + +on: + pull_request: + paths: + - helm-configs/nova/** + - .github/workflows/helm-nova.yaml +jobs: + helm: + strategy: + matrix: + overlays: + - base + - aio + name: Helm + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - uses: azure/setup-helm@v3 + with: + version: latest + token: "${{ secrets.GITHUB_TOKEN }}" + id: helm + - name: Kubectl Install + working-directory: /usr/local/bin/ + run: | + if [ ! -f /usr/local/bin/kubectl ]; then + curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" + chmod +x ./kubectl + fi + - name: Pull OSH submodule + run: | + git submodule update --init submodules/openstack-helm + - name: Make OSH submodule + run: | + cd submodules/openstack-helm + make nova + - name: Run Helm Template + run: | + cd submodules/openstack-helm + ${{ steps.helm.outputs.helm-path }} template nova ./nova \ + --namespace=openstack \ + --wait \ + --timeout 120m \ + -f /opt/genestack/helm-configs/nova/nova-helm-overrides.yaml \ + --post-renderer /opt/genestack/kustomize/kustomize.sh \ + --post-renderer-args nova/${{ matrix.overlays }} > /tmp/rendered.yaml + - name: Return helm Build + uses: actions/upload-artifact@v2 + with: + name: helm-nova-artifact-${{ matrix.overlays }} + path: /tmp/rendered.yaml diff --git a/.github/workflows/helm-octavia.yaml b/.github/workflows/helm-octavia.yaml new file mode 100644 index 00000000..6b64bd7e --- /dev/null +++ b/.github/workflows/helm-octavia.yaml @@ -0,0 +1,53 @@ +name: Helm GitHub Actions for octavia + +on: + pull_request: + paths: + - helm-configs/octavia/** + - .github/workflows/helm-octavia.yaml +jobs: + helm: + strategy: + matrix: + overlays: + - base + - aio + name: Helm + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - uses: azure/setup-helm@v3 + with: + version: latest + token: "${{ secrets.GITHUB_TOKEN }}" + id: helm + - name: Kubectl Install + working-directory: /usr/local/bin/ + run: | + if [ ! -f /usr/local/bin/kubectl ]; then + curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" + chmod +x ./kubectl + fi + - name: Pull OSH submodule + run: | + git submodule update --init submodules/openstack-helm + - name: Make OSH submodule + run: | + cd submodules/openstack-helm + make octavia + - name: Run Helm Template + run: | + cd submodules/openstack-helm + ${{ steps.helm.outputs.helm-path }} template octavia ./octavia \ + --namespace=openstack \ + --wait \ + --timeout 120m \ + -f /opt/genestack/helm-configs/octavia/octavia-helm-overrides.yaml \ + --post-renderer /opt/genestack/kustomize/kustomize.sh \ + --post-renderer-args octavia/${{ matrix.overlays }} > /tmp/rendered.yaml + - name: Return helm Build + uses: actions/upload-artifact@v2 + with: + name: helm-octavia-artifact-${{ matrix.overlays }} + path: /tmp/rendered.yaml diff --git a/.github/workflows/helm-placement.yaml b/.github/workflows/helm-placement.yaml new file mode 100644 index 00000000..20dc2340 --- /dev/null +++ b/.github/workflows/helm-placement.yaml @@ -0,0 +1,53 @@ +name: Helm GitHub Actions for placement + +on: + pull_request: + paths: + - helm-configs/placement/** + - .github/workflows/helm-placement.yaml +jobs: + helm: + strategy: + matrix: + overlays: + - base + - aio + name: Helm + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - uses: azure/setup-helm@v3 + with: + version: latest + token: "${{ secrets.GITHUB_TOKEN }}" + id: helm + - name: Kubectl Install + working-directory: /usr/local/bin/ + run: | + if [ ! -f /usr/local/bin/kubectl ]; then + curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" + chmod +x ./kubectl + fi + - name: Pull OSH submodule + run: | + git submodule update --init submodules/openstack-helm + - name: Make OSH submodule + run: | + cd submodules/openstack-helm + make placement + - name: Run Helm Template + run: | + cd submodules/openstack-helm + ${{ steps.helm.outputs.helm-path }} template placement ./placement \ + --namespace=openstack \ + --wait \ + --timeout 120m \ + -f /opt/genestack/helm-configs/placement/placement-helm-overrides.yaml \ + --post-renderer /opt/genestack/kustomize/kustomize.sh \ + --post-renderer-args placement/${{ matrix.overlays }} > /tmp/rendered.yaml + - name: Return helm Build + uses: actions/upload-artifact@v2 + with: + name: helm-placement-artifact-${{ matrix.overlays }} + path: /tmp/rendered.yaml