[stable/acs-engine-autoscaler] #1785 namespace defined templates with chart name (#1976)

This commit is contained in:
kevinschumacher
2017-09-10 11:46:20 -05:00
committed by Michael Goodness
parent 169d8e86b0
commit af0fa1bb61
5 changed files with 26 additions and 26 deletions
+6 -6
View File
@@ -2,11 +2,11 @@ apiVersion: v1
description: Scales worker nodes within agent pools
icon: https://github.com/kubernetes/kubernetes/blob/master/logo/logo.png
name: acs-engine-autoscaler
version: 1.0.0
version: 2.0.0
sources:
- https://github.com/wbuchwalter/Kubernetes-acs-engine-autoscaler
- https://github.com/wbuchwalter/Kubernetes-acs-engine-autoscaler
maintainers:
- name: Rita Zhang
email: ritazh@microsoft.com
- name: William Buchwalter
email: wibuch@microsoft.com
- name: Rita Zhang
email: ritazh@microsoft.com
- name: William Buchwalter
email: wibuch@microsoft.com
@@ -4,10 +4,10 @@ The acs-engine-autoscaler is getting provisioned in your cluster. After a few mi
To verify that acs-engine-autoscaler has started, run:
kubectl --namespace={{ .Release.Namespace }} get pods -l "app={{ template "name" . }}"
kubectl --namespace={{ .Release.Namespace }} get pods -l "app={{ template "acs-engine-autoscaler.name" . }}"
To verify that acs-engine-autoscaler is running as expected, run:
kubectl logs $(kubectl --namespace={{ .Release.Namespace }} get pods -l "app={{ template "name" . }}" -o jsonpath="{.items[0].metadata.name}")
kubectl logs $(kubectl --namespace={{ .Release.Namespace }} get pods -l "app={{ template "acs-engine-autoscaler.name" . }}" -o jsonpath="{.items[0].metadata.name}")
{{- else -}}
##############################################################################
@@ -2,7 +2,7 @@
{{/*
Expand the name of the chart.
*/}}
{{- define "name" -}}
{{- define "acs-engine-autoscaler.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 "acs-engine-autoscaler.fullname" -}}
{{- $name := default .Chart.Name .Values.nameOverride -}}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
{{- end -}}
@@ -21,11 +21,11 @@ https://github.com/technosophos/common-chart/
labels.standard prints the standard Helm labels.
The standard labels are frequently used in metadata.
*/ -}}
{{- define "labels.standard" -}}
app: {{ template "name" . }}
{{- define "acs-engine-autoscaler.labels.standard" -}}
app: {{ template "acs-engine-autoscaler.name" . }}
heritage: {{ .Release.Service | quote }}
release: {{ .Release.Name | quote }}
chart: {{ template "chartref" . }}
chart: {{ template "acs-engine-autoscaler.chartref" . }}
{{- end -}}
{{- /*
@@ -37,6 +37,6 @@ Example output:
zookeeper-1.2.3
wordpress-3.2.1_20170219
*/ -}}
{{- define "chartref" -}}
{{- define "acs-engine-autoscaler.chartref" -}}
{{- replace "+" "_" .Chart.Version | printf "%s-%s" .Chart.Name -}}
{{- end -}}
@@ -2,50 +2,50 @@
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: {{ template "fullname" . }}
name: {{ template "acs-engine-autoscaler.fullname" . }}
labels:
{{ include "labels.standard" . | indent 4 }}
{{ include "acs-engine-autoscaler.labels.standard" . | indent 4 }}
spec:
replicas: {{ .Values.replicaCount }}
template:
metadata:
labels:
{{ include "labels.standard" . | indent 8 }}
{{ include "acs-engine-autoscaler.labels.standard" . | indent 8 }}
openai/do-not-drain: "true"
spec:
containers:
- name: {{ template "fullname" . }}
- name: {{ template "acs-engine-autoscaler.fullname" . }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
env:
- name: AZURE_SP_APP_ID
valueFrom:
secretKeyRef:
name: {{ template "fullname" . }}
name: {{ template "acs-engine-autoscaler.fullname" . }}
key: azure-sp-app-id
- name: AZURE_SP_SECRET
valueFrom:
secretKeyRef:
name: {{ template "fullname" . }}
name: {{ template "acs-engine-autoscaler.fullname" . }}
key: azure-sp-secret
- name: AZURE_SP_TENANT_ID
valueFrom:
secretKeyRef:
name: {{ template "fullname" . }}
name: {{ template "acs-engine-autoscaler.fullname" . }}
key: azure-sp-tenant-id
- name: KUBECONFIG_PRIVATE_KEY
valueFrom:
secretKeyRef:
name: {{ template "fullname" . }}
name: {{ template "acs-engine-autoscaler.fullname" . }}
key: kubeconfig-private-key
- name: CLIENT_PRIVATE_KEY
valueFrom:
secretKeyRef:
name: {{ template "fullname" . }}
name: {{ template "acs-engine-autoscaler.fullname" . }}
key: client-private-key
- name: CA_PRIVATE_KEY
valueFrom:
secretKeyRef:
name: {{ template "fullname" . }}
name: {{ template "acs-engine-autoscaler.fullname" . }}
key: ca-private-key
command:
- python
@@ -1,9 +1,9 @@
apiVersion: v1
kind: Secret
metadata:
name: {{ template "fullname" . }}
name: {{ template "acs-engine-autoscaler.fullname" . }}
labels:
{{ include "labels.standard" . | indent 4 }}
{{ include "acs-engine-autoscaler.labels.standard" . | indent 4 }}
type: Opaque
data:
azure-sp-app-id: {{ default "MISSING" .Values.acsenginecluster.azurespappid | b64enc | quote }}