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

[stable/heapster] Default service name to Heapster #1266

Merged
merged 4 commits into from
Jul 5, 2017
Merged
Show file tree
Hide file tree
Changes from 2 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
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 hepaster 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 hepaster service
# labels:
# kubernetes.io/cluster-service: "true"
# kubernetes.io/name: "Heapster"
labels:

resources:
limits:
cpu: 100m
Expand Down