Skip to content
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

Enforce k8s version constraints #1990

Merged
merged 9 commits into from
Sep 14, 2023

Conversation

danielhoherd
Copy link
Member

@danielhoherd danielhoherd commented Sep 11, 2023

Description

  • Create a metadata.yaml file that holds the single source of truth of which versions of k8s are supported. This file should be used for other cases where having a single source of data that is not specific to helm is needed.
  • Enforce k8s version constraints by erroring helm when the k8s version is too new or too old (Major.Minor versions that have not been tested)
  • Include an override for the version constraints that can be used to get out of sticky situations.
  • Update chart_tests to use metadata.yaml as its source of what k8s versions to test.
  • Update generate_circleci_config.py to use metadata.yaml as its source of what k8s versions to generate configs for.
  • remove need for GitPython. use pathlib instead.
  • Add validate_objects arg to render_chart(). This is required when we support the latest k8s version available because the schema files of the next version would not yet be available to validate. This also avoids caching schema files in the repo for versions that we do not support.
  • Unrelated change: i am sneaking in the removal the ability to release non-release branches into this PR. we never do that, and it's not a good idea, and most of the time it would fail anyway.

Related Issues

https://github.com/astronomer/issues/issues/5824

See the above ticket for a link to relevant slack discussion about why this change is needed.

Testing

I think I have covered all cases with unit tests. QA should be on the lookout for helm errors that indicate that the version is too new or old. These errors will be obvious because helm will fail and not install the chart.

Merging

This change set needs to be merged to all supported branches.

@danielhoherd danielhoherd requested a review from a team as a code owner September 11, 2023 21:42
@danielhoherd danielhoherd merged commit 3814bd8 into master Sep 14, 2023
7 of 8 checks passed
@danielhoherd danielhoherd deleted the 5824-enforce-k8s-version-constraints branch September 14, 2023 20:53
danielhoherd added a commit that referenced this pull request Sep 14, 2023
* Put k8s version constraints into helm.

* Remove GitPython

* Use metadata.yaml in pytest and circleci. Add tests.

* add validate_objects arg to render_chart()

* Add tests

* Do not allow releasing to internal from non-release branches

---------

Co-authored-by: pgvishnuram <81585115+pgvishnuram@users.noreply.github.com>
danielhoherd added a commit that referenced this pull request Sep 14, 2023
* Put k8s version constraints into helm.

* Remove GitPython

* Use metadata.yaml in pytest and circleci. Add tests.

* add validate_objects arg to render_chart()

* Add tests

* Do not allow releasing to internal from non-release branches

---------

Co-authored-by: pgvishnuram <81585115+pgvishnuram@users.noreply.github.com>
danielhoherd added a commit that referenced this pull request Sep 14, 2023
* Put k8s version constraints into helm.

* Remove GitPython

* Use metadata.yaml in pytest and circleci. Add tests.

* add validate_objects arg to render_chart()

* Add tests

* Do not allow releasing to internal from non-release branches

---------

Co-authored-by: pgvishnuram <81585115+pgvishnuram@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants