-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Converted libvirt to helm install from kustomize (#573)
* Converted libvirt to helm install from kustomize * Needed to remove workflow now that libvirt is in helm * Updated workflows Corrected workflow for libvirt and updated install script * Update helm-libvirt.yaml Wrong directory * Files named wrong * file named wrong * more changes learning
- Loading branch information
Showing
6 changed files
with
91 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
name: Helm GitHub Actions for Libvirt | ||
|
||
on: | ||
pull_request: | ||
paths: | ||
- base-helm-configs/libvirt/** | ||
- .github/workflows/helm-libvirt.yaml | ||
jobs: | ||
helm: | ||
strategy: | ||
matrix: | ||
overlays: | ||
- base | ||
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-infra | ||
make libvirt | ||
- name: Run Helm Template | ||
run: | | ||
cd submodules/openstack-helm-infra | ||
${{ steps.helm.outputs.helm-path }} template libvirt ./libvirt \ | ||
--namespace=openstack \ | ||
--wait \ | ||
--timeout 120m \ | ||
-f ${{ github.workspace }}/base-helm-configs/libvirt/libvirt-helm-overrides.yaml > /tmp/rendered.yaml | ||
- name: Return helm Build | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: helm-libvirt-artifact-${{ matrix.overlays }} | ||
path: /tmp/rendered.yaml |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#!/bin/bash | ||
|
||
# Directory to check for YAML files | ||
CONFIG_DIR="/etc/genestack/helm-configs/libvirt" | ||
|
||
pushd /opt/genestack/submodules/openstack-helm-infra || exit | ||
|
||
# Base helm upgrade command | ||
HELM_CMD="helm upgrade --install libvirt ./libvirt \ | ||
--namespace=openstack \ | ||
--timeout 120m" | ||
|
||
# Add the base overrides file | ||
HELM_CMD+=" -f /opt/genestack/base-helm-configs/libvirt/libvirt-helm-overrides.yaml" | ||
|
||
# Check if YAML files exist in the specified directory | ||
if compgen -G "${CONFIG_DIR}/*.yaml" > /dev/null; then | ||
# Append all YAML files from the directory to the helm command | ||
for yaml_file in "${CONFIG_DIR}"/*.yaml; do | ||
HELM_CMD+=" -f ${yaml_file}" | ||
done | ||
fi | ||
|
||
# Run the helm command | ||
eval "${HELM_CMD}" | ||
|
||
popd || exit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters