-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #349 from richardcase/fix_eks_install
fix: installation on eks
- Loading branch information
Showing
1 changed file
with
15 additions
and
2 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,9 +1,22 @@ | ||
{{/* | ||
This removes the part after the + in the kubernetes version string. | ||
v1.27.4+k3s1 -> v1.27.4 | ||
v1.26.12-eks-5e0fdde -> v1.26.12 | ||
v1.26.12-gke.1 -> v1.26.12 | ||
v1.28.0 -> v1.28.0 | ||
*/}} | ||
{{- define "strippedKubeVersion" -}} | ||
{{- $parts := split "+" .Capabilities.KubeVersion.Version -}} | ||
{{- print $parts._0 -}} | ||
{{- if (.Capabilities.KubeVersion.Version | contains "-eks-") -}} | ||
{{- $parts := split "-eks-" .Capabilities.KubeVersion.Version -}} | ||
{{- print $parts._0 -}} | ||
{{- else if (.Capabilities.KubeVersion.Version | contains "-gke.") -}} | ||
{{- $parts := split "-gke." .Capabilities.KubeVersion.Version -}} | ||
{{- print $parts._0 -}} | ||
{{- else if (.Capabilities.KubeVersion.Version | contains "-aks") -}} | ||
{{- $parts := split "-aks" .Capabilities.KubeVersion.Version -}} | ||
{{- print $parts._0 -}} | ||
{{- else -}} | ||
{{- $parts := split "+" .Capabilities.KubeVersion.Version -}} | ||
{{- print $parts._0 -}} | ||
{{- end -}} | ||
{{- end -}} |