From 8a30b7a91b21e7a49322881745866bc7a7c2839e 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 | 54 +++++++++++++++++++++++++++ .github/workflows/helm-glance.yaml | 54 +++++++++++++++++++++++++++ .github/workflows/helm-heat.yaml | 54 +++++++++++++++++++++++++++ .github/workflows/helm-horizon.yaml | 54 +++++++++++++++++++++++++++ .github/workflows/helm-keystone.yaml | 54 +++++++++++++++++++++++++++ .github/workflows/helm-neutron.yaml | 54 +++++++++++++++++++++++++++ .github/workflows/helm-nova.yaml | 54 +++++++++++++++++++++++++++ .github/workflows/helm-octavia.yaml | 54 +++++++++++++++++++++++++++ .github/workflows/helm-placement.yaml | 54 +++++++++++++++++++++++++++ 9 files changed, 486 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..497f88d1 --- /dev/null +++ b/.github/workflows/helm-cinder.yaml @@ -0,0 +1,54 @@ +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 submodules + run: | + git submodule update --init submodules/openstack-helm + git submodule update --init submodules/openstack-helm-infra + - 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 ${{ github.workspace }}/helm-configs/cinder/cinder-helm-overrides.yaml \ + --post-renderer ${{ github.workspace }}/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..dcebf15f --- /dev/null +++ b/.github/workflows/helm-glance.yaml @@ -0,0 +1,54 @@ +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 submodules + run: | + git submodule update --init submodules/openstack-helm + git submodule update --init submodules/openstack-helm-infra + - 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 ${{ github.workspace }}/helm-configs/glance/glance-helm-overrides.yaml \ + --post-renderer ${{ github.workspace }}/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..c83dd091 --- /dev/null +++ b/.github/workflows/helm-heat.yaml @@ -0,0 +1,54 @@ +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 submodules + run: | + git submodule update --init submodules/openstack-helm + git submodule update --init submodules/openstack-helm-infra + - 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 ${{ github.workspace }}/helm-configs/heat/heat-helm-overrides.yaml \ + --post-renderer ${{ github.workspace }}/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..c016917f --- /dev/null +++ b/.github/workflows/helm-horizon.yaml @@ -0,0 +1,54 @@ +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 submodules + run: | + git submodule update --init submodules/openstack-helm + git submodule update --init submodules/openstack-helm-infra + - 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 ${{ github.workspace }}/helm-configs/horizon/horizon-helm-overrides.yaml \ + --post-renderer ${{ github.workspace }}/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..1a69432a --- /dev/null +++ b/.github/workflows/helm-keystone.yaml @@ -0,0 +1,54 @@ +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 submodules + run: | + git submodule update --init submodules/openstack-helm + git submodule update --init submodules/openstack-helm-infra + - 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 ${{ github.workspace }}/helm-configs/keystone/keystone-helm-overrides.yaml \ + --post-renderer ${{ github.workspace }}/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..6f5e5b48 --- /dev/null +++ b/.github/workflows/helm-neutron.yaml @@ -0,0 +1,54 @@ +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 submodules + run: | + git submodule update --init submodules/openstack-helm + git submodule update --init submodules/openstack-helm-infra + - 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 ${{ github.workspace }}/helm-configs/neutron/neutron-helm-overrides.yaml \ + --post-renderer ${{ github.workspace }}/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..76842cb3 --- /dev/null +++ b/.github/workflows/helm-nova.yaml @@ -0,0 +1,54 @@ +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 submodules + run: | + git submodule update --init submodules/openstack-helm + git submodule update --init submodules/openstack-helm-infra + - 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 ${{ github.workspace }}/helm-configs/nova/nova-helm-overrides.yaml \ + --post-renderer ${{ github.workspace }}/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..ca277516 --- /dev/null +++ b/.github/workflows/helm-octavia.yaml @@ -0,0 +1,54 @@ +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 submodules + run: | + git submodule update --init submodules/openstack-helm + git submodule update --init submodules/openstack-helm-infra + - 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 ${{ github.workspace }}/helm-configs/octavia/octavia-helm-overrides.yaml \ + --post-renderer ${{ github.workspace }}/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..bff67398 --- /dev/null +++ b/.github/workflows/helm-placement.yaml @@ -0,0 +1,54 @@ +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 submodules + run: | + git submodule update --init submodules/openstack-helm + git submodule update --init submodules/openstack-helm-infra + - 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 ${{ github.workspace }}/helm-configs/placement/placement-helm-overrides.yaml \ + --post-renderer ${{ github.workspace }}/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