From 2da3ea4d2a5ea6a2e7de1af1555b7cf04ca484b4 Mon Sep 17 00:00:00 2001 From: Katarzyna Kujawa Date: Fri, 12 Mar 2021 15:27:10 +0100 Subject: [PATCH] Add CI job for helm chart --- .github/workflows/pull_requests.yml | 44 +++++++++++++++++++++++++++++ helm/tests/values.yaml | 9 ++++++ 2 files changed, 53 insertions(+) create mode 100644 helm/tests/values.yaml diff --git a/.github/workflows/pull_requests.yml b/.github/workflows/pull_requests.yml index 37f27695..5cf00755 100644 --- a/.github/workflows/pull_requests.yml +++ b/.github/workflows/pull_requests.yml @@ -109,3 +109,47 @@ jobs: - name: Check logs working-directory: ./operator run: make test-examples + + deploy-helm-chart: + name: Deploy helm chart for tailing sidecar operator + runs-on: ubuntu-20.04 + steps: + - uses: actions/checkout@v2 + - uses: imranismail/setup-kustomize@v1 + - uses: AbsaOSS/k3d-action@v1.3.1 + id: single-cluster + name: Create single k3d Cluster with Registry + with: + cluster-name: "test-cluster" + use-default-registry: true + args: >- + --agents 1 + --no-lb + --k3s-server-arg "--no-deploy=traefik,servicelb,metrics-server" + - name: Add Helm + uses: WyriHaximus/github-action-helm3@v2 + - name: Deploy cert-manager + working-directory: ./operator + run: make deploy-cert-manager + - name: Build and push tailing sidecar image + working-directory: ./sidecar + run: make TAG=registry.localhost:5000/sumologic/tailing-sidecar:test + - name: Build tailing sidecar operator + working-directory: ./operator + run: make docker-build IMG="registry.localhost:5000/sumologic/tailing-sidecar-operator:test" + - name: Push tailing sidecar operator + working-directory: ./operator + run: make docker-push IMG="registry.localhost:5000/sumologic/tailing-sidecar-operator:test" + - name: Deploy Helm chart + working-directory: ./helm + run: helm upgrade --install test-release ./tailing-sidecar-operator -f tests/values.yaml -n tailing-sidecar-system --create-namespace + - name: Deploy examples + working-directory: ./operator + run: make deploy-examples + - name: Wait for logs to be generated + run: sleep 5 + - name: Check Pods + run: kubectl get pods -n tailing-sidecar-system + - name: Check logs + working-directory: ./operator + run: make test-examples diff --git a/helm/tests/values.yaml b/helm/tests/values.yaml new file mode 100644 index 00000000..8a637965 --- /dev/null +++ b/helm/tests/values.yaml @@ -0,0 +1,9 @@ +operator: + image: + repository: registry.localhost:5000/sumologic/tailing-sidecar-operator + tag: test + +sidecar: + image: + repository: registry.localhost:5000/sumologic/tailing-sidecar + tag: test