[cluster-autoscaler] Update apiversions to latest (#17783)

Allows deployment to 1.16 clusters

Signed-off-by: Adam Graves <adam.graves85@gmail.com>
This commit is contained in:
Adam Graves
2019-10-10 05:51:43 -07:00
committed by Kubernetes Prow Robot
parent 755a9d0c4a
commit 89230db073
6 changed files with 25 additions and 7 deletions
+1 -1
View File
@@ -2,7 +2,7 @@ apiVersion: v1
description: Scales worker nodes within autoscaling groups.
icon: https://github.com/kubernetes/kubernetes/blob/master/logo/logo.png
name: cluster-autoscaler
version: 5.1.1
version: 6.0.0
appVersion: 1.14.5
home: https://github.com/kubernetes/autoscaler
sources:
-1
View File
@@ -164,7 +164,6 @@ Parameter | Description | Default
`extraEnvSecrets` | additional container environment variables from a secret | `{}`
`nodeSelector` | node labels for pod assignment | `{}`
`podAnnotations` | annotations to add to each pod | `{}`
`deployment.apiVersion` | apiVersion for the deployment | `extensions/v1beta1`
`rbac.create` | If true, create & use RBAC resources | `false`
`rbac.serviceAccountName` | existing ServiceAccount to use (ignored if rbac.create=true) | `default`
`rbac.serviceAccountAnnotations` | Additional Service Account annotations | `{}`
@@ -43,3 +43,25 @@ Return labels, including instance and name.
app.kubernetes.io/managed-by: {{ .Release.Service | quote }}
helm.sh/chart: {{ include "cluster-autoscaler.chart" . | quote }}
{{- 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 podsecuritypolicy.
*/}}
{{- define "podsecuritypolicy.apiVersion" -}}
{{- if semverCompare "<1.10-0" .Capabilities.KubeVersion.GitVersion -}}
{{- print "extensions/v1beta1" -}}
{{- else -}}
{{- print "policy/v1beta1" -}}
{{- end -}}
{{- end -}}
@@ -1,6 +1,6 @@
{{- if or .Values.autoDiscovery.clusterName .Values.autoscalingGroups }}
{{/* one of the above is required */}}
apiVersion: {{ .Values.deployment.apiVersion }}
apiVersion: {{ template "deployment.apiVersion" . }}
kind: Deployment
metadata:
labels:
@@ -1,5 +1,5 @@
{{- if .Values.rbac.pspEnabled }}
apiVersion: extensions/v1beta1
apiVersion: {{ template "podsecuritypolicy.apiVersion" . }}
kind: PodSecurityPolicy
metadata:
name: {{ template "cluster-autoscaler.fullname" . }}
-3
View File
@@ -104,9 +104,6 @@ podAnnotations: {}
podLabels: {}
replicaCount: 1
deployment:
apiVersion: "extensions/v1beta1"
rbac:
## If true, create & use RBAC resources
##