[stable/pgadmin] update api versions (#20751)

Update Ingress and Deployment apiVersions for Kubernetes 1.16 support

Signed-off-by: Rowan Ruseler <rowanruseler@gmail.com>
This commit is contained in:
rowanr
2020-02-14 13:21:28 -08:00
committed by GitHub
parent 64b0988b97
commit f518252aff
4 changed files with 25 additions and 3 deletions
+1 -1
View File
@@ -1,7 +1,7 @@
apiVersion: v1
description: pgAdmin is a web based administration tool for PostgreSQL database
name: pgadmin
version: 1.1.5
version: 1.2.0
appVersion: 4.18.0
home: https://www.pgadmin.org/
source: https://github.com/rowanruseler/pgadmin
+22
View File
@@ -61,3 +61,25 @@ Defines a JSON file containing server definitions. This allows connection inform
}
}
{{- end -}}
{{/*
Return the appropriate apiVersion for deployment.
*/}}
{{- define "deployment.apiVersion" -}}
{{- if semverCompare "<1.9-0" .Capabilities.KubeVersion.GitVersion -}}
{{- print "apps/v1beta2" -}}
{{- else -}}
{{- print "apps/v1" -}}
{{- end -}}
{{- end -}}
{{/*
Return the appropriate apiVersion for ingress.
*/}}
{{- define "ingress.apiVersion" -}}
{{- if .Capabilities.APIVersions.Has "networking.k8s.io/v1beta1" }}
{{- print "networking.k8s.io/v1beta1" -}}
{{- else -}}
{{- print "extensions/v1beta1" -}}
{{- end -}}
{{- end -}}
+1 -1
View File
@@ -1,5 +1,5 @@
{{- $fullName := include "pgadmin.fullname" . -}}
apiVersion: apps/v1
apiVersion: {{ template "deployment.apiVersion" . }}
kind: Deployment
metadata:
name: {{ $fullName }}
+1 -1
View File
@@ -1,6 +1,6 @@
{{- if .Values.ingress.enabled -}}
{{- $fullName := include "pgadmin.fullname" . -}}
apiVersion: extensions/v1beta1
apiVersion: {{ template "ingress.apiVersion" . }}
kind: Ingress
metadata:
name: {{ $fullName }}