[stable/selenium] Fixes compatibility with 1.16 (#17536)

* Fixes compatibility with 1.16

Signed-off-by: Xiang Dai <764524258@qq.com>

* fix white noise

Signed-off-by: Xiang Dai <764524258@qq.com>

* fix a typo

Signed-off-by: Xiang Dai <764524258@qq.com>
This commit is contained in:
Xiang Dai
2019-10-02 13:08:08 -07:00
committed by Kubernetes Prow Robot
parent d5c9481807
commit 80f74ae8d8
7 changed files with 21 additions and 11 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
apiVersion: v1
name: selenium
version: 1.0.8
version: 1.0.9
appVersion: 3.141.59
description: Chart for selenium grid
keywords:
+10
View File
@@ -55,3 +55,13 @@ We truncate at 63 chars because some Kubernetes name fields are limited to this
{{- printf "%s-selenium-firefox-debug" .Release.Name | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{/*
Return the apiVersion of deployment.
*/}}
{{- define "deployment.apiVersion" -}}
{{- if semverCompare "<1.14-0" .Capabilities.KubeVersion.GitVersion -}}
{{- print "extensions/v1beta1" -}}
{{- else if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}}
{{- print "apps/v1" -}}
{{- end -}}
{{- end -}}
@@ -1,5 +1,5 @@
{{- if eq true .Values.chrome.enabled -}}
apiVersion: extensions/v1beta1
apiVersion: {{ template "deployment.apiVersion" . }}
kind: Deployment
metadata:
name: {{ template "selenium.chrome.fullname" . }}
@@ -88,7 +88,7 @@ spec:
resources:
{{ toYaml .Values.chrome.resources | trim | indent 12 }}
{{- if or .Values.global.imagePullSecrets .Values.chrome.imagePullSecrets }}
imagePullSecrets:
imagePullSecrets:
- name: {{ .Values.chrome.imagePullSecrets | default .Values.global.imagePullSecrets | quote }}
{{- end }}
volumes:
@@ -1,5 +1,5 @@
{{- if eq true .Values.chromeDebug.enabled -}}
apiVersion: extensions/v1beta1
apiVersion: {{ template "deployment.apiVersion" . }}
kind: Deployment
metadata:
name: {{ template "selenium.chromeDebug.fullname" . }}
@@ -90,7 +90,7 @@ spec:
resources:
{{ toYaml .Values.chromeDebug.resources | indent 12 }}
{{- if or .Values.global.imagePullSecrets .Values.chromeDebug.imagePullSecrets }}
imagePullSecrets:
imagePullSecrets:
- name: {{ .Values.chromeDebug.imagePullSecrets | default .Values.global.imagePullSecrets | quote }}
{{- end }}
volumes:
@@ -1,5 +1,5 @@
{{- if eq true .Values.firefox.enabled -}}
apiVersion: extensions/v1beta1
apiVersion: {{ template "deployment.apiVersion" . }}
kind: Deployment
metadata:
name: {{ template "selenium.firefox.fullname" . }}
@@ -84,7 +84,7 @@ spec:
resources:
{{ toYaml .Values.firefox.resources | indent 12 }}
{{- if or .Values.global.imagePullSecrets .Values.firefox.imagePullSecrets }}
imagePullSecrets:
imagePullSecrets:
- name: {{ .Values.firefox.imagePullSecrets | default .Values.global.imagePullSecrets | quote }}
{{- end }}
hostAliases:
@@ -1,5 +1,5 @@
{{- if eq true .Values.firefoxDebug.enabled -}}
apiVersion: extensions/v1beta1
apiVersion: {{ template "deployment.apiVersion" . }}
kind: Deployment
metadata:
name: {{ template "selenium.firefoxDebug.fullname" . }}
@@ -86,7 +86,7 @@ spec:
resources:
{{ toYaml .Values.firefoxDebug.resources | indent 12 }}
{{- if or .Values.global.imagePullSecrets .Values.firefoxDebug.imagePullSecrets }}
imagePullSecrets:
imagePullSecrets:
- name: {{ .Values.firefoxDebug.imagePullSecrets | default .Values.global.imagePullSecrets | quote }}
{{- end }}
hostAliases:
@@ -1,4 +1,4 @@
apiVersion: extensions/v1beta1
apiVersion: {{ template "deployment.apiVersion" . }}
kind: Deployment
metadata:
name: {{ template "selenium.hub.fullname" . }}
@@ -94,7 +94,7 @@ spec:
resources:
{{ toYaml .Values.hub.resources | trim | indent 12 -}}
{{- if or .Values.global.imagePullSecrets .Values.hub.imagePullSecrets }}
imagePullSecrets:
imagePullSecrets:
- name: {{ .Values.hub.imagePullSecrets | default .Values.global.imagePullSecrets | quote }}
{{- end }}
nodeSelector: