mirror of
https://github.com/helm/charts.git
synced 2026-08-23 22:37:45 +00:00
add back support for ingress in k8s < 1.14 (#20591)
Signed-off-by: George Kaz <egeorgekaz@gmail.com>
This commit is contained in:
@@ -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:
|
||||
|
||||
@@ -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 -}}
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user