Skip to content
This repository has been archived by the owner on May 16, 2023. It is now read-only.

Commit

Permalink
[kibana] Add compatibility for k8s 1.16
Browse files Browse the repository at this point in the history
  • Loading branch information
ckotzbauer committed Sep 28, 2019
1 parent 2bd7616 commit f82173c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
11 changes: 11 additions & 0 deletions kibana/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,14 @@ We truncate at 63 chars because some Kubernetes name fields are limited to this
{{- $name := default .Release.Name .Values.nameOverride -}}
{{- printf "%s-%s" $name .Chart.Name | trunc 63 | trimSuffix "-" -}}
{{- end -}}

{{/*
Return the appropriate apiVersion for ingress.
*/}}
{{- define "kibana.ingress.apiVersion" -}}
{{- if semverCompare "<1.14-0" .Capabilities.KubeVersion.GitVersion -}}
{{- print "extensions/v1beta1" -}}
{{- else -}}
{{- print "networking.k8s.io/v1beta1" -}}
{{- end -}}
{{- end -}}
2 changes: 1 addition & 1 deletion kibana/templates/ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
{{- $fullName := include "fullname" . -}}
{{- $servicePort := .Values.service.port -}}
{{- $ingressPath := .Values.ingress.path -}}
apiVersion: extensions/v1beta1
apiVersion: {{ template "kibana.ingress.apiVersion" . }}
kind: Ingress
metadata:
name: {{ $fullName }}
Expand Down

0 comments on commit f82173c

Please sign in to comment.