-
-
Notifications
You must be signed in to change notification settings - Fork 232
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test : validate all the cr in the example dir (#684)
* validate-example Signed-off-by: Shubham Gupta <[email protected]> * modify name Signed-off-by: Shubham Gupta <[email protected]> * fixes Signed-off-by: Shubham Gupta <[email protected]> * fix err Signed-off-by: Shubham Gupta <[email protected]> * fix Signed-off-by: Shubham Gupta <[email protected]> * crd Signed-off-by: Shubham Gupta <[email protected]> * fix examples Signed-off-by: Shubham Gupta <[email protected]> * fix yamls Signed-off-by: Shubham Gupta <[email protected]> * fix yaml Signed-off-by: Shubham Gupta <[email protected]> * fix lint Signed-off-by: Shubham Gupta <[email protected]> * fix lint Signed-off-by: Shubham Gupta <[email protected]> * fix lint Signed-off-by: Shubham Gupta <[email protected]> * fix lint Signed-off-by: Shubham Gupta <[email protected]> --------- Signed-off-by: Shubham Gupta <[email protected]>
- Loading branch information
1 parent
52c67ff
commit 4a857f9
Showing
64 changed files
with
472 additions
and
458 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
name: Validate Examples | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- master | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
validate-examples: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install yamllint | ||
run: sudo apt-get install -y yamllint | ||
|
||
- name: Lint YAML files | ||
run: yamllint --strict ./example | ||
|
||
- name: Install kubectl | ||
run: | | ||
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" | ||
chmod +x kubectl | ||
sudo mv kubectl /usr/local/bin/ | ||
- name: Create k8s Kind Cluster | ||
uses: helm/[email protected] | ||
with: | ||
cluster_name: kind | ||
|
||
- name: Apply CRD | ||
run: | | ||
for crd in $(find ./config/crd/bases -type f -name '*.yaml'); do | ||
kubectl create -f $crd | ||
done | ||
- name: Validate CRD Installation | ||
run: | | ||
CRDs=("redis" "redissentinels" "redisclusters" "redisreplications") | ||
for crd in "${CRDs[@]}"; do | ||
kubectl get crd $crd.redis.redis.opstreelabs.in || exit 1 | ||
done | ||
- name: Validate CR | ||
run: | | ||
for example in $(find ./example -type f -name '*.yaml'); do | ||
kubectl apply --dry-run=server -f $example | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
--- | ||
--- | ||
apiVersion: v1 | ||
kind: Secret | ||
metadata: | ||
name: redis-secret | ||
data: | ||
password: T3BzdHJlZUAxMjM0Cg== | ||
type: Opaque | ||
password: T3BzdHJlZUAxMjM0Cg== | ||
type: Opaque |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.