-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(influxdb): Use stable/influxdb chart
closes #180 * This moves to using the influxdb chart in the stable repository * Sets the version to 0.4.0 * Adds two pre-upgrade hooks to the base monitor chart. These hooks allow the chart to migrate data from the old volume mount location to the new one provided by the influxdb chart.
- Loading branch information
Jonathan Chauncey
committed
Mar 24, 2017
1 parent
6327552
commit a5099a3
Showing
15 changed files
with
116 additions
and
168 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
21 changes: 0 additions & 21 deletions
21
charts/monitor/charts/influxdb/templates/monitor-influxdb-api-svc.yaml
This file was deleted.
Oops, something went wrong.
14 changes: 0 additions & 14 deletions
14
charts/monitor/charts/influxdb/templates/monitor-influxdb-creds-secret.yaml
This file was deleted.
Oops, something went wrong.
69 changes: 0 additions & 69 deletions
69
charts/monitor/charts/influxdb/templates/monitor-influxdb-deployment.yaml
This file was deleted.
Oops, something went wrong.
20 changes: 0 additions & 20 deletions
20
charts/monitor/charts/influxdb/templates/monitor-influxdb-pvc.yaml
This file was deleted.
Oops, something went wrong.
21 changes: 0 additions & 21 deletions
21
charts/monitor/charts/influxdb/templates/monitor-influxdb-ui-svc.yaml
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
charts/monitor/charts/telegraf/templates/monitor-telegraf-influxdb-creds-secret.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{{- if eq .Values.global.influxdb_location "off-cluster" }} | ||
apiVersion: v1 | ||
kind: Secret | ||
metadata: | ||
name: influxdb-creds | ||
labels: | ||
heritage: deis | ||
type: Opaque | ||
data: | ||
url: {{ .Values.influxdb.url | b64enc }} | ||
database: {{ .Values.influxdb.database | b64enc }} | ||
user: {{ .Values.influxdb.user | b64enc }} | ||
password: {{ .Values.influxdb.password | b64enc }} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
dependencies: | ||
- condition: "" | ||
enabled: false | ||
name: influxdb | ||
repository: https://kubernetes-charts.storage.googleapis.com | ||
tags: null | ||
version: 0.4.0 | ||
digest: sha256:d5acf72f0451f16fd80eebf9f7434f4a331d4a3e6cf3306e251ae604a7cd2797 | ||
generated: 2017-03-23T14:34:11.693195309-04:00 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
dependencies: | ||
- name: influxdb | ||
version: "0.4.0" | ||
repository: https://kubernetes-charts.storage.googleapis.com |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
{{- if .Values.influxdb.persistence.enabled }} | ||
apiVersion: batch/v1 | ||
kind: Job | ||
metadata: | ||
name: kill-pods-{{ randAlphaNum 5 | lower }} | ||
labels: | ||
heritage: {{.Release.Service | quote }} | ||
release: {{.Release.Name | quote }} | ||
chart: {{.Chart.Name}} | ||
annotations: | ||
"helm.sh/hook": pre-upgrade | ||
"helm.sh/hookWeight": "-10" | ||
spec: | ||
template: | ||
metadata: | ||
name: "{{.Release.Name}}" | ||
labels: | ||
heritage: {{.Release.Service | quote }} | ||
release: {{.Release.Name | quote }} | ||
chart: "{{.Chart.Name}}" | ||
spec: | ||
restartPolicy: Never | ||
containers: | ||
- name: kill-pods | ||
image: "lachlanevenson/k8s-kubectl" | ||
command: ["/bin/sh", "-c"] | ||
args: ["(kubectl delete daemonset deis-monitor-telegraf || true) && \ | ||
(kubectl delete deploy deis-monitor-influxdb || true) && \ | ||
sleep 10"] | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
{{- if .Values.influxdb.persistence.enabled }} | ||
apiVersion: batch/v1 | ||
kind: Job | ||
metadata: | ||
name: migrate-data-{{ randAlphaNum 5 | lower }} | ||
labels: | ||
heritage: {{.Release.Service | quote }} | ||
release: {{.Release.Name | quote }} | ||
chart: {{.Chart.Name}} | ||
annotations: | ||
"helm.sh/hook": pre-upgrade | ||
"helm.sh/hookWeight": "10" | ||
spec: | ||
template: | ||
metadata: | ||
name: "{{.Release.Name}}" | ||
labels: | ||
heritage: {{.Release.Service | quote }} | ||
release: {{.Release.Name | quote }} | ||
chart: "{{.Chart.Name}}" | ||
spec: | ||
restartPolicy: Never | ||
containers: | ||
- name: migrate-data | ||
image: "lachlanevenson/k8s-kubectl" | ||
command: ["/bin/sh", "-c"] | ||
args: ["(echo Creating directories; \ | ||
mkdir {{ .Values.influxdb.config.storage_directory }}/data || true) && \ | ||
(echo Moving data from /db/wal; \ | ||
mv {{ .Values.influxdb.config.storage_directory }}/db/wal {{ .Values.influxdb.config.storage_directory }} || true) && \ | ||
(echo Moving data from /db/*; \ | ||
mv {{ .Values.influxdb.config.storage_directory }}/db/* {{ .Values.influxdb.config.storage_directory }}/data; | ||
rm -rf {{ .Values.influxdb.config.storage_directory }}/db || true)"] | ||
volumeMounts: | ||
- name: data | ||
mountPath: {{ .Values.influxdb.config.storage_directory }} | ||
volumes: | ||
- name: data | ||
persistentVolumeClaim: | ||
claimName: {{ .Values.influxdb.persistence.name }} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters