Spartakus v1.1.0 (#614)

* Adopt best practices for labeling
This commit is contained in:
Michael Goodness
2017-02-13 14:06:48 -06:00
committed by GitHub
parent 1ae0ab5914
commit bcb4436d85
6 changed files with 58 additions and 36 deletions
+2 -2
View File
@@ -1,6 +1,6 @@
name: spartakus
version: 1.0.0
description: A Spartakus Helm chart for Kubernetes. Spartakus aims to collect information about Kubernetes clusters.
version: 1.1.0
description: Collect information about Kubernetes clusters to help improve the project.
sources:
- https://github.com/kubernetes-incubator/spartakus
maintainers:
+16 -14
View File
@@ -13,15 +13,14 @@ $ helm install stable/spartakus
This chart bootstraps a [Spartakus](https://github.com/kubernetes-incubator/spartakus) deployment on a [Kubernetes](http://kubernetes.io) cluster using the [Helm](https://helm.sh) package manager.
## Prerequisites
- Kubernetes 1.3+ with Beta APIs enabled
- Kubernetes 1.3+ with Beta APIs enabled
## Installing the Chart
To install the chart with the release name `my-release`:
```console
$ helm install --name my-release stable/spartakus
$ helm install stable/spartakus --name my-release
```
The command deploys Spartakus on the Kubernetes cluster in the default configuration. The [configuration](#configuration) section lists the parameters that can be configured during installation.
@@ -42,26 +41,29 @@ The command removes all the Kubernetes components associated with the chart and
The following tables lists the configurable parameters of the Spartakus chart and their default values.
| Parameter | Description | Default |
| ------------------------------- | ------------------------------- | ---------------------------------------------------------- |
| `image` | Container image | `gcr.io/google_containers/spartakus-amd64:{VERSION}` |
| `imagePullPolicy` | Image pull policy | `Always` if `image` tag is `latest`, else `IfNotPresent` |
| `resources.requests.cpu` | CPU resource request | `2m` |
| `resources.requests.memory` | Memory resource request | `8Mi` |
| `uuid` | Unique cluster ID | Dynamically generated using `uuidv4` template function |
Parameter | Description | Default
--- | --- | ---
`extraArgs` | Additional container arguments | `{}`
`image.repository` | Image | `gcr.io/google_containers/spartakus-amd64`
`image.tag` | Image tag | `v1.0.0`
`image.pullPolicy` | Image pull policy | `Always` if `image.tag` is `latest`, else `IfNotPresent`
`nodeSelector` | node labels for pod assignment | `{}`
`podAnnotations` | annotations to be added to pods | `{}`
`replicaCount` | desired number of pods | `1`
`resources` | pod resource requests & limits | `requests: {cpu: 2m, memory: 8Mi}`
`uuid` | Unique cluster ID | Dynamically generated using `uuidv4` template function
Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example,
```console
$ helm install --name my-release \
--set uuid=19339C6E-FD73-4787-BFD8-F710C8D8364E \
stable/spartakus
$ helm install stable/spartakus --name my-release \
--set uuid=19339C6E-FD73-4787-BFD8-F710C8D8364E
```
Alternatively, a YAML file that specifies the values for the above parameters can be provided while installing the chart. For example,
```console
$ helm install --name my-release -f values.yaml stable/spartakus
$ helm install stable/spartakus --name my-release -f values.yaml
```
> **Tip**: You can use the default [values.yaml](values.yaml)
+1 -1
View File
@@ -1,6 +1,6 @@
To verify that Spartakus has started, run:
kubectl --namespace={{ .Release.Namespace }} get pods -l "app={{ template "fullname" . }}"
kubectl --namespace={{ .Release.Namespace }} get pods -l "app={{ template "name" . }},release={{ .Release.Name }}"
THIS APPLICATION DOES NOT REPORT ANY PERSONAL INFORMATION. Anything that might be identifying,
including things like IP addresses, container images, and object names are anonymized. We take
+3 -3
View File
@@ -3,14 +3,14 @@
Expand the name of the chart.
*/}}
{{- define "name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 24 -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{/*
Create a default fully qualified app name.
We truncate at 24 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
*/}}
{{- define "fullname" -}}
{{- $name := default .Chart.Name .Values.nameOverride -}}
{{- printf "%s-%s" .Release.Name $name | trunc 24 -}}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
{{- end -}}
+21 -10
View File
@@ -2,25 +2,36 @@ apiVersion: extensions/v1beta1
kind: Deployment
metadata:
labels:
app: {{ template "fullname" . }}
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
heritage: "{{ .Release.Service }}"
release: "{{ .Release.Name }}"
app: {{ template "name" . }}
chart: {{ .Chart.Name }}-{{ .Chart.Version }}
heritage: {{ .Release.Service }}
release: {{ .Release.Name }}
name: {{ template "fullname" . }}
spec:
replicas: 1
replicas: {{ .Values.replicaCount }}
template:
metadata:
{{- if .Values.podAnnotations }}
annotations:
{{ toYaml .Values.podAnnotations | indent 8}}
{{- end }}
labels:
app: {{ template "fullname" . }}
release: "{{ .Release.Name }}"
app: {{ template "name" . }}
release: {{ .Release.Name }}
spec:
containers:
- name: {{ template "name" . }}
image: "{{ .Values.image }}"
imagePullPolicy: {{ default "" .Values.imagePullPolicy | quote }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: "{{ .Values.image.pullPolicy }}"
args:
- volunteer
- --cluster-id={{ uuidv4 | default .Values.uuid | quote }}
- --cluster-id="{{ uuidv4 | default .Values.uuid }}"
{{- range $key, $value := .Values.extraArgs }}
- --{{ $key }}={{ $value }}
{{- end }}
resources:
{{ toYaml .Values.resources | indent 12 }}
{{- if .Values.nodeSelector }}
nodeSelector:
{{ toYaml .Values.nodeSelector | indent 8 }}
{{- end }}
+15 -6
View File
@@ -1,12 +1,21 @@
extraArgs: {}
## Container image
##
image: gcr.io/google_containers/spartakus-amd64:v1.0.0
image:
repository: gcr.io/google_containers/spartakus-amd64
tag: v1.0.0
pullPolicy: IfNotPresent
## imagePullPolicy
## Default: 'Always' if image tag is 'latest', else 'IfNotPresent'
## Ref: http://kubernetes.io/docs/user-guide/images/#pre-pulling-images
## Node labels for pod assignment
## Ref: https://kubernetes.io/docs/user-guide/node-selection/
nodeSelector: {}
## Annotations to be added to pods
##
# imagePullPolicy:
podAnnotations: {}
replicaCount: 1
## Resource requests and limits
## Ref: http://kubernetes.io/docs/user-guide/compute-resources/
@@ -22,4 +31,4 @@ resources:
## A version 4 UUID to uniquely identify the cluster
## If not provided, Helm will generate automatically at install-time.
##
# uuid:
uuid: ""