From f96fd742332510c1346208146b5dfc099d5fbdbe Mon Sep 17 00:00:00 2001 From: Cees-Jan Kiewiet Date: Sun, 17 Nov 2024 16:21:05 +0100 Subject: [PATCH] Add pi-hole to testing cluster --- .github/workflows/helm-charts-test.yaml | 40 ++++++++++++++----- .../pi-hole-exporter/library-ci/secret.yaml | 3 +- 2 files changed, 32 insertions(+), 11 deletions(-) diff --git a/.github/workflows/helm-charts-test.yaml b/.github/workflows/helm-charts-test.yaml index 124d2be..e7e243b 100644 --- a/.github/workflows/helm-charts-test.yaml +++ b/.github/workflows/helm-charts-test.yaml @@ -26,14 +26,14 @@ jobs: fail-fast: false matrix: k8s: - - "1.23" - - "1.24" - - "1.25" - - "1.26" - - "1.27" - - "1.28" - - "1.29" - - "1.30" +# - "1.23" +# - "1.24" +# - "1.25" +# - "1.26" +# - "1.27" +# - "1.28" +# - "1.29" +# - "1.30" - "1.31" steps: - name: Checkout @@ -49,13 +49,30 @@ jobs: node_image: "kindest/node:v${{ matrix.k8s }}.0" config: etc/kind.yaml - run: kubectl get nodes + - run: kubectl get pods -A + - run: kubectl get svc -A + - name: Install PiHole + uses: evryfs/helm-ephemeral-action@v0.2.5 + with: + repo: https://mojo2600.github.io/pihole-kubernetes/ + chart: pihole + helm: 'helm' # optional, default value is 'helm' + args: '--wait --atomic --timeout 13m --namespace=pihole --create-namespace' #optional, default value is '--wait --timeout 2m' in order to wait for the chart-install to stabilize into ready state + - run: kubectl get pods -A + - run: kubectl get svc -A + - name: Create postgresql URL + id: pihole + run: | + echo ::set-output name=hostname::$(echo "pihole-helm-charts-${{ github.run_number }}.pihole/pihole" | base64) - name: Install postgresql uses: evryfs/helm-ephemeral-action@v0.2.5 with: repo: https://charts.bitnami.com/bitnami chart: postgresql helm: 'helm' # optional, default value is 'helm' - args: '--wait --timeout 13m' #optional, default value is '--wait --timeout 2m' in order to wait for the chart-install to stabilize into ready state + args: '--wait --atomic --timeout 13m' #optional, default value is '--wait --timeout 2m' in order to wait for the chart-install to stabilize into ready state + - run: kubectl get pods -A + - run: kubectl get svc -A - name: Get PG password id: postgresql_password run: | @@ -77,6 +94,7 @@ jobs: fi - name: Prepare library charts run: | + echo -e " PIHOLE_HOSTNAME: \"${{ steps.pihole.outputs.hostname }}\"\r\n" >> charts/pi-hole-exporter/library-ci/secret.yaml cp charts/commons/library-ci/*.yaml charts/commons/templates/ cp charts/cron-jobs/library-ci/*.yaml charts/cron-jobs/templates/ cp charts/horizontal-pod-autoscalers/library-ci/*.yaml charts/horizontal-pod-autoscalers/templates/ @@ -90,9 +108,13 @@ jobs: sed -i 's/library/application/g' charts/horizontal-pod-autoscalers/Chart.yaml rm -Rf charts/commento rm -Rf charts/commentoplusplus + - run: kubectl get pods -A + - run: kubectl get svc -A - name: Test Changed Charts if: steps.list-changed.outputs.changed == 'true' run: ct install - name: Test All Charts if: steps.list-changed.outputs.changed != 'true' run: ct install --all + - run: kubectl get pods -A + - run: kubectl get svc -A diff --git a/charts/pi-hole-exporter/library-ci/secret.yaml b/charts/pi-hole-exporter/library-ci/secret.yaml index aba008a..34bf8c4 100644 --- a/charts/pi-hole-exporter/library-ci/secret.yaml +++ b/charts/pi-hole-exporter/library-ci/secret.yaml @@ -4,5 +4,4 @@ metadata: name: pi-hole type: Opaque data: - PIHOLE_HOSTNAME: UElIT0xFX0hPU1ROQU1F - PIHOLE_PASSWORD: UElIT0xFX1BBU1NXT1JE \ No newline at end of file + PIHOLE_PASSWORD: UElIT0xFX1BBU1NXT1JE