Skip to content

Commit

Permalink
test different values.yaml (#112)
Browse files Browse the repository at this point in the history
  • Loading branch information
aviramha authored Sep 29, 2024
1 parent 2349c3c commit d9ac07e
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,5 @@ jobs:
max_attempts: 5
retry_wait_seconds: 1
command: kubectl get mirrordoperators.operator.metalbear.co operator -o yaml
- name: check different values yaml files
run: ./test_values_files.sh
3 changes: 3 additions & 0 deletions test_values/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# This directory includes values yaml to be tested against

The CI will run each values.yaml with `--dry-run=server` to make sure we generate a valid manifest.
16 changes: 16 additions & 0 deletions test_values/operator_tolerations.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
operator:
tolerations:
- effect: NoSchedule
key: kubernetes.azure.com/scalesetpriority
operator: Equal
value: spot
- effect: NoSchedule
key: test
operator: Equal
value: spot

license:
file:
secret: mirrord-operator-license
data:
license.pem: "DOESN'TNEEDTOBOOTSOITCANBEINVALID"
8 changes: 8 additions & 0 deletions test_values_files.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/sh

# for each file in the test_values directory
# run helm install --dry-run=server
for file in test_values/*.yaml; do
echo "Running test for $file"
helm install --dry-run=server --debug -f $file mirrord-operator ./mirrord-operator
done

0 comments on commit d9ac07e

Please sign in to comment.