chronograf

by Helm

Helm chartv1.2.6App 1.9.4

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.

About this chart

Chronograf Helm chart

Chronograf is an open-source web application used to visualize your monitoring data and easily create alerting and automation rules.

The Chronograf Helm chart uses the Helm package manager to bootstrap a Chronograf deployment and service on a Kubernetes cluster.

Prerequisites

  • Helm v2 or later
  • Kubernetes 1.4+
  • (Optional) PersistentVolume (PV) provisioner support in the underlying infrastructure

Install the chart

  1. Add the InfluxData Helm repository:

    helm repo add influxdata https://helm.influxdata.com/
    
  2. Run the following command, providing a name for your Chronograf release:

    helm upgrade --install my-release influxdata/chronograf
    

    Tip: --install can be shortened to -i.

    This command deploys Chronograf on the Kubernetes cluster using the default configuration. To find parameters you can configure during installation, see Configure the chart.

Tip: To view all Helm chart releases, run helm list.

Uninstall the chart

To uninstall the my-release deployment, use the following command:

helm uninstall my-release

This command removes all Kubernetes components associated with the chart and deletes the release.

Configure the chart

The following table lists configurable parameters, their descriptions, and their default values stored in values.yaml.

ParameterDescriptionDefault
image.repositoryimage repository urlchronograf
image.tagcontroller container image tag1.9.4
image.pullPolicycontroller container image pull policyIfNotPresent
service.replicasnumber of replicas for the specified service.type1
service.typeClusterIP, NodePort, or LoadBalancerClusterIP
persistence.enabledUse a PVC to persist datafalse
persistence.storageClassStorage class of backing PVCnil (uses alpha storage class annotation)
persistence.accessModesUse volume as ReadOnly or ReadWrite[ReadWriteOnce]
persistence.sizeSize of data volume8Gi
resources.requests.memoryMemory used for resource requests256Mi
resources.requests.cpuCPU used for resource requests0.1
resources.limits.memoryMaximum memory that can be used for resource requests2Gi
resources.limits.cpuMaximum CPU that can be used for resource requests2
ingress.enabledEnable ingress controller resourcefalse
ingress.hostnameIngress resource hostnameschronograf.foobar.com
ingress.tlsIngress TLS configurationfalse
ingress.annotationsIngress annotations configurationnull
oauth.enabledNeed to set to true to use any of the oauth optionsfalse
oauth.token_secretUsed for JWT to support running multiple copies of ChronografCHANGE_ME
oauth.github.enabledEnable oauth githubfalse
oauth.github.client_idoauth github client_idCHANGE_ME
oauth.github.client_secretThis is a comma separated list of GH organizationsCHANGE_ME
oauth.github.gh_orgsoauth github""
oauth.google.enabledEnable oauth googlefalse
oauth.google.client_idoauth googleCHANGE_ME
oauth.google.client_secretThis is a comma separated list of GH organizationsCHANGE_ME
oauth.google.public_urloauth google""
oauth.google.domainsThis is a comma separated list of Google Apps domains""
oauth.heroku.enabledEnable oauth herokufalse
oauth.heroku.client_idoauth heroku client_idCHANGE_ME
oauth.heroku.client_secretThis is a comma separated list of Heroku organizationsCHANGE_ME
oauth.heroku.gh_orgsoauth github""
envExtra environment variables that will be passed onto deployment pods{}
envFromSecretThe name of a secret in the same kubernetes namespace which contain values to be added to the environment{}
nodeSelectorNode labels for pod assignment{}
tolerationsToleration labels for pod assignment[]
affinityAffinity settings for pod assignment{}
influxdb.existingSecretName of an existing Secrect used to set the environment variables for the InfluxDB user and password. The expected keys in the secret are influxdb-user and influxdb-password.

To configure the chart, do either of the following:

  • Specify each parameter using the --set key=value[,key=value] argument to helm upgrade --install. For example, use the following command:

    helm upgrade --install my-release \
      --set ingress.enabled=true,ingress.hostname=chronograf.foobar.com \
        influxdata/chronograf
    
  • Provide a YAML file that specifies parameter values while installing the chart. For example, use the following command:

    helm upgrade --install my-release -f values.yaml influxdata/chronograf
    

    Tip: Use the default values.yaml.

For information about running Chronograf in Docker, see the full image documentation.

Persistence

The Chronograf image stores data in the /var/lib/chronograf directory in the container.

The chart optionally mounts a Persistent Volume at this location. The volume is created using dynamic volume provisioning.

OAuth using Kubernetes Secret

Use environment variables to configure OAuth in Chronograf. For more information, see https://docs.influxdata.com/chronograf/latest/administration/managing-security.

The following example snippet shows a Kubernetes Secret that contains sensitive information (GOOGLE_CLIENT_ID and GOOGLE_CLIENT_SECRET):

apiVersion: v1
kind: Secret
metadata:
  name: chronograf-google-env-secrets
  namespace: tick
type: Opaque
data:
    GOOGLE_CLIENT_ID: <BASE64_ENCODED_GOOGLE_CLIENT_ID>
    GOOGLE_CLIENT_SECRET: <BASE64_ENCODED_GOOGLE_CLIENT_SECRET>

With less sensitive information, such as GOOGLE_DOMAINS and PUBLIC_URL, use the chart's envFromSecret and env values. For example, include the following in a values file:

[...]
env:
  GOOGLE_DOMAINS: "yourdomain.com"
  PUBLIC_URL: "https://chronograf.yourdomain.com"
envFromSecret: chronograf-google-env-secrets
[...]

Check out our Slack channel for support and information.

Deploy chronograf with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has chronograf on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartchronograf is pinned at v1.2.6 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply