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

fix: installation on eks #349

Merged
merged 1 commit into from
Jan 17, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 15 additions & 2 deletions charts/rancher-turtles/templates/_helpers.tpl
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 -}}
richardcase marked this conversation as resolved.
Show resolved Hide resolved
{{- print $parts._0 -}}
{{- end -}}
{{- end -}}
Loading