mirror of
https://github.com/helm/charts.git
synced 2026-08-23 22:37:45 +00:00
[stable/seq] Feature apiVersion compatibility switch (#18140)
* Add apiVersion compatibility switch for deployment and ingress Signed-off-by: Markus Schlotbohm <markus_schlotbohm@as-gmbh.de> * Bump seq chart version Signed-off-by: Markus Schlotbohm <markus_schlotbohm@as-gmbh.de>
This commit is contained in:
committed by
Kubernetes Prow Robot
parent
2c9b6dd416
commit
c3e446ff96
@@ -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:
|
||||
|
||||
@@ -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 -}}
|
||||
@@ -1,4 +1,4 @@
|
||||
apiVersion: apps/v1
|
||||
apiVersion: {{ template "deployment.apiVersion" . }}
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: {{ template "seq.fullname" . }}
|
||||
|
||||
@@ -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 }}
|
||||
|
||||
Reference in New Issue
Block a user