Skip to content

Added fullnameOverride for cockroachDb yaml value file to allow creation of secrets using the job #395

Added fullnameOverride for cockroachDb yaml value file to allow creation of secrets using the job

Added fullnameOverride for cockroachDb yaml value file to allow creation of secrets using the job #395

Workflow file for this run

name: 'Test Charts'
on: 'pull_request'
jobs:
test:
runs-on: 'ubuntu-20.04'
permissions:
contents: 'read'
id-token: 'write'
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
k8s:
- version: v1.21
kindest-image-tag: 'v1.21.14@sha256:8a4e9bb3f415d2bb81629ce33ef9c76ba514c14d707f9797a01e3216376ba093'
- version: v1.22
kindest-image-tag: 'v1.22.17@sha256:f5b2e5698c6c9d6d0adc419c0deae21a425c07d81bbf3b6a6834042f25d4fba2'
- version: v1.23
kindest-image-tag: 'v1.23.17@sha256:59c989ff8a517a93127d4a536e7014d28e235fb3529d9fba91b3951d461edfdb'
- version: v1.24
kindest-image-tag: 'v1.24.15@sha256:7db4f8bea3e14b82d12e044e25e34bd53754b7f2b0e9d56df21774e6f66a70ab'
- version: v1.25
kindest-image-tag: 'v1.25.11@sha256:227fa11ce74ea76a0474eeefb84cb75d8dad1b08638371ecf0e86259b35be0c8'
- version: v1.26
kindest-image-tag: 'v1.26.6@sha256:6e2d8b28a5b601defe327b98bd1c2d1930b49e5d8c512e1895099e4504007adb'
- version: v1.27
kindest-image-tag: 'v1.27.3@sha256:3966ac761ae0136263ffdb6cfd4db23ef8a83cba8a463690e98317add2c9ba72'
- version: v1.28
kindest-image-tag: 'v1.28.0@sha256:9f3ff58f19dcf1a0611d11e8ac989fdb30a28f40f236f59f0bea31fb956ccf5c'
helm-version:
- latest
include:
- k8s:
version: v1.28
kindest-image-tag: 'v1.28.0@sha256:9f3ff58f19dcf1a0611d11e8ac989fdb30a28f40f236f59f0bea31fb956ccf5c'
helm-version: v3.9.0
name: 'K8s version ${{ matrix.k8s.version }} - Helm version ${{ matrix.helm-version }}'
steps:
- id: 'checkout'
name: Check The Repo Out
uses: 'actions/checkout@v3'
with:
fetch-depth: 0
- id: 'set-up-helm'
name: Install Helm (The Chart Testing CLI Depends On It)
uses: 'azure/[email protected]'
with:
version: '${{ matrix.helm-version }}'
token: ${{ secrets.GITHUB_TOKEN }}
- id: 'set-up-python'
name: Install Python (The Chart Testing CLI Depends On It)
uses: 'actions/[email protected]'
with:
python-version: 3.11.4
- id: 'set-up-chart-testing'
name: Install Chart Testing CLI
uses: 'helm/[email protected]'
with:
version: 'v3.8.0'
- id: 'list-changed'
name: Check If The Chart Has Changes
run: |
changed=$(ct list-changed --target-branch ${{ github.event.repository.default_branch }})
if [[ -n "$changed" ]]; then
echo "changed=true" >> $GITHUB_OUTPUT
fi
- name: Get Changed Test Relevant Files
id: 'list-changed-test'
uses: tj-actions/changed-files@v42
with:
files: |
go.mod
go.sum
charts/zitadel/acceptance/**
- id: 'add-cockroachdb-repo'
name: Add The CockroachDB Helm Repo
run: 'helm repo add cockroachdb https://charts.cockroachdb.com/'
if: steps.list-changed.outputs.changed == 'true' || steps.list-changed-test.outputs.any_changed == 'true'
- id: 'lint'
name: Lint The Chart
run: 'ct lint --target-branch ${{ github.event.repository.default_branch }}'
if: steps.list-changed.outputs.changed == 'true' || steps.list-changed-test.outputs.any_changed == 'true'
- id: 'create-kind'
name: Create Kubernetes Cluster with KinD
uses: 'helm/[email protected]'
if: steps.list-changed.outputs.changed == 'true' || steps.list-changed-test.outputs.any_changed == 'true'
with:
node_image: 'kindest/node:${{ matrix.k8s.kindest-image-tag }}'
version: 'v0.20.0'
- id: 'setup-go'
uses: actions/setup-go@v5
with:
go-version: '1.21.4'
- id: 'test'
name: Run Go Tests
run: 'go test -p 1 ./...'
if: steps.list-changed.outputs.changed == 'true' || steps.list-changed-test.outputs.any_changed == 'true'
- id: 'zitadel-test-namespaces'
name: Grep Created Namespaces
run: |
echo "pgInsecure=$(kubectl get namespaces --output name | grep 1-postgres-insecure | cut -d / -f 2)" >> "$GITHUB_OUTPUT"
echo "pgSecure=$(kubectl get namespaces --output name | grep 2-postgres-secure | cut -d / -f 2)" >> "$GITHUB_OUTPUT"
echo "crInsecure=$(kubectl get namespaces --output name | grep 3-cockroach-insecure | cut -d / -f 2)" >> "$GITHUB_OUTPUT"
echo "crSecure=$(kubectl get namespaces --output name | grep 4-cockroach-secure | cut -d / -f 2)" >> "$GITHUB_OUTPUT"
echo "refSecrets=$(kubectl get namespaces --output name | grep 5-referenced-secrets | cut -d / -f 2)" >> "$GITHUB_OUTPUT"
echo "machineUser=$(kubectl get namespaces --output name | grep 6-machine-user | cut -d / -f 2)" >> "$GITHUB_OUTPUT"
echo "selfSigned=$(kubectl get namespaces --output name | grep 7-self-signed | cut -d / -f 2)" >> "$GITHUB_OUTPUT"
if: always()
- id: 'namespace-report-pg-insecure'
name: Show ${{ steps.zitadel-test-namespaces.outputs.pgInsecure }} Namespace
uses: jupyterhub/action-k8s-namespace-report@v1
if: always()
with:
namespace: ${{ steps.zitadel-test-namespaces.outputs.pgInsecure }}
- id: 'namespace-report-pg-secure'
name: Show ${{ steps.zitadel-test-namespaces.outputs.pgSecure }} Namespace
uses: jupyterhub/action-k8s-namespace-report@v1
if: always()
with:
namespace: ${{ steps.zitadel-test-namespaces.outputs.pgSecure }}
- id: 'namespace-report-cr-insecure'
name: Show ${{ steps.zitadel-test-namespaces.outputs.crInsecure }} Namespace
uses: jupyterhub/action-k8s-namespace-report@v1
if: always()
with:
namespace: ${{ steps.zitadel-test-namespaces.outputs.crInsecure }}
- id: 'namespace-report-cr-secure'
name: Show ${{ steps.zitadel-test-namespaces.outputs.crSecure }} Namespace
uses: jupyterhub/action-k8s-namespace-report@v1
if: always()
with:
namespace: ${{ steps.zitadel-test-namespaces.outputs.crSecure }}
- id: 'namespace-report-ref-secrets'
name: Show ${{ steps.zitadel-test-namespaces.outputs.refSecrets }} Namespace
uses: jupyterhub/action-k8s-namespace-report@v1
if: always()
with:
namespace: ${{ steps.zitadel-test-namespaces.outputs.refSecrets }}
- id: 'namespace-report-machine-user'
name: Show ${{ steps.zitadel-test-namespaces.outputs.machineUser }} Namespace
uses: jupyterhub/action-k8s-namespace-report@v1
if: always()
with:
namespace: ${{ steps.zitadel-test-namespaces.outputs.machineUser }}
- id: 'namespace-report-self-signed'
name: Show ${{ steps.zitadel-test-namespaces.outputs.selfSigned }} Namespace
uses: jupyterhub/action-k8s-namespace-report@v1
if: always()
with:
namespace: ${{ steps.zitadel-test-namespaces.outputs.selfSigned }}