diff --git a/stable/aws-iam-authenticator/Chart.yaml b/stable/aws-iam-authenticator/Chart.yaml index f9bb76bae0..9025a580f3 100644 --- a/stable/aws-iam-authenticator/Chart.yaml +++ b/stable/aws-iam-authenticator/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v1 appVersion: "1.0" description: A Helm chart for aws-iam-authenticator name: aws-iam-authenticator -version: 0.1.2 +version: 0.1.3 home: https://github.com/kubernetes-sigs/aws-iam-authenticator maintainers: - name: plumdog diff --git a/stable/aws-iam-authenticator/templates/_helpers.tpl b/stable/aws-iam-authenticator/templates/_helpers.tpl index cc1a336c77..8893114dba 100644 --- a/stable/aws-iam-authenticator/templates/_helpers.tpl +++ b/stable/aws-iam-authenticator/templates/_helpers.tpl @@ -30,3 +30,14 @@ Create chart name and version as used by the chart label. {{- define "aws-iam-authenticator.chart" -}} {{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} {{- end -}} + +{{/* +Return the apiVersion of daemonset. +*/}} +{{- define "daemonset.apiVersion" -}} +{{- if .Capabilities.APIVersions.Has "apps/v1" -}} + {{- print "apps/v1" -}} +{{- else -}} + {{- print "extensions/v1beta1" -}} +{{- end -}} +{{- end -}} diff --git a/stable/aws-iam-authenticator/templates/daemonset.yaml b/stable/aws-iam-authenticator/templates/daemonset.yaml index 66aa35d885..98fbcd36b8 100644 --- a/stable/aws-iam-authenticator/templates/daemonset.yaml +++ b/stable/aws-iam-authenticator/templates/daemonset.yaml @@ -1,4 +1,4 @@ -apiVersion: extensions/v1beta1 +apiVersion: {{ template "daemonset.apiVersion" . }} kind: DaemonSet metadata: name: {{ template "aws-iam-authenticator.fullname" . }} @@ -8,6 +8,10 @@ metadata: release: {{ .Release.Name }} heritage: {{ .Release.Service }} spec: + selector: + matchLabels: + app: {{ template "aws-iam-authenticator.name" . }} + release: {{ .Release.Name }} updateStrategy: type: RollingUpdate template: