Skip to content
This repository has been archived by the owner on Feb 22, 2022. It is now read-only.

Use consistent whitespace in template placeholders #1437

Merged
merged 3 commits into from
Jul 9, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 24 additions & 24 deletions incubator/etcd/templates/etcd-statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,59 +6,59 @@ metadata:
metadata:
name: "{{ printf "%s-%s" .Release.Name .Values.Name | trunc 24 }}"
labels:
heritage: {{.Release.Service | quote }}
release: {{.Release.Name | quote }}
chart: "{{.Chart.Name}}-{{.Chart.Version}}"
component: "{{.Release.Name}}-{{.Values.Component}}"
heritage: {{ .Release.Service | quote }}
release: {{ .Release.Name | quote }}
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
component: "{{ .Release.Name }}-{{ .Values.Component }}"
spec:
ports:
- port: {{.Values.PeerPort}}
- port: {{ .Values.PeerPort }}
name: etcd-server
- port: {{.Values.ClientPort}}
- port: {{ .Values.ClientPort }}
name: etcd-client
clusterIP: None
selector:
component: "{{.Release.Name}}-{{.Values.Component}}"
component: "{{ .Release.Name }}-{{ .Values.Component }}"
---
apiVersion: apps/v1beta1
kind: StatefulSet
metadata:
name: "{{ printf "%s-%s" .Release.Name .Values.Name | trunc 24 }}"
labels:
heritage: {{.Release.Service | quote }}
release: {{.Release.Name | quote }}
chart: "{{.Chart.Name}}-{{.Chart.Version}}"
component: "{{.Release.Name}}-{{.Values.Component}}"
heritage: {{ .Release.Service | quote }}
release: {{ .Release.Name | quote }}
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
component: "{{ .Release.Name }}-{{ .Values.Component }}"
spec:
serviceName: "{{ printf "%s-%s" .Release.Name .Values.Name | trunc 24 }}"
replicas: {{default 3 .Values.Replicas}}
replicas: {{ default 3 .Values.Replicas }}
template:
metadata:
name: "{{ printf "%s-%s" .Release.Name .Values.Name | trunc 24 }}"
labels:
heritage: {{.Release.Service | quote }}
release: {{.Release.Name | quote }}
chart: "{{.Chart.Name}}-{{.Chart.Version}}"
component: "{{.Release.Name}}-{{.Values.Component}}"
heritage: {{ .Release.Service | quote }}
release: {{ .Release.Name | quote }}
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
component: "{{ .Release.Name }}-{{ .Values.Component }}"
annotations:
pod.alpha.kubernetes.io/initialized: "true"
spec:
containers:
- name: "{{ printf "%s-%s" .Release.Name .Values.Name | trunc 24 }}"
image: "{{.Values.Image}}:{{.Values.ImageTag}}"
imagePullPolicy: "{{.Values.ImagePullPolicy}}"
image: "{{ .Values.Image }}:{{ .Values.ImageTag }}"
imagePullPolicy: "{{ .Values.ImagePullPolicy }}"
ports:
- containerPort: {{.Values.PeerPort}}
- containerPort: {{ .Values.PeerPort }}
name: peer
- containerPort: {{.Values.ClientPort}}
- containerPort: {{ .Values.ClientPort }}
name: client
resources:
requests:
cpu: "{{.Values.Cpu}}"
memory: "{{.Values.Memory}}"
cpu: "{{ .Values.Cpu }}"
memory: "{{ .Values.Memory }}"
env:
- name: INITIAL_CLUSTER_SIZE
value: {{default 3 .Values.Replicas | quote }}
value: {{ default 3 .Values.Replicas | quote }}
- name: SET_NAME
value: "{{ printf "%s-%s" .Release.Name .Values.Name | trunc 24 }}"
volumeMounts:
Expand Down Expand Up @@ -204,4 +204,4 @@ spec:
resources:
requests:
# upstream recommended max is 700M
storage: "{{.Values.Storage}}"
storage: "{{ .Values.Storage }}"
2 changes: 1 addition & 1 deletion incubator/istio/templates/addons-grafana-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,4 @@ spec:
volumes:
- name: grafana-data
emptyDir: {}
{{end}}
{{ end }}
2 changes: 1 addition & 1 deletion incubator/istio/templates/addons-grafana-svc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ spec:
app: {{ include "name" . }}
component: {{ $serviceName }}-{{ .Values.addons.grafana.deployment.name }}
release: {{ .Release.Name }}
{{end}}
{{ end }}
2 changes: 1 addition & 1 deletion incubator/istio/templates/addons-servicegraph-svc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ spec:
app: {{ include "name" . }}
component: {{ $serviceName }}-{{ .Values.addons.servicegraph.deployment.name }}
release: {{ .Release.Name }}
{{end}}
{{ end }}
44 changes: 22 additions & 22 deletions incubator/kafka/templates/kafka-ss.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ spec:
- port: 2181
name: client
selector:
component: "{{.Release.Name}}"
component: "{{ .Release.Name }}"

