Skip to content
This repository was archived by the owner on Feb 22, 2022. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all 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
6 changes: 4 additions & 2 deletions stable/chronograf/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
name: chronograf
version: 0.2.2
description: Open-source web application written in Go and React.js that provides the tools to visualize your monitoring data and easily create alerting and automation rules.
version: 0.3.0
description: Open-source web application written in Go and React.js that provides
the tools to visualize your monitoring data and easily create alerting and automation
rules.
keywords:
- chronograf
- visualizaion
Expand Down
10 changes: 5 additions & 5 deletions stable/chronograf/templates/NOTES.txt
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
Chronograf can be accessed via port 80 on the following DNS name from within your cluster:

- http://{{ template "fullname" . }}.{{ .Release.Namespace }}
- http://{{ template "chronograf.fullname" . }}.{{ .Release.Namespace }}

You can easily connect to the remote instance from your browser. Forward the webserver port to localhost:8888

- kubectl port-forward --namespace {{ .Release.Namespace }} $(kubectl get pods --namespace {{ .Release.Namespace }} -l app={{ template "fullname" . }} -o jsonpath='{ .items[0].metadata.name }') 8888
- kubectl port-forward --namespace {{ .Release.Namespace }} $(kubectl get pods --namespace {{ .Release.Namespace }} -l app={{ template "chronograf.fullname" . }} -o jsonpath='{ .items[0].metadata.name }') 8888

You can also connect to the container running Chronograf. To open a shell session in the pod run the following:

- kubectl exec -i -t --namespace {{ .Release.Namespace }} $(kubectl get pods --namespace {{ .Release.Namespace }} -l app={{ template "fullname" . }} -o jsonpath='{.items[0].metadata.name}') /bin/sh
- kubectl exec -i -t --namespace {{ .Release.Namespace }} $(kubectl get pods --namespace {{ .Release.Namespace }} -l app={{ template "chronograf.fullname" . }} -o jsonpath='{.items[0].metadata.name}') /bin/sh

To trail the logs for the Chronograf pod run the following:

- kubectl logs -f --namespace {{ .Release.Namespace }} $(kubectl get pods --namespace {{ .Release.Namespace }} -l app={{ template "fullname" . }} -o jsonpath='{ .items[0].metadata.name }')
- kubectl logs -f --namespace {{ .Release.Namespace }} $(kubectl get pods --namespace {{ .Release.Namespace }} -l app={{ template "chronograf.fullname" . }} -o jsonpath='{ .items[0].metadata.name }')

{{- if eq .Values.service.type "LoadBalancer" }}

To watch for the LoadBalancer IP run the following

- kubectl get svc -w --namespace {{ .Release.Namespace }} -l app={{ template "fullname" . }}
- kubectl get svc -w --namespace {{ .Release.Namespace }} -l app={{ template "chronograf.fullname" . }}
{{- end }}
{{- if .Values.ingress.enabled }}

Expand Down
4 changes: 2 additions & 2 deletions stable/chronograf/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
{{/*
Expand the name of the chart.
*/}}
{{- define "name" -}}
{{- define "chronograf.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
{{- end -}}

{{/*
Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
*/}}
{{- define "fullname" -}}
{{- define "chronograf.fullname" -}}
{{- $name := default .Chart.Name .Values.nameOverride -}}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
{{- end -}}
30 changes: 15 additions & 15 deletions stable/chronograf/templates/deployment.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: {{ template "fullname" . }}
name: {{ template "chronograf.fullname" . }}
labels:
app: {{ template "fullname" . }}
app: {{ template "chronograf.fullname" . }}
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
release: "{{ .Release.Name }}"
heritage: "{{ .Release.Service }}"
Expand All @@ -12,7 +12,7 @@ spec:
template:
metadata:
labels:
app: {{ template "fullname" . }}
app: {{ template "chronograf.fullname" . }}
spec:
containers:
- name: {{ .Chart.Name }}
Expand All @@ -23,62 +23,62 @@ spec:
- name: TOKEN_SECRET
valueFrom:
secretKeyRef:
name: {{ template "fullname" . }}
name: {{ template "chronograf.fullname" . }}
key: token_secret
{{- if .Values.oauth.github.enabled }}
- name: GH_CLIENT_ID
valueFrom:
secretKeyRef:
name: {{ template "fullname" . }}
name: {{ template "chronograf.fullname" . }}
key: gh_client_id
- name: GH_CLIENT_SECRET
valueFrom:
secretKeyRef:
name: {{ template "fullname" . }}
name: {{ template "chronograf.fullname" . }}
key: gh_client_secret
- name: GH_ORGS
valueFrom:
secretKeyRef:
name: {{ template "fullname" . }}
name: {{ template "chronograf.fullname" . }}
key: gh_orgs
{{- end }}
{{- if .Values.oauth.heroku.enabled }}
- name: HEROKU_CLIENT_ID
valueFrom:
secretKeyRef:
name: {{ template "fullname" . }}
name: {{ template "chronograf.fullname" . }}
key: he_client_id
- name: HEROKU_CLIENT_SECRET
valueFrom:
secretKeyRef:
name: {{ template "fullname" . }}
name: {{ template "chronograf.fullname" . }}
key: he_client_secret
- name: HEROKU_ORGS
valueFrom:
secretKeyRef:
name: {{ template "fullname" . }}
name: {{ template "chronograf.fullname" . }}
key: he_orgs
{{- end }}
{{- if .Values.oauth.google.enabled }}
- name: GOOGLE_CLIENT_ID
valueFrom:
secretKeyRef:
name: {{ template "fullname" . }}
name: {{ template "chronograf.fullname" . }}
key: go_client_id
- name: GOOGLE_CLIENT_SECRET
valueFrom:
secretKeyRef:
name: {{ template "fullname" . }}
name: {{ template "chronograf.fullname" . }}
key: go_client_secret
- name: GOOGLE_DOMAINS
valueFrom:
secretKeyRef:
name: {{ template "fullname" . }}
name: {{ template "chronograf.fullname" . }}
key: go_domains
- name: PUBLIC_URL
valueFrom:
secretKeyRef:
name: {{ template "fullname" . }}
name: {{ template "chronograf.fullname" . }}
key: go_public_url
{{- end }}
{{- end }}
Expand All @@ -102,7 +102,7 @@ spec:
- name: data
{{- if .Values.persistence.enabled }}
persistentVolumeClaim:
claimName: {{ template "fullname" . }}
claimName: {{ template "chronograf.fullname" . }}
{{ else }}
emptyDir: {}
{{ end }}
8 changes: 4 additions & 4 deletions stable/chronograf/templates/ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: {{ template "fullname" . }}
name: {{ template "chronograf.fullname" . }}
labels:
app: {{ template "fullname" . }}
app: {{ template "chronograf.fullname" . }}
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
release: "{{ .Release.Name }}"
heritage: "{{ .Release.Service }}"
Expand All @@ -15,14 +15,14 @@ spec:
tls:
- hosts:
- {{ .Values.ingress.hostname | quote }}
secretName: {{ .Values.ingress.secretName | default (printf "%s-tls" (include "fullname" .)) }}
secretName: {{ .Values.ingress.secretName | default (printf "%s-tls" (include "chronograf.fullname" .)) }}
{{- end }}
rules:
- host: {{ .Values.ingress.hostname }}
http:
paths:
- path: /
backend:
serviceName: {{ template "fullname" . }}
serviceName: {{ template "chronograf.fullname" . }}
servicePort: 80
{{- end -}}
4 changes: 2 additions & 2 deletions stable/chronograf/templates/pvc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: {{ template "fullname" . }}
name: {{ template "chronograf.fullname" . }}
labels:
app: {{ template "fullname" . }}
app: {{ template "chronograf.fullname" . }}
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
release: "{{ .Release.Name }}"
heritage: "{{ .Release.Service }}"
Expand Down
2 changes: 1 addition & 1 deletion stable/chronograf/templates/secret.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
apiVersion: v1
kind: Secret
metadata:
name: {{ template "fullname" . }}
name: {{ template "chronograf.fullname" . }}
type: Opaque
data:
token_secret: {{ .Values.oauth.token_secret | b64enc | quote }}
Expand Down
6 changes: 3 additions & 3 deletions stable/chronograf/templates/service.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
apiVersion: v1
kind: Service
metadata:
name: {{ template "fullname" . }}
name: {{ template "chronograf.fullname" . }}
labels:
app: {{ template "fullname" . }}
app: {{ template "chronograf.fullname" . }}
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
release: "{{ .Release.Name }}"
heritage: "{{ .Release.Service }}"
Expand All @@ -13,4 +13,4 @@ spec:
- port: 80
targetPort: 8888
selector:
app: {{ template "fullname" . }}
app: {{ template "chronograf.fullname" . }}