diff --git a/stable/drone/Chart.yaml b/stable/drone/Chart.yaml index 4181e0800d..44dc5ec843 100644 --- a/stable/drone/Chart.yaml +++ b/stable/drone/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v1 name: drone home: https://drone.io/ icon: https://drone.io/apple-touch-icon.png -version: 2.6.0 +version: 2.6.1 appVersion: 1.6.1 description: Drone is a Continuous Delivery system built on container technology keywords: diff --git a/stable/drone/templates/_helpers.tpl b/stable/drone/templates/_helpers.tpl index ede20f81f2..e435fcef2d 100644 --- a/stable/drone/templates/_helpers.tpl +++ b/stable/drone/templates/_helpers.tpl @@ -69,3 +69,14 @@ Create the name of the secret for an enterprise license key {{ printf "%s-%s" (include "drone.fullname" .) "license-key" | trunc 63 }} {{- end -}} {{- end -}} + +{{/* +Return the appropriate apiVersion for ingress. +*/}} +{{- define "drone.ingress.apiVersion" -}} +{{- if semverCompare "<1.14-0" .Capabilities.KubeVersion.GitVersion -}} +{{- print "extensions/v1beta1" -}} +{{- else if semverCompare "^1.14-0" .Capabilities.KubeVersion.GitVersion -}} +{{- print "networking.k8s.io/v1beta1" -}} +{{- end -}} +{{- end -}} diff --git a/stable/drone/templates/ingress.yaml b/stable/drone/templates/ingress.yaml index 6d6e6a335e..0f1c23fcf4 100644 --- a/stable/drone/templates/ingress.yaml +++ b/stable/drone/templates/ingress.yaml @@ -1,7 +1,7 @@ {{- if .Values.ingress.enabled -}} {{- $fullName := include "drone.fullname" . }} {{- $httpPort := .Values.service.httpPort }} -apiVersion: networking.k8s.io/v1beta1 +apiVersion: {{ template "drone.ingress.apiVersion" . }} kind: Ingress metadata: annotations: