Skip to content

Commit

Permalink
Fix versioning once again
Browse files Browse the repository at this point in the history
  • Loading branch information
nepalez committed Jun 22, 2021
1 parent 86f41b3 commit a6e7eb9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
8 changes: 4 additions & 4 deletions imgproxy/templates/_versions.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
{{- $kubeVersion := $.Capabilities.KubeVersion.Version }}
{{- $apiVersions := $.Capabilities.APIVersions }}

{{- if ($kubeVersion | semverCompare "<1.14" | and ($apiVersions.Has "extensions/v1beta1")) -}}
{{- if ($kubeVersion | semverCompare "<1.14.0-0" | and ($apiVersions.Has "extensions/v1beta1")) -}}
{{- "extensions/v1beta1" -}}
{{- else if ($kubeVersion | semverCompare "<1.20" | and ($apiVersions.Has "networking.k8s.io/v1beta1")) -}}
{{- else if ($kubeVersion | semverCompare "<1.20.0-0" | and ($apiVersions.Has "networking.k8s.io/v1beta1")) -}}
{{- "networking.k8s.io/v1beta1" -}}
{{- else if $apiVersions.Has "networking.k8s.io/v1" -}}
{{- "networking.k8s.io/v1" -}}
Expand All @@ -20,7 +20,7 @@
{{- $kubeVersion := $.Capabilities.KubeVersion.Version }}
{{- $apiVersions := $.Capabilities.APIVersions }}

{{- if ($kubeVersion | semverCompare "<1.14" | and ($apiVersions.Has "scheduling.k8s.io/v1beta1")) -}}
{{- if ($kubeVersion | semverCompare "<1.14.0-0" | and ($apiVersions.Has "scheduling.k8s.io/v1beta1")) -}}
{{- "scheduling.k8s.io/v1beta1" -}}
{{- else if $apiVersions.Has "scheduling.k8s.io/v1" }}
{{- "scheduling.k8s.io/v1" -}}
Expand All @@ -29,5 +29,5 @@

{{/* Check if preemption policy is supported for PriorityClass. */}}
{{- define "imgproxy.versions.features.priorityClassPreemptionPolicy" -}}
{{- $.Capabilities.KubeVersion.Version | semverCompare ">= 1.19" }}
{{- $.Capabilities.KubeVersion.Version | semverCompare ">= 1.19.0-0" }}
{{- end }}
1 change: 1 addition & 0 deletions imgproxy/templates/ingress.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{{- $apiVersion := include "imgproxy.versions.ingress" . }}
{{- with .Values.resources.ingress }}
{{- if (.enabled | and $apiVersion) }}
---
apiVersion: {{ $apiVersion }}
kind: Ingress
metadata:
Expand Down

0 comments on commit a6e7eb9

Please sign in to comment.