-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[CHORE] updating helm crds templates
Signed-off-by: Nicolas Takashi <[email protected]>
- Loading branch information
1 parent
9ffee8d
commit 83ea2dd
Showing
7 changed files
with
116 additions
and
20 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,16 @@ | ||
name: coralogix-operator | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/[email protected] | ||
- name: Check if Helm CRDs templates are updated | ||
run: | | ||
make helm-check-crd-version |
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 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,31 @@ | ||
#!/bin/bash | ||
# This shell script is going to check if the CRDs on the helm directory is updated or not. | ||
|
||
crds_path="charts/coralogix-operator/templates/crds" | ||
bases_path="config/crd/bases" | ||
|
||
errors_found=0 | ||
|
||
# Get a list of YAML files in the two paths | ||
crds_files=$(find "$crds_path" -type f -name "*.yaml") | ||
|
||
# Compare the contents of corresponding files | ||
for crd_file in $crds_files; do | ||
base_file="$bases_path/$(basename $crd_file)" | ||
|
||
if [ -f "$base_file" ]; then | ||
if ! cmp -s "$crd_file" "$base_file"; then | ||
echo "CRD file $crd_file is outdated, please run make helm-update-crds" | ||
((errors_found++)) | ||
fi | ||
else | ||
echo "Base file not found for $crd_file" | ||
((errors_found++)) | ||
fi | ||
done | ||
|
||
if [ "$errors_found" -gt 0 ]; then | ||
exit 1 | ||
fi | ||
|
||
echo CRDs are updated |
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,20 @@ | ||
#!/bin/bash | ||
# This shell script will update the helm CRDs files | ||
|
||
crds_path="charts/coralogix-operator/templates/crds" | ||
bases_path="config/crd/bases" | ||
|
||
# Get a list of YAML files in the two paths | ||
crds_files=$(find "$crds_path" -type f -name "*.yaml") | ||
|
||
# Replace the contents of corresponding files | ||
for crd_file in $crds_files; do | ||
base_file="$bases_path/$(basename $crd_file)" | ||
|
||
if [ -f "$base_file" ]; then | ||
cp "$base_file" "$crd_file" | ||
echo "Replaced CRD file: $crd_file" | ||
else | ||
echo "Base file not found for $crd_file" | ||
fi | ||
done |