# A headless service to create DNS records
---
Expand All @@ -17,37 +17,37 @@ kind: Service
metadata:
name: "{{ printf "%s-broker-%s" .Release.Name .Values.Name | trunc 63 }}"
labels:
heritage: {{.Release.Service | quote }}
release: {{.Release.Name | quote }}
chart: "{{.Chart.Name}}-{{.Chart.Version}}"
component: "{{.Release.Name}}-{{.Values.Component}}"
heritage: {{ .Release.Service | quote }}
release: {{ .Release.Name | quote }}
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
component: "{{ .Release.Name }}-{{ .Values.Component }}"
annotations:
"helm.sh/created": {{.Release.Time.Seconds | quote }}
"helm.sh/created": {{ .Release.Time.Seconds | quote }}
service.alpha.kubernetes.io/tolerate-unready-endpoints: "true"
spec:
ports:
- port: 9092
clusterIP: None
selector:
component: "{{.Release.Name}}-{{.Values.Component}}"
component: "{{ .Release.Name }}-{{ .Values.Component }}"
app: kafka
---
apiVersion: v1
kind: Service
metadata:
name: "{{ printf "%s-%s" .Release.Name .Values.Name | trunc 63 }}"
labels:
heritage: {{.Release.Service | quote }}
release: {{.Release.Name | quote }}
chart: "{{.Chart.Name}}-{{.Chart.Version}}"
component: "{{.Release.Name}}-{{.Values.Component}}"
heritage: {{ .Release.Service | quote }}
release: {{ .Release.Name | quote }}
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
component: "{{ .Release.Name }}-{{ .Values.Component }}"
annotations:
"helm.sh/created": {{.Release.Time.Seconds | quote }}
"helm.sh/created": {{ .Release.Time.Seconds | quote }}
spec:
ports:
- port: 9092
selector:
component: "{{.Release.Name}}-{{.Values.Component}}"
component: "{{ .Release.Name }}-{{ .Values.Component }}"
app: kafka
---
apiVersion: apps/v1beta1
Expand All @@ -56,29 +56,29 @@ metadata:
name: "{{ printf "%s-%s" .Release.Name .Values.Name | trunc 63 }}"
labels:
app: kafka
heritage: {{.Release.Service | quote }}
release: {{.Release.Name | quote }}
chart: "{{.Chart.Name}}-{{.Chart.Version}}"
component: "{{.Release.Name}}-{{.Values.Component}}"
heritage: {{ .Release.Service | quote }}
release: {{ .Release.Name | quote }}
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
component: "{{ .Release.Name }}-{{ .Values.Component }}"
annotations:
"helm.sh/created": {{.Release.Time.Seconds | quote }}
"helm.sh/created": {{ .Release.Time.Seconds | quote }}
spec:
serviceName: "{{ printf "%s-broker-%s" .Release.Name .Values.Name | trunc 63 }}"
replicas: {{ default 3 .Values.Replicas }}
template:
metadata:
labels:
app: kafka
component: "{{.Release.Name}}-{{.Values.Component}}"
component: "{{ .Release.Name }}-{{ .Values.Component }}"
annotations:
pod.alpha.kubernetes.io/initialized: "true"
pod.alpha.kubernetes.io/init-containers: '[
]'
spec:
containers:
- name: "{{ printf "%s-broker-%s" .Release.Name .Values.Name | trunc 63 }}"
image: "{{.Values.Image}}:{{.Values.ImageTag}}"
imagePullPolicy: "{{.Values.ImagePullPolicy}}"
image: "{{ .Values.Image }}:{{ .Values.ImageTag }}"
imagePullPolicy: "{{ .Values.ImagePullPolicy }}"
livenessProbe:
exec:
command:
Expand Down Expand Up @@ -125,4 +125,4 @@ spec:
accessModes: [ "ReadWriteOnce" ]
resources:
requests:
storage: {{.Values.Storage}}
storage: {{ .Values.Storage }}
2 changes: 1 addition & 1 deletion incubator/patroni/templates/ep-patroni.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ metadata:
heritage: {{ .Release.Service | quote }}
release: {{ .Release.Name | quote }}
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
component: "{{.Release.Name}}-{{.Values.Component}}"
component: "{{ .Release.Name }}-{{ .Values.Component }}"
subsets: []
2 changes: 1 addition & 1 deletion incubator/patroni/templates/sec-patroni.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ metadata:
heritage: {{ .Release.Service | quote }}
release: {{ .Release.Name | quote }}
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
component: "{{.Release.Name}}-{{.Values.Component}}"
component: "{{ .Release.Name }}-{{ .Values.Component }}"
type: Opaque
data:
password-superuser: {{ .Values.Credentials.Superuser | b64enc }}
Expand Down
10 changes: 5 additions & 5 deletions incubator/patroni/templates/statefulset-patroni.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ spec:
chart: "{{.Chart.Name}}-{{.Chart.Version}}"
component: "{{.Release.Name}}-{{.Values.Component}}"
spec:
{{if .Values.NodeSelector }}
{{ if .Values.NodeSelector }}
nodeSelector:
{{range $key, $value := .Values.NodeSelector}}
{{ range $key, $value := .Values.NodeSelector }}
{{ $key }}: {{ $value | quote }}
{{end}}
{{end}}
{{ end }}
{{ end }}
containers:
- name: spilo
image: "{{ .Values.Spilo.Image }}:{{ .Values.Spilo.Version }}"
Expand Down Expand Up @@ -97,7 +97,7 @@ spec:
heritage: {{.Release.Service | quote }}
release: {{.Release.Name | quote }}
chart: "{{.Chart.Name}}-{{.Chart.Version}}"
component: "{{.Release.Name}}-{{.Values.Component}}"
component: "{{ .Release.Name }}-{{ .Values.Component }}"
spec:
accessModes:
{{ toYaml .Values.persistentVolume.accessModes | indent 8 }}
Expand Down
2 changes: 1 addition & 1 deletion incubator/patroni/templates/svc-patroni.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ metadata:
heritage: {{ .Release.Service | quote }}
release: {{ .Release.Name | quote }}
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
component: "{{.Release.Name}}-{{.Values.Component}}"
component: "{{ .Release.Name }}-{{ .Values.Component }}"
spec:
type: ClusterIP
ports:
Expand Down
4 changes: 2 additions & 2 deletions incubator/tensorflow-inception/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ We truncate at 24 chars because some Kubernetes name fields are limited to this
*/}}
{{- define "fullname" -}}
{{- $name := default .Chart.Name .Values.nameOverride -}}
{{- printf "%s-%s" .Release.Name $name | trunc 24 -}}
{{- end -}}
{{- printf "%s-%s" .Release.Name $name | trunc 24 | trimSuffix "-" -}}
{{- end -}}
48 changes: 24 additions & 24 deletions incubator/tensorflow-inception/templates/tensorflow-inception.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,61 +3,61 @@ kind: Service
metadata:
name: {{ template "fullname" . }}
labels:
heritage: {{.Release.Service | quote }}
release: {{.Release.Name | quote }}
chart: "{{.Chart.Name}}-{{.Chart.Version}}"
component: "{{.Release.Name}}-{{.Values.Component}}"
heritage: {{ .Release.Service | quote }}
release: {{ .Release.Name | quote }}
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
component: "{{ .Release.Name }}-{{ .Values.Component }}"
annotations:
"helm.sh/created": {{.Release.Time.Seconds | quote }}
"helm.sh/created": {{ .Release.Time.Seconds | quote }}
spec:
ports:
- port: {{.Values.ServicePort}}
targetPort: {{.Values.ContainerPort}}
- port: {{ .Values.ServicePort }}
targetPort: {{ .Values.ContainerPort }}
selector:
component: "{{.Release.Name}}-{{.Values.Component}}"
type: {{.Values.ServiceType}}
component: "{{ .Release.Name }}-{{ .Values.Component }}"
type: {{ .Values.ServiceType }}

