-
Notifications
You must be signed in to change notification settings - Fork 5
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 (#50)
Signed-off-by: Nicolas Takashi <nicolas.takashi@coralogix.com>
- Loading branch information
1 parent
9ffee8d
commit 82ab538
Showing
8 changed files
with
118 additions
and
21 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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: coralogix-operator | ||
name: helm-release | ||
|
||
on: | ||
workflow_dispatch: | ||
|
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,18 @@ | ||
name: helm-lint-and-test | ||
|
||
on: | ||
pull_request: | ||
paths: | ||
- "charts/coralogix-operator/**" | ||
branches: | ||
- main | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- 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,30 @@ | ||
#!/bin/bash | ||
|
||
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=$((errors_found + 1)) | ||
fi | ||
else | ||
echo "Base file not found for $crd_file" | ||
errors_found=$((errors_found + 1)) | ||
fi | ||
done | ||
|
||
if [ "$errors_found" -gt 0 ]; then | ||
exit 1 | ||
fi | ||
|
||
echo "CRDS are up to date" |
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 |