-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add update_bundle script to get latest version and update input bundle for staging and prod #1175
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could be worth thinking about writing this in Go
check_requirements | ||
|
||
# Generate bundle files for Kubernetes versions 1.27 to 1.31 for given environment | ||
for version in {27..31}; do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should ideally get this from a config file or from folder structure instead of hardcoded
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated, getting latest supported release from here
if [ "$repo" = "cluster-autoscaler/charts/cluster-autoscaler" ]; then | ||
output=$(echo $json_output | jq -r --arg kv "1.$k8s_version" ' | ||
.imageDetails | ||
| map(select(.imageTags | length > 0)) | ||
| map(select(.imageTags | map(test($kv)) | any)) | ||
| sort_by(.imagePushedAt) | ||
| last | ||
| .imageTags') | ||
# For metrics-server filter tag based on k8s version (1-28,1-29,etc) | ||
elif [ "$repo" = "metrics-server/charts/metrics-server" ]; then | ||
output=$(echo $json_output | jq -r --arg kv "1-$k8s_version" ' | ||
.imageDetails | ||
| map(select(.imageTags | length > 0)) | ||
| map(select(.imageTags | map(test($kv)) | any)) | ||
| sort_by(.imagePushedAt) | ||
| last | ||
| .imageTags') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can optimize this to not have this repeated code right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated.
yeah, in the next step - we can create the release PRs through bot, and can merge those during the release so that will be handled in Go. |
…e for staging and prod
ca815b8
to
f961070
Compare
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: jhaanvi5, vivek-koppuru The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/lgtm |
Description of changes:
This PR introduces a new
update_bundles.sh
script that automates the process of updating input bundle files for both staging and production bundles for packages release. The script fetches the latest versions of packages from ECR and updates the corresponding YAML files for Kubernetes versions. This addition will streamline our bundle update workflow during packages release and reduce manual errors.Testing
Tested script for both staging and prod bundles.
sh update_bundles.sh -e staging
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.