Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: energywebfoundation/generic-microservices-helm
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v1.3.3
Choose a base ref
...
head repository: energywebfoundation/generic-microservices-helm
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
  • 8 commits
  • 5 files changed
  • 2 contributors

Commits on Apr 18, 2024

  1. Copy the full SHA
    8779295 View commit details

Commits on Apr 19, 2024

  1. Copy the full SHA
    a4a1c4c View commit details
  2. fix test values location

    michalziobro committed Apr 19, 2024
    Copy the full SHA
    f5c948a View commit details
  3. fix k8s versions

    michalziobro committed Apr 19, 2024
    Copy the full SHA
    17b082c View commit details
  4. use config file for ct

    michalziobro committed Apr 19, 2024
    Copy the full SHA
    2214189 View commit details
  5. test wrong api version

    michalziobro committed Apr 19, 2024
    Copy the full SHA
    3954109 View commit details
  6. revert api

    michalziobro committed Apr 19, 2024
    Copy the full SHA
    a399341 View commit details
  7. Merge pull request #44 from energywebfoundation/DOI-3055-Include-helm…

    …-install-in-generic-microservice-helm-chart-test-pipeline
    
    Doi 3055 include helm install in generic microservice helm chart test pipeline
    michalziobro authored Apr 19, 2024
    Copy the full SHA
    6dd07d3 View commit details
Showing with 88 additions and 7 deletions.
  1. +40 −3 .github/workflows/ci.yaml
  2. +4 −4 .github/workflows/release.yaml
  3. +4 −0 ci/config.yaml
  4. +1 −0 ci/default-values.yaml
  5. +39 −0 ci/test-values.yaml
43 changes: 40 additions & 3 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -8,17 +8,54 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 3
steps:
- uses: styfle/cancel-workflow-action@0.9.0
- uses: styfle/cancel-workflow-action@0.12.1
with:
access_token: ${{ github.token }}

helm-check:
runs-on: ubuntu-latest
needs: [cancel-previous]
steps:
- uses: actions/checkout@v2
- name: helm-check
- uses: actions/checkout@v4
- name: helm-check-default
uses: igabaydulin/helm-check-action@0.2.0
env:
CHART_LOCATION: ./
CHART_VALUES: ./values.yaml
- name: helm-check-test
uses: igabaydulin/helm-check-action@0.2.0
env:
CHART_LOCATION: ./
CHART_VALUES: ./ci/test-values.yaml

test-k8s:
runs-on: ubuntu-latest
needs: [helm-check]
strategy:
matrix:
k8s-version: [ v1.27.12, v1.26.15 ]
steps:
- uses: actions/checkout@v4

- name: Set up Helm
uses: azure/setup-helm@v4.2.0
with:
version: v3.10.3

- uses: actions/setup-python@v5
with:
python-version: '3.10'
check-latest: true

- name: Set up chart-testing
uses: helm/chart-testing-action@v2.6.1
with:
version: v3.10.1

- name: Create Kind cluster
uses: helm/kind-action@v1.9.0
with:
kubectl_version: ${{ matrix.k8s-version }}

- name: Run chart-testing (install)
run: ct install --config ci/config.yaml
8 changes: 4 additions & 4 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 3
steps:
- uses: styfle/cancel-workflow-action@0.11.0
- uses: styfle/cancel-workflow-action@0.12.1
with:
access_token: ${{ github.token }}

@@ -26,7 +26,7 @@ jobs:
changelog: ${{ steps.tag_version.outputs.changelog }}
tag: ${{ steps.tag_version.outputs.new_tag }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

# Take the 1st version from Chart.yaml
- name: Get Chart Version
@@ -50,13 +50,13 @@ jobs:

steps:
- name: Create a GitHub release
uses: ncipollo/release-action@v1.12.0
uses: ncipollo/release-action@v1.14.0
with:
tag: ${{ needs.push-tag.outputs.tag }}
name: Release ${{ needs.push-tag.outputs.tag }}
body: ${{ needs.push-tag.outputs.changelog }}

- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Push Helm chart to OCI compatible registry (Github)
uses: bsord/helm-push@v4.2.0
4 changes: 4 additions & 0 deletions ci/config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
chart-repos:
- bitnami=https://charts.bitnami.com/bitnami
charts: ./
helm-extra-args: "--timeout 60s"
1 change: 1 addition & 0 deletions ci/default-values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Keep empty file for chart testing to grab defaults from values.yaml
39 changes: 39 additions & 0 deletions ci/test-values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
replicaCount: 2

# Pod disruption budget will be created only if replicaCount > 1
pdb:
enabled: true
minAvailable: 1

readinessProbe:
enabled: true
initialDelaySeconds: 10

livenessProbe:
enabled: true
initialDelaySeconds: 10

image:
repository: nginx
pullPolicy: IfNotPresent
# Overrides the image tag whose default is the chart appVersion.
tag: "latest"

autoscaling:
enabled: true
minReplicas: 2
maxReplicas: 3
targetCPUUtilizationPercentage: 80
# targetMemoryUtilizationPercentage: 80

# Allows you to add any config files in specified mount path
configFiles:
config.yml: |
key: value
example.json: |
{
"key1": "value1",
"key2": "value2"
}
configFilesMountPath: /usr/share/config