Skip to content

feat(helm): Make liveness & readiness probes configurable #1

feat(helm): Make liveness & readiness probes configurable

feat(helm): Make liveness & readiness probes configurable #1

# /********************************************************************************
# * Copyright (c) 2021,2023 Contributors to the Eclipse Foundation
# *
# * See the NOTICE file(s) distributed with this work for additional
# * information regarding copyright ownership.
# *
# * This program and the accompanying materials are made available under the
# * terms of the Apache License, Version 2.0 which is available at
# * https://www.apache.org/licenses/LICENSE-2.0.
# *
# * Unless required by applicable law or agreed to in writing, software
# * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# * License for the specific language governing permissions and limitations
# * under the License.
# *
# * SPDX-License-Identifier: Apache-2.0
# ********************************************************************************/
name: Verify and Test Helm Chart
on:
workflow_dispatch:
pull_request:
paths:
- 'charts/managed-identity-wallet/**'
push:
paths:
- 'charts/managed-identity-wallet/**'
jobs:
chart-lint:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Helm
uses: azure/setup-helm@v3
with:
version: v3.12.3
- name: Add bitnami repo
run: |
helm repo add bitnami https://charts.bitnami.com/bitnami
helm repo update
- name: Update Helm dependencies
run: |
cd charts/managed-identity-wallet
helm dependency build
# Setup python as a prerequisite for chart linting
- uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Set up chart-testing
uses: helm/chart-testing-action@v2
- name: Run linting
run: ct lint --config charts/chart-testing-config.yaml --charts ./charts/managed-identity-wallet
verify-helm-docs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Run helm docs command
uses: addnab/docker-run-action@v3
with:
image: jnorwood/helm-docs:v1.11.3
options: -v ${{ github.workspace }}/charts:/helm-docs
run: helm-docs
- name: Verify that no changes are required
run: |
if $(git diff --quiet --exit-code); then
echo "Helm chart docs up to date"
else
echo "Helm chart docs not up to date:"
git diff
exit 1
fi
chart-test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Helm
uses: azure/setup-helm@v3
with:
version: v3.12.3
- name: Set up Taskfile
uses: arduino/setup-task@v1
- uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '17'
- name: Add bitnami repo
run: |
helm repo add bitnami https://charts.bitnami.com/bitnami
helm repo update
- name: Update Helm dependencies
run: |
cd charts/managed-identity-wallet
helm dependency build
- name: Install Helm unittest plugin
run: |
helm plugin install https://github.com/helm-unittest/helm-unittest.git
- name: Run Helm unittests
run: task helm:unittest
- name: Build app
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_USERNAME: ${{ github.actor }}
SKIP_GRADLE_TASKS_PARAM: "-x jacocoTestCoverageVerification -x test"
run: task app:build
- name: Kubernetes KinD Cluster
uses: container-tools/kind-action@v2
with:
node_image: 'kindest/node:v1.27.3'
version: v0.20.0
- name: Build image
uses: docker/build-push-action@v4
with:
context: .
push: true
tags: kind-registry:5000/miw:testing
- name: Install the chart on KinD cluster
run: helm install -n apps --create-namespace --wait --set image.tag=testing --set=image.repository=kind-registry:5000/miw testing charts/managed-identity-wallet