Skip to content

Converting mariadb-operator to use helm #4

Converting mariadb-operator to use helm

Converting mariadb-operator to use helm #4

name: Kustomize GitHub Actions for mariadb-operator
on:
pull_request:
paths:
- base-helm-configs/mariadb-operator/**
- base-kustomize/mariadb-operator/**
- .github/workflows/helm-mariadb-operator.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: Run Helm Template
run: |
${{ steps.helm.outputs.helm-path }} template mariadb-operator mariadb-operator --repo https://mariadb-operator.github.io/mariadb-operator \
--namespace=mariadb-system \
--create-namespace \
--wait \
--timeout 120m \
-f ${{ github.workspace }}/base-helm-configs/mariadb-operator/mariadb-operator-helm-overrides.yaml \
--post-renderer ${{ github.workspace }}/base-kustomize/kustomize.sh \
--post-renderer-args mariadb-operator/${{ matrix.overlays }} > /tmp/rendered.yaml
- name: Return helm Build
uses: actions/upload-artifact@v4
with:
name: helm-mariadb-operator-artifact-${{ matrix.overlays }}
path: /tmp/rendered.yaml