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 (#303)
Browse files Browse the repository at this point in the history
[kibana] Add compatibility for k8s 1.16
  • Loading branch information
Crazybus authored Sep 30, 2019
2 parents 619ade4 + 7db4eeb commit 51ce614
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
2 changes: 1 addition & 1 deletion kibana/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ This helm chart is a lightweight way to configure and run our official [Kibana d

## Requirements

* Kubernetes >= 1.8
* Kubernetes >= 1.9
* [Helm](https://helm.sh/) >= 2.8.0

## Installing
Expand Down
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 51ce614

Please sign in to comment.