Skip to content

Commit

Permalink
[stable/heapster] Default service name to Heapster (helm#1266)
Browse files Browse the repository at this point in the history
* [stable/heapster] Default service name to heapster

* [stable/heapster] Added support for custom labels

* [stable/heapster] fix typo

* Update Chart.yaml
  • Loading branch information
jose5918 authored and Vic Iglesias committed Jul 5, 2017
1 parent d062649 commit 7bc37ac
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 4 deletions.
2 changes: 1 addition & 1 deletion stable/heapster/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v1
description: Heapster enables Container Cluster Monitoring and Performance Analysis.
name: heapster
version: 0.1.0
version: 0.1.1
sources:
- https://github.com/kubernetes/heapster
- https://github.com/kubernetes/contrib/tree/master/addon-resizer
Expand Down
3 changes: 1 addition & 2 deletions stable/heapster/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,5 @@ Create a service name that defaults to app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
*/}}
{{- define "service.fullname" -}}
{{- $name := default .Chart.Name .Values.nameOverride -}}
{{- .Values.service.nameOverride | default (printf "%s-%s" .Release.Name $name) | trunc 63 | trimSuffix "-" -}}
{{- .Values.service.nameOverride | default .Chart.Name }}
{{- end -}}
3 changes: 3 additions & 0 deletions stable/heapster/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ metadata:
name: {{ template "fullname" . }}
labels:
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
{{- range $key, $value := .Values.labels }}
{{ $key }}: {{ $value }}
{{- end }}
spec:
replicas: {{ .Values.replicaCount }}
template:
Expand Down
3 changes: 3 additions & 0 deletions stable/heapster/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ metadata:
app: {{ template "fullname" . }}
heritage: "{{ .Release.Service }}"
release: "{{ .Release.Name }}"
{{- range $key, $value := .Values.service.labels }}
{{ $key }}: {{ $value }}
{{- end }}
spec:
type: {{ .Values.service.type }}
ports:
Expand Down
15 changes: 14 additions & 1 deletion stable/heapster/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,26 @@ image:
repository: gcr.io/google_containers/heapster
tag: v1.3.0
pullPolicy: IfNotPresent
## Here labels can be added to the heapster deployment
# labels:
# kubernetes.io/cluster-service: "true"
# kubernetes.io/name: "Heapster"
labels:

service:
type: ClusterIP
externalPort: 8082
internalPort: 8082
## This allows an overide of the heapster service name
## Default: {{ template "fullname" . }}
## Default: {{ .Chart.Name }}
# nameOverride:

## Here labels can be added to the heapster service
# labels:
# kubernetes.io/cluster-service: "true"
# kubernetes.io/name: "Heapster"
labels:

resources:
limits:
cpu: 100m
Expand Down

0 comments on commit 7bc37ac

Please sign in to comment.