From b15c1f3184dc4be65337e6a8ff813254e7982c2f Mon Sep 17 00:00:00 2001 From: Kevin Schumacher Date: Wed, 4 Oct 2017 14:18:59 -0400 Subject: [PATCH] [stable/gcloud-sqlproxy] #1785 namespace defined templates with chart name (#2148) --- stable/gcloud-sqlproxy/Chart.yaml | 2 +- stable/gcloud-sqlproxy/templates/NOTES.txt | 2 +- stable/gcloud-sqlproxy/templates/_helpers.tpl | 4 ++-- stable/gcloud-sqlproxy/templates/deployment.yaml | 8 ++++---- stable/gcloud-sqlproxy/templates/secrets.yaml | 4 ++-- stable/gcloud-sqlproxy/templates/svc.yaml | 6 +++--- 6 files changed, 13 insertions(+), 13 deletions(-) diff --git a/stable/gcloud-sqlproxy/Chart.yaml b/stable/gcloud-sqlproxy/Chart.yaml index 2b733bee61..7dd7753313 100644 --- a/stable/gcloud-sqlproxy/Chart.yaml +++ b/stable/gcloud-sqlproxy/Chart.yaml @@ -1,5 +1,5 @@ name: gcloud-sqlproxy -version: 0.1.1 +version: 0.2.0 description: Google Cloud SQL Proxy keywords: - google diff --git a/stable/gcloud-sqlproxy/templates/NOTES.txt b/stable/gcloud-sqlproxy/templates/NOTES.txt index 4389d0d06d..8822510503 100644 --- a/stable/gcloud-sqlproxy/templates/NOTES.txt +++ b/stable/gcloud-sqlproxy/templates/NOTES.txt @@ -24,7 +24,7 @@ settings were not provided. The SQL server instance can be accessed via port {{ .Values.cloudsql.port }} on the following DNS name from within your cluster: -- {{ template "fullname" . }}.{{ .Release.Namespace }} +- {{ template "gcloud-sqlproxy.fullname" . }}.{{ .Release.Namespace }} {{- else -}} diff --git a/stable/gcloud-sqlproxy/templates/_helpers.tpl b/stable/gcloud-sqlproxy/templates/_helpers.tpl index f0d83d2edb..60c5d361e8 100644 --- a/stable/gcloud-sqlproxy/templates/_helpers.tpl +++ b/stable/gcloud-sqlproxy/templates/_helpers.tpl @@ -2,7 +2,7 @@ {{/* Expand the name of the chart. */}} -{{- define "name" -}} +{{- define "gcloud-sqlproxy.name" -}} {{- default .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 "gcloud-sqlproxy.fullname" -}} {{- $name := default .Chart.Name .Values.nameOverride -}} {{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} {{- end -}} diff --git a/stable/gcloud-sqlproxy/templates/deployment.yaml b/stable/gcloud-sqlproxy/templates/deployment.yaml index b6581c2152..9c88b63d33 100644 --- a/stable/gcloud-sqlproxy/templates/deployment.yaml +++ b/stable/gcloud-sqlproxy/templates/deployment.yaml @@ -2,9 +2,9 @@ apiVersion: extensions/v1beta1 kind: Deployment metadata: - name: {{ template "fullname" . }} + name: {{ template "gcloud-sqlproxy.fullname" . }} labels: - app: {{ template "fullname" . }} + app: {{ template "gcloud-sqlproxy.fullname" . }} chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" release: "{{ .Release.Name }}" heritage: "{{ .Release.Service }}" @@ -13,7 +13,7 @@ spec: template: metadata: labels: - app: {{ template "fullname" . }} + app: {{ template "gcloud-sqlproxy.fullname" . }} spec: containers: - name: sqlproxy @@ -37,7 +37,7 @@ spec: volumes: - name: cloudsql-oauth-credentials secret: - secretName: {{ template "fullname" . }} + secretName: {{ template "gcloud-sqlproxy.fullname" . }} - name: ssl-certs hostPath: path: /etc/ssl/certs diff --git a/stable/gcloud-sqlproxy/templates/secrets.yaml b/stable/gcloud-sqlproxy/templates/secrets.yaml index cd40749788..29603da5e6 100644 --- a/stable/gcloud-sqlproxy/templates/secrets.yaml +++ b/stable/gcloud-sqlproxy/templates/secrets.yaml @@ -1,9 +1,9 @@ apiVersion: v1 kind: Secret metadata: - name: {{ template "fullname" . }} + name: {{ template "gcloud-sqlproxy.fullname" . }} labels: - app: {{ template "fullname" . }} + app: {{ template "gcloud-sqlproxy.fullname" . }} chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" release: "{{ .Release.Name }}" heritage: "{{ .Release.Service }}" diff --git a/stable/gcloud-sqlproxy/templates/svc.yaml b/stable/gcloud-sqlproxy/templates/svc.yaml index 6e286b1714..58699cd3c7 100644 --- a/stable/gcloud-sqlproxy/templates/svc.yaml +++ b/stable/gcloud-sqlproxy/templates/svc.yaml @@ -1,9 +1,9 @@ apiVersion: v1 kind: Service metadata: - name: {{ template "fullname" . }} + name: {{ template "gcloud-sqlproxy.fullname" . }} labels: - app: {{ template "fullname" . }} + app: {{ template "gcloud-sqlproxy.fullname" . }} chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" release: "{{ .Release.Name }}" heritage: "{{ .Release.Service }}" @@ -14,4 +14,4 @@ spec: port: {{ .Values.cloudsql.port }} targetPort: sqlproxy selector: - app: {{ template "fullname" . }} + app: {{ template "gcloud-sqlproxy.fullname" . }}