Commit 3937fda5 authored by Jack Zampolin's avatar Jack Zampolin

Fix lint errors in chronograf chart

parent c62b3e26
......@@ -8,5 +8,5 @@ keywords:
home: https://www.influxdata.com/time-series-platform/chronograf/
maintainers:
- name: Jack Zampolin
- email: jack@influxdb.com
email: jack@influxdb.com
engine: gotpl
\ No newline at end of file
# `chronograf` Chart
\ No newline at end of file
# Chronograf
## An Open-Source Time Series Database
[Chronograf](https://github.com/influxdata/chronograf) is an open-source web application built by the folks over at [InfluxData](https://influxdata.com) and written in Go and React.js that provides the tools to visualize your monitoring data and easily create alerting and automation rules.
## QuickStart
```bash
$ helm install stable/chronograf --name foo --namespace bar
```
## Introduction
This chart bootstraps A Chronograf deployment and service on a Kubernetes cluster using the Helm Package manager.
## Prerequisites
- Kubernetes 1.4+
- PV provisioner support in the underlying infrastructure (optional)
## Installing the Chart
To install the chart with the release name `my-release`:
```bash
$ helm install --name my-release stable/chronograf
```
The command deploys Chronograf on the Kubernetes cluster in the default configuration. The [configuration](#configuration) section lists the parameters that can be configured during installation.
> **Tip**: List all releases using `helm list`
## Uninstalling the Chart
To uninstall/delete the `my-release` deployment:
```bash
$ helm delete my-release --purge
```
The command removes all the Kubernetes components associated with the chart and deletes the release.
## Configuration
The following tables lists the configurable parameters of the Chronograf chart and
their default values.
```yaml
image.repository: "quay.io/influxdb/chronograf"
image.tag: "latest"
image.pullPolicy: "Always"
service.type: LoadBalancer
persistence.enabled: false
persistence.storageClass: generic
persistence.accessMode: ReadWriteOnce
persistence.size: 8Gi
resources.requests.memory: 256Mi
resources.requests.cpu: 0.1
resources.limits.memory: 2Gi
resources.limits.cpu: 2
# Use this ingress with service.type: NodePort
ingress.enabled: false
ingress.tls: false
ingress.hostname: chronograf.foobar.com
ingress.annotations:
ingress.annotations.kubernetes.io/ingress.class: "nginx"
```
The [full image documentation](https://quay.io/influxdb/chronograf) contains more information about running Chronograf in docker.
Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example,
```bash
$ helm install --name my-release \
--set ingress.enabled=true,ingress.hostname=chronograf.foobar.com \
stable/chronograf
```
The above command enables persistence and changes the size of the requested data volume to 200GB.
Alternatively, a YAML file that specifies the values for the parameters can be provided while installing the chart. For example,
```bash
$ helm install --name my-release -f values.yaml stable/chronograf
```
> **Tip**: You can use the default [values.yaml](values.yaml)
## Persistence
The [Chronograf](https://quay.io/influxdb/chronograf) image stores data in the `/var/lib/chronograf` directory in the container.
The chart optionally mounts a [Persistent Volume](kubernetes.io/docs/user-guide/persistent-volumes/) volume at this location. The volume is created using dynamic volume provisioning.
\ No newline at end of file
1. Get the application URL by running these commands:
{{- if contains "NodePort" .Values.service.type }}
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ template "fullname" . }})
export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
echo http://$NODE_IP:$NODE_PORT/login
{{- else if contains "LoadBalancer" .Values.service.type }}
NOTE: It may take a few minutes for the LoadBalancer IP to be available.
You can watch the status of by running:
'kubectl get svc -w --namespace {{ .Release.Namespace }} {{ template "fullname" . }}'
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ template "fullname" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
echo http://$SERVICE_IP:{{ .Values.service.externalPort }}
{{- else if contains "ClusterIP" .Values.service.type }}
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ template "fullname" . }}" -o jsonpath="{.items[0].metadata.name}")
echo "Visit http://127.0.0.1:8080 to use your application"
kubectl port-forward $POD_NAME 8080:{{ .Values.service.externalPort }}
Chronograf can be accessed via port 80 on the following DNS name from within your cluster:
- http://{{ template "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:80
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
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 }')
{{- 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" . }}
{{- end }}
{{- if .Values.ingress.enabled }}
Chronograf will be available at the following IP
- http://{{ .Values.ingress.hostname }}
{{- end -}}
\ No newline at end of file
......@@ -17,24 +17,25 @@ spec:
imagePullPolicy: {{ .Values.image.pullPolicy }}
ports:
- containerPort: 8888
name: api
livenessProbe:
httpGet:
path: /ping
port: 8888
port: api
readinessProbe:
httpGet:
path: /ping
port: 8888
port: api
volumeMounts:
- name: data
mountPath: /var/lib/chronograf
resources:
{{ toYaml .Values.resources | indent 12 }}
{{ toYaml .Values.resources | indent 10 }}
volumes:
- name: data
{{- if .Values.persistence.enabled }}
persistentVolumeClaim:
claimName: {{ template "fullname" . }}
{{- else -}}
persistentVolumeClaim:
claimName: {{ template "fullname" . }}
{{ else }}
emptyDir: {}
{{- end -}}
\ No newline at end of file
{{ end }}
\ No newline at end of file
{{- if .Values.ingress.enabled -}}
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: {{ template "fullname" . }}
annotations:
{{ toYaml .Values.ingress.annotations | indent 4 }}
spec:
{{- if .Values.ingress.tls }}
tls:
- hosts:
- {{ .Values.ingress.hostname }}
secretName: {{ template "fullname" . }}-tls
{{- end }}
rules:
- host: {{ .Values.ingress.hostname }}
http:
paths:
- path: /
backend:
serviceName: {{ template "fullname" . }}
servicePort: 80
{{- end -}}
\ No newline at end of file
{{- if .Values.persistence.enabled }}
kind: PersistentVolumeClaim
{{- if .Values.persistence.enabled -}}
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: {{ template "fullname" . }}
annotations:
......
......@@ -11,7 +11,7 @@ service:
## Persist data to a persitent volume
persistence:
enabled: true
enabled: false
storageClass: generic
accessMode: ReadWriteOnce
size: 8Gi
......@@ -31,8 +31,8 @@ resources:
## ref : http://kubernetes.io/docs/user-guide/ingress/
##
ingress:
enabled: true
tls: true
hostname: chronograf.influxdata.com
enabled: false
tls: false
hostname: chronograf.foobar.com
annotations:
# kubernetes.io/ingress.class: "nginx"
\ No newline at end of file
kubernetes.io/ingress.class: "nginx"
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment