-
Notifications
You must be signed in to change notification settings - Fork 83
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enforce k8s version constraints (#1990)
* 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>
- Loading branch information
1 parent
4a66cd2
commit 3814bd8
Showing
12 changed files
with
115 additions
and
53 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
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,8 @@ | ||
# When adding a new version, look up the most recent patch version on Dockerhub | ||
# https://hub.docker.com/r/kindest/node/tags | ||
test_k8s_versions: | ||
- 1.23.17 | ||
- 1.24.15 | ||
- 1.25.11 | ||
- 1.26.6 | ||
- 1.27.3 |
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,14 @@ | ||
{{- $metadata := .Files.Get "metadata.yaml" | fromYaml }} | ||
{{- $versions := $metadata.test_k8s_versions }} | ||
{{- $oldestMinor := regexReplaceAll "^(\\d+\\.\\d+).*" (index $versions 0) "${1}"}} | ||
{{- $newestMinor := regexReplaceAll "^(\\d+\\.\\d+).*" (index $versions (sub (len $versions) 1)) "${1}"}} | ||
{{- $err := (printf "\nThis version of Astronomer \"Software\" was tested on the following kubernetes versions:\n%s" ($versions | toYaml)) }} | ||
{{ if and (semverCompare (printf "<%s" $oldestMinor) .Capabilities.KubeVersion.Version) (not .Values.forceIncompatibleKubernetes) -}} | ||
{{- $err := (printf "%s\n\nkubernetes version %s is unsupported because it is too old! You must upgrade your kubernetes version before continuing." $err .Capabilities.KubeVersion.Version) }} | ||
{{- $err := (printf "%s\n\nFor more details, refer to our documentation at https://docs.astronomer.io/software/release-lifecycle-policy" $err) }} | ||
{{- fail (printf "ABORT!\n%s" $err) }} | ||
{{ else if and (semverCompare (printf ">%s" $newestMinor) .Capabilities.KubeVersion.Version) (not .Values.forceIncompatibleKubernetes) -}} | ||
{{- $err := (printf "%s\n\nkubernetes version %s is unsupported because it is too new! You must wait for a new version of Astronomer \"Software\" to be released that supports your version of kubernetes." $err .Capabilities.KubeVersion.Version) }} | ||
{{- $err := (printf "%s\n\nFor more details, refer to our documentation at https://docs.astronomer.io/software/release-lifecycle-policy" $err) }} | ||
{{- fail (printf "ABORT!\n%s" $err) }} | ||
{{ end }} |
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