diff --git a/stable/seq/Chart.yaml b/stable/seq/Chart.yaml index 01ff5bfc32..cc296d7d94 100644 --- a/stable/seq/Chart.yaml +++ b/stable/seq/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v1 name: seq -version: 1.0.2 +version: 1.0.3 appVersion: 5 description: Seq is the easiest way for development teams to capture, search and visualize structured log events! This page will walk you through the very quick setup process. keywords: diff --git a/stable/seq/templates/_helpers.tpl b/stable/seq/templates/_helpers.tpl index 1a5b3b9bcf..20f420b533 100644 --- a/stable/seq/templates/_helpers.tpl +++ b/stable/seq/templates/_helpers.tpl @@ -30,3 +30,26 @@ Create chart name and version as used by the chart label. {{- define "seq.chart" -}} {{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} {{- end -}} + +{{/* +Return the appropriate apiVersion for deployment. +*/}} +{{- define "deployment.apiVersion" -}} +{{- if semverCompare ">=1.9-0" .Capabilities.KubeVersion.GitVersion -}} +{{- print "apps/v1" -}} +{{- else -}} +{{- print "extensions/v1beta1" -}} +{{- end -}} +{{- end -}} + + +{{/* +Return the appropriate apiVersion for ingress. +*/}} +{{- define "ingress.apiVersion" -}} +{{- if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}} +{{- print "networking.k8s.io/v1beta1" -}} +{{- else -}} +{{- print "extensions/v1beta1" -}} +{{- end -}} +{{- end -}} \ No newline at end of file diff --git a/stable/seq/templates/deployment.yaml b/stable/seq/templates/deployment.yaml index e8641118b2..cce48ebcf0 100644 --- a/stable/seq/templates/deployment.yaml +++ b/stable/seq/templates/deployment.yaml @@ -1,4 +1,4 @@ -apiVersion: apps/v1 +apiVersion: {{ template "deployment.apiVersion" . }} kind: Deployment metadata: name: {{ template "seq.fullname" . }} diff --git a/stable/seq/templates/ingress.yaml b/stable/seq/templates/ingress.yaml index d079e3fc78..727fb40218 100644 --- a/stable/seq/templates/ingress.yaml +++ b/stable/seq/templates/ingress.yaml @@ -2,7 +2,7 @@ {{- $fullName := include "seq.fullname" . -}} {{- $servicePort := .Values.service.port -}} {{- $ingressPath := .Values.ingress.path -}} -apiVersion: extensions/v1beta1 +apiVersion: {{ template "ingress.apiVersion" . }} kind: Ingress metadata: name: {{ $fullName }}