Skip to content

Commit

Permalink
chore(cicd): add helm install job to pr checks
Browse files Browse the repository at this point in the history
  • Loading branch information
michalziobro committed Apr 19, 2024
1 parent 8779295 commit a4a1c4c
Show file tree
Hide file tree
Showing 3 changed files with 78 additions and 1 deletion.
39 changes: 38 additions & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,45 @@ jobs:
needs: [cancel-previous]
steps:
- uses: actions/checkout@v4
- name: helm-check
- name: helm-check-default
uses: igabaydulin/[email protected]
env:
CHART_LOCATION: ./
CHART_VALUES: ./values.yaml
- name: helm-check-test
uses: igabaydulin/[email protected]
env:
CHART_LOCATION: ./
CHART_VALUES: ./values-test.yaml

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

- name: Set up Helm
uses: azure/[email protected]
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/[email protected]
with:
version: v3.10.1

- name: Create Kind cluster
uses: helm/[email protected]
with:
kubectl_version: ${{ matrix.k8s-version }}

- name: Run chart-testing (install)
run: ct install --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

0 comments on commit a4a1c4c

Please sign in to comment.