[stable/gcloud-sqlproxy] #1785 namespace defined templates with chart name (#2148)

This commit is contained in:
Kevin Schumacher
2017-10-04 23:48:59 +05:30
committed by Dhilip
parent b71d5033a2
commit b15c1f3184
6 changed files with 13 additions and 13 deletions
+1 -1
View File
@@ -1,5 +1,5 @@
name: gcloud-sqlproxy
version: 0.1.1
version: 0.2.0
description: Google Cloud SQL Proxy
keywords:
- google
+1 -1
View File
@@ -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 -}}
@@ -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 -}}
@@ -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
@@ -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 }}"
+3 -3
View File
@@ -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" . }}