---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: {{ template "fullname" . }}
labels:
heritage: {{.Release.Service | quote }}
release: {{.Release.Name | quote }}
chart: "{{.Chart.Name}}-{{.Chart.Version}}"
component: "{{.Release.Name}}-{{.Values.Component}}"
heritage: {{ .Release.Service | quote }}
release: {{ .Release.Name | quote }}
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
component: "{{ .Release.Name }}-{{ .Values.Component }}"
annotations:
"helm.sh/created": {{.Release.Time.Seconds | quote }}
"helm.sh/created": {{ .Release.Time.Seconds | quote }}
spec:
replicas: {{ default 1 .Values.Replicas }}
strategy:
type: RollingUpdate
selector:
matchLabels:
component: "{{.Release.Name}}-{{.Values.Component}}"
component: "{{ .Release.Name }}-{{ .Values.Component }}"
template:
metadata:
labels:
heritage: {{.Release.Service | quote }}
release: {{.Release.Name | quote }}
chart: "{{.Chart.Name}}-{{.Chart.Version}}"
component: "{{.Release.Name}}-{{.Values.Component}}"
heritage: {{ .Release.Service | quote }}
release: {{ .Release.Name | quote }}
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
component: "{{ .Release.Name }}-{{ .Values.Component }}"
spec:
containers:
- name: {{ template "fullname" . }}
image: "{{.Values.Image}}:{{.Values.ImageTag}}"
imagePullPolicy: "{{.Values.ImagePullPolicy}}"
image: "{{ .Values.Image }}:{{ .Values.ImageTag }}"
imagePullPolicy: "{{ .Values.ImagePullPolicy }}"
command:
- "/bin/sh"
- "-c"
args:
- "/serving/bazel-bin/tensorflow_serving/model_servers/tensorflow_model_server --port={{.Values.ContainerPort}} --model_name=inception --model_base_path=/serving/inception-export"
- "/serving/bazel-bin/tensorflow_serving/model_servers/tensorflow_model_server --port={{ .Values.ContainerPort }} --model_name=inception --model_base_path=/serving/inception-export"
ports:
- containerPort: {{.Values.ContainerPort}}
- containerPort: {{ .Values.ContainerPort }}
readinessProbe:
tcpSocket:
port: {{.Values.ContainerPort}}
port: {{ .Values.ContainerPort }}
initialDelaySeconds: 15
timeoutSeconds: 1
resources:
Expand Down
Loading