[stable/graphite] Graphite statefulset (#10309)

* [stable/graphite] Fix missing image tag in init container spec

Graphite recently changed their initialization scripts in 1.1.5-x. The init container using `:latest` resulted in a failure to run the init script and a crash loop.

Signed-off-by: Aaron Friel <mayreply@aaronfriel.com>

* [stable/graphite] Update to 1.1.5, use StatefulSet

Update to 1.1.5 significantly improves performance/reliability and uses
services on startup to configure the user accounts, obviating the need
for an init container.

The Deployment is replaced by a StatefulSet because Graphite is
sensitive to the identity of the machines. Although this chart does not
currently handle Graphite clusters, it is probably not a good thing that
every Graphite pod should register as a new carbon agent and carbon
aggregator. There doesn't appear to be any process to clean up "old"
agents/aggregators or other container identity pieces.

tl;dr: StatefulSet better models the behavior Graphite has than a
deployment.

Signed-off-by: Aaron Friel <mayreply@aaronfriel.com>

* [stable/graphite] Bump minor version number.

Signed-off-by: Aaron Friel <mayreply@aaronfriel.com>

* [stable/graphite] Use apps/v1 api version in stateful set

Signed-off-by: Aaron Friel <mayreply@aaronfriel.com>
This commit is contained in:
Aaron Friel
2018-12-30 13:19:48 -08:00
committed by Kubernetes Prow Robot
parent d0b9568328
commit 20b8dffaf2
4 changed files with 8 additions and 14 deletions
+2 -2
View File
@@ -1,6 +1,6 @@
apiVersion: v1
version: 0.1.4
appVersion: "1.1.4-10"
version: 0.2.0
appVersion: "1.1.5-3"
description: Graphite metrics server
name: graphite
home: https://graphiteapp.org/
+1 -1
View File
@@ -37,7 +37,7 @@ The following table lists the configurable parameters of the Graphite chart and
| Parameter | Description | Default |
|--------------------------------|----------------------------------------------|----------------------------------------|
| `image.repository` | Docker image repo | `graphiteapp/graphite-statsd` |
| `image.tag` | Docker image | `1.1.4-10` |
| `image.tag` | Docker image | `1.1.5-3` |
| `image.pullPolicy` | Docker image pull policy | `IfNotPresent` |
| `service.type` | Service type | `ClusterIP` |
| `service.port` | Service port of Graphite UI | `8080` |
@@ -1,5 +1,5 @@
apiVersion: apps/v1
kind: Deployment
kind: StatefulSet
metadata:
name: {{ template "graphite.fullname" . }}
labels:
@@ -8,25 +8,19 @@ metadata:
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
spec:
strategy:
type: Recreate
updateStrategy:
type: RollingUpdate
selector:
matchLabels:
app: {{ template "graphite.name" . }}
release: {{ .Release.Name }}
serviceName: {{ template "graphite.name" . }}
template:
metadata:
labels:
app: {{ template "graphite.name" . }}
release: {{ .Release.Name }}
spec:
initContainers:
- name: create-syncdb
image: {{ .Values.image.repository }}
command: [ "sh", "-c", "test -f /opt/graphite/storage/graphite.db || /usr/bin/expect /usr/local/bin/django_admin_init.exp"]
volumeMounts:
- name: {{ template "graphite.fullname" . }}-pvc
mountPath: /opt/graphite/storage/
containers:
- image: {{ .Values.image.repository }}:{{ .Values.image.tag }}
name: {{ .Chart.Name }}
+1 -1
View File
@@ -2,7 +2,7 @@
image:
repository: graphiteapp/graphite-statsd
tag: 1.1.4-10
tag: 1.1.5-3
pullPolicy: IfNotPresent
service: