From 7f6c71987540e48ff051786fddbc8a2296d693c6 Mon Sep 17 00:00:00 2001 From: kevinschumacher Date: Sun, 10 Sep 2017 15:38:11 -0400 Subject: [PATCH] [stable/cluster-autoscaler] #1785 namespace defined templates with chart name (#1982) --- stable/cluster-autoscaler/Chart.yaml | 10 +++++----- stable/cluster-autoscaler/templates/NOTES.txt | 2 +- stable/cluster-autoscaler/templates/_helpers.tpl | 4 ++-- stable/cluster-autoscaler/templates/clusterrole.yaml | 4 ++-- .../templates/clusterrolebinding.yaml | 8 ++++---- stable/cluster-autoscaler/templates/deployment.yaml | 10 +++++----- stable/cluster-autoscaler/templates/role.yaml | 4 ++-- stable/cluster-autoscaler/templates/rolebinding.yaml | 8 ++++---- stable/cluster-autoscaler/templates/service.yaml | 6 +++--- .../cluster-autoscaler/templates/serviceaccount.yaml | 4 ++-- 10 files changed, 30 insertions(+), 30 deletions(-) diff --git a/stable/cluster-autoscaler/Chart.yaml b/stable/cluster-autoscaler/Chart.yaml index d602d216b2..7e61ab099f 100644 --- a/stable/cluster-autoscaler/Chart.yaml +++ b/stable/cluster-autoscaler/Chart.yaml @@ -2,11 +2,11 @@ apiVersion: v1 description: Scales worker nodes within autoscaling groups. icon: https://github.com/kubernetes/kubernetes/blob/master/logo/logo.png name: cluster-autoscaler -version: 0.1.3 +version: 0.2.0 sources: - - https://github.com/kubernetes/autoscaler/tree/master/cluster-autoscaler - - https://github.com/spotinst/kubernetes-autoscaler/tree/master/cluster-autoscaler +- https://github.com/kubernetes/autoscaler/tree/master/cluster-autoscaler +- https://github.com/spotinst/kubernetes-autoscaler/tree/master/cluster-autoscaler maintainers: - - name: Michael Goodness - email: mgoodness@gmail.com +- name: Michael Goodness + email: mgoodness@gmail.com engine: gotpl diff --git a/stable/cluster-autoscaler/templates/NOTES.txt b/stable/cluster-autoscaler/templates/NOTES.txt index 1452934f0d..f0623d6034 100644 --- a/stable/cluster-autoscaler/templates/NOTES.txt +++ b/stable/cluster-autoscaler/templates/NOTES.txt @@ -1,3 +1,3 @@ To verify that aws-cluster-autoscaler has started, run: - kubectl --namespace={{ .Release.Namespace }} get pods -l "app={{ template "name" . }},release={{ .Release.Name }}" + kubectl --namespace={{ .Release.Namespace }} get pods -l "app={{ template "cluster-autoscaler.name" . }},release={{ .Release.Name }}" diff --git a/stable/cluster-autoscaler/templates/_helpers.tpl b/stable/cluster-autoscaler/templates/_helpers.tpl index 13d3b6ae7b..e297f223ce 100644 --- a/stable/cluster-autoscaler/templates/_helpers.tpl +++ b/stable/cluster-autoscaler/templates/_helpers.tpl @@ -2,7 +2,7 @@ {{/* Expand the name of the chart. */}} -{{- define "name" -}} +{{- define "cluster-autoscaler.name" -}} {{- default (printf "%s-%s" .Values.cloudProvider .Chart.Name) .Values.nameOverride | trunc 63 | trimSuffix "-" -}} {{- end -}} @@ -10,7 +10,7 @@ Expand the name of the chart. Create a default fully qualified app name. We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). */}} -{{- define "fullname" -}} +{{- define "cluster-autoscaler.fullname" -}} {{- $name := default (printf "%s-%s" .Values.cloudProvider .Chart.Name) .Values.nameOverride -}} {{- if ne $name .Release.Name -}} {{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} diff --git a/stable/cluster-autoscaler/templates/clusterrole.yaml b/stable/cluster-autoscaler/templates/clusterrole.yaml index 3c3c533485..844a663196 100644 --- a/stable/cluster-autoscaler/templates/clusterrole.yaml +++ b/stable/cluster-autoscaler/templates/clusterrole.yaml @@ -3,11 +3,11 @@ apiVersion: rbac.authorization.k8s.io/v1beta1 kind: ClusterRole metadata: labels: - app: {{ template "name" . }} + app: {{ template "cluster-autoscaler.name" . }} chart: {{ .Chart.Name }}-{{ .Chart.Version }} heritage: {{ .Release.Service }} release: {{ .Release.Name }} - name: {{ template "fullname" . }} + name: {{ template "cluster-autoscaler.fullname" . }} rules: - apiGroups: - "" diff --git a/stable/cluster-autoscaler/templates/clusterrolebinding.yaml b/stable/cluster-autoscaler/templates/clusterrolebinding.yaml index 5a48ca212f..063f88c80a 100644 --- a/stable/cluster-autoscaler/templates/clusterrolebinding.yaml +++ b/stable/cluster-autoscaler/templates/clusterrolebinding.yaml @@ -3,17 +3,17 @@ apiVersion: rbac.authorization.k8s.io/v1beta1 kind: ClusterRoleBinding metadata: labels: - app: {{ template "name" . }} + app: {{ template "cluster-autoscaler.name" . }} chart: {{ .Chart.Name }}-{{ .Chart.Version }} heritage: {{ .Release.Service }} release: {{ .Release.Name }} - name: {{ template "fullname" . }} + name: {{ template "cluster-autoscaler.fullname" . }} roleRef: apiGroup: rbac.authorization.k8s.io kind: ClusterRole - name: {{ template "fullname" . }} + name: {{ template "cluster-autoscaler.fullname" . }} subjects: - kind: ServiceAccount - name: {{ template "fullname" . }} + name: {{ template "cluster-autoscaler.fullname" . }} namespace: {{ .Release.Namespace }} {{- end -}} diff --git a/stable/cluster-autoscaler/templates/deployment.yaml b/stable/cluster-autoscaler/templates/deployment.yaml index 6f4eed8811..5fdd5f65e8 100644 --- a/stable/cluster-autoscaler/templates/deployment.yaml +++ b/stable/cluster-autoscaler/templates/deployment.yaml @@ -2,11 +2,11 @@ apiVersion: extensions/v1beta1 kind: Deployment metadata: labels: - app: {{ template "name" . }} + app: {{ template "cluster-autoscaler.name" . }} chart: {{ .Chart.Name }}-{{ .Chart.Version }} heritage: {{ .Release.Service }} release: {{ .Release.Name }} - name: {{ template "fullname" . }} + name: {{ template "cluster-autoscaler.fullname" . }} spec: replicas: {{ .Values.replicaCount }} template: @@ -16,14 +16,14 @@ spec: {{ toYaml .Values.podAnnotations | indent 8 }} {{- end }} labels: - app: {{ template "name" . }} + app: {{ template "cluster-autoscaler.name" . }} release: {{ .Release.Name }} {{- if .Values.podLabels }} {{ toYaml .Values.podLabels | indent 8 }} {{- end }} spec: containers: - - name: {{ template "name" . }} + - name: {{ template "cluster-autoscaler.name" . }} {{- if eq .Values.cloudProvider "spotinst" }} image: "{{ .Values.spotinst.image.repository }}:{{ .Values.spotinst.image.tag }}" imagePullPolicy: "{{ .Values.spotinst.image.pullPolicy }}" @@ -67,7 +67,7 @@ spec: nodeSelector: {{ toYaml .Values.nodeSelector | indent 8 }} {{- end }} - serviceAccountName: {{ if .Values.rbac.create }}{{ template "fullname" . }}{{ else }}"{{ .Values.rbac.serviceAccountName }}"{{ end }} + serviceAccountName: {{ if .Values.rbac.create }}{{ template "cluster-autoscaler.fullname" . }}{{ else }}"{{ .Values.rbac.serviceAccountName }}"{{ end }} tolerations: {{ toYaml .Values.tolerations | indent 8 }} volumes: diff --git a/stable/cluster-autoscaler/templates/role.yaml b/stable/cluster-autoscaler/templates/role.yaml index aefd2c0620..eab4e195b2 100644 --- a/stable/cluster-autoscaler/templates/role.yaml +++ b/stable/cluster-autoscaler/templates/role.yaml @@ -3,11 +3,11 @@ apiVersion: rbac.authorization.k8s.io/v1beta1 kind: Role metadata: labels: - app: {{ template "name" . }} + app: {{ template "cluster-autoscaler.name" . }} chart: {{ .Chart.Name }}-{{ .Chart.Version }} heritage: {{ .Release.Service }} release: {{ .Release.Name }} - name: {{ template "fullname" . }} + name: {{ template "cluster-autoscaler.fullname" . }} rules: - apiGroups: - "" diff --git a/stable/cluster-autoscaler/templates/rolebinding.yaml b/stable/cluster-autoscaler/templates/rolebinding.yaml index 7ba52c339e..16b9adf0de 100644 --- a/stable/cluster-autoscaler/templates/rolebinding.yaml +++ b/stable/cluster-autoscaler/templates/rolebinding.yaml @@ -3,17 +3,17 @@ apiVersion: rbac.authorization.k8s.io/v1beta1 kind: RoleBinding metadata: labels: - app: {{ template "name" . }} + app: {{ template "cluster-autoscaler.name" . }} chart: {{ .Chart.Name }}-{{ .Chart.Version }} heritage: {{ .Release.Service }} release: {{ .Release.Name }} - name: {{ template "fullname" . }} + name: {{ template "cluster-autoscaler.fullname" . }} roleRef: apiGroup: rbac.authorization.k8s.io kind: Role - name: {{ template "fullname" . }} + name: {{ template "cluster-autoscaler.fullname" . }} subjects: - kind: ServiceAccount - name: {{ template "fullname" . }} + name: {{ template "cluster-autoscaler.fullname" . }} namespace: {{ .Release.Namespace }} {{- end -}} diff --git a/stable/cluster-autoscaler/templates/service.yaml b/stable/cluster-autoscaler/templates/service.yaml index a5d7183757..6bd6d06468 100644 --- a/stable/cluster-autoscaler/templates/service.yaml +++ b/stable/cluster-autoscaler/templates/service.yaml @@ -6,11 +6,11 @@ metadata: {{ toYaml .Values.service.annotations | indent 4 }} {{- end }} labels: - app: {{ template "name" . }} + app: {{ template "cluster-autoscaler.name" . }} chart: {{ .Chart.Name }}-{{ .Chart.Version }} heritage: {{ .Release.Service }} release: {{ .Release.Name }} - name: {{ template "fullname" . }} + name: {{ template "cluster-autoscaler.fullname" . }} spec: clusterIP: "{{ .Values.service.clusterIP }}" {{- if .Values.service.externalIPs }} @@ -29,6 +29,6 @@ spec: protocol: TCP targetPort: 8085 selector: - app: {{ template "name" . }} + app: {{ template "cluster-autoscaler.name" . }} release: {{ .Release.Name }} type: "{{ .Values.service.type }}" diff --git a/stable/cluster-autoscaler/templates/serviceaccount.yaml b/stable/cluster-autoscaler/templates/serviceaccount.yaml index 8967eb1a75..e707d94f8f 100644 --- a/stable/cluster-autoscaler/templates/serviceaccount.yaml +++ b/stable/cluster-autoscaler/templates/serviceaccount.yaml @@ -3,9 +3,9 @@ apiVersion: v1 kind: ServiceAccount metadata: labels: - app: {{ template "name" . }} + app: {{ template "cluster-autoscaler.name" . }} chart: {{ .Chart.Name }}-{{ .Chart.Version }} heritage: {{ .Release.Service }} release: {{ .Release.Name }} - name: {{ template "fullname" . }} + name: {{ template "cluster-autoscaler.fullname" . }} {{- end -}}