graylog

by groundhog2k

Helm chartv0.13.14App 7.2.2

A Helm chart for Graylog on Kubernetes

About this chart

Graylog

Changelog

see RELEASENOTES.md

A Helm chart for Graylog on Kubernetes

TL;DR

helm repo add groundhog2k https://groundhog2k.github.io/helm-charts/
helm install my-release groundhog2k/graylog

Introduction

This chart uses the original Graylog image from Docker Hub to deploy a stateful Graylog instance in a Kubernetes cluster.

Prerequisites

  • Kubernetes 1.12+
  • Helm 3.x
  • PV provisioner support in the underlying infrastructure

Hint

OpenSearch/Elasticsearch can be installed by using the respective helm charts and setting the hostname in settings.elastic.hosts MongoDB can be referenced by installed using the subchart with mongodb.enabled or by pointing to another MongoDB installation. (see Database settings)

Installing the Chart

To install the chart with the release name my-release:

helm install my-release groundhog2k/graylog

Uninstalling the Chart

To uninstall/delete the my-release deployment:

helm uninstall my-release

Requirements

RepositoryNameVersion
@groundhog2kmongodb0.6.8

Common parameters

KeyTypeDefaultDescription
fullnameOverridestring""Fully override the deployment name
nameOverridestring""Partially override the deployment name

Deployment parameters

KeyTypeDefaultDescription
image.pullPolicystring"IfNotPresent"Image pull policy
image.registrystring"docker.io"Image registry
image.repositorystring"graylog/graylog"Image name
image.tagstring""Image tag
initImage.pullPolicystring"IfNotPresent"Init container image pull policy
initImage.registrystring"docker.io"Image registry
initImage.repositorystring"maxmindinc/geoipupdate"Default init container image
initImage.tagstring"latest"Init container image tag
imagePullSecretslist[]Image pull secrets
startupProbeobjectsee values.yamlStartup probe configuration
livenessProbeobjectsee values.yamlLiveness probe configuration
readinessProbeobjectsee values.yamlReadiness probe configuration
customStartupProbeobject{}Custom startup probe (overwrites default startup probe configuration)
customLivenessProbeobject{}Custom liveness probe (overwrites default liveness probe configuration)
customReadinessProbeobject{}Custom readiness probe (overwrites default readiness probe configuration)
resourcesobject{}Resource limits and requests
priorityClassNamestring""Deployment priority class name
nodeSelectorobject{}Deployment node selector
customLabelsobject{}Additional labels for Deployment or StatefulSet
customAnnotationsobject{}Additional annotations for Deployment or StatefulSet
podAnnotationsobject{}Additional pod annotations
podLabelsobject{}Additional pod labels
podSecurityContextobjectsee values.yamlPod security context
securityContextobjectsee values.yamlContainer security context
envlist[]Additional container environmment variables
argslist[]Additional container command arguments
serviceAccount.annotationsobject{}Additional service account annotations
serviceAccount.createboolfalseEnable service account creation
serviceAccount.namestring""Name of the service account
affinityobject{}Pod affinity
tolerationslist[]Pod tolerations
topologySpreadConstraintsobject{}Topology spread constraints for pods
podManagementPolicystringOrderedReadyPod management policy
updateStrategyTypestringRollingUpdateUpdate strategy
replicaCountint1Number of replicas (Not supported - Don't change in this chart version)
revisionHistoryLimitintnilMaximum number of revisions maintained in revision history
podDisruptionBudgetobject{}Pod disruption budget
podDisruptionBudget.minAvailableintnilMinimum number of pods that must be available after eviction
podDisruptionBudget.maxUnavailableintnilMaximum number of pods that can be unavailable after eviction

Service parameters

KeyTypeDefaultDescription
service.typestring"ClusterIP"Service type
service.httpint80Graylog http service port
service.nodePortintnilThe http node port (only relevant for type LoadBalancer or NodePort)
service.clusterIPstringnilThe cluster ip address (only relevant for type LoadBalancer or NodePort)
service.loadBalancerIPstringnilThe load balancer ip address (only relevant for type LoadBalancer)
service.loadBalancerSourceRangeslist[]The list of IP CIDR ranges that are allowed to access the load balancer (only relevent for type LoadBalancer)
service.annotationsobject{}Additional service annotations
service.labelsobject{}Additional service labels

Extra service parameters

Section to define all additional UDP/TCP inputs for Graylog

KeyTypeDefaultDescription
extraServices[].namestringnilUnique name of the input service
extraServices[].typestringnilService type (ClusterIP / NodePort / LoadBalancer)
extraServices[].protocolstringnilProtocol type (TCP / UDP)
extraServices[].containerPortintnilContainer port
extraServices[].portintnilService port
extraServices[].nodePortintnilThe http node port (only relevant for type LoadBalancer or NodePort)
extraServices[].clusterIPstringnilThe cluster ip address (only relevant for type LoadBalancer or NodePort)
extraServices[].loadBalancerIPstringnilThe load balancer ip address (only relevant for type LoadBalancer)
extraServices[].loadBalancerSourceRangeslist[]The list of IP CIDR ranges that are allowed to access the load balancer (only relevant for type LoadBalancer)
extraServices[].annotationsobject{}Additional service annotations
extraServices[].labelsobject{}Additional service labels

Ingress parameters

KeyTypeDefaultDescription
ingress.enabledboolfalseEnable ingress for Graylog service
ingress.classNamestringnilOptional ingress class name
ingress.annotationsobject{}Additional annotations for ingress
ingress.labelsobject{}Additional ingress labels
ingress.hosts[].hoststringnilHostname for the ingress endpoint
ingress.hosts[].paths[]listnilPath routing for the ingress endpoint host
ingress.tlslist[]Ingress TLS parameters

HTTPRoute parameters

KeyTypeDefaultDescription
httpRoute.enabledboolfalseEnable HTTPRoute for the Graylog service
httpRoute.annotationsobject{}Additional HTTPRoute annotations
httpRoute.labelsobject{}Additional HTTPRoute labels
httpRoute.parentRefslist[]Gateway parent references (required when httpRoute is enabled and listenerSet is disabled)
httpRoute.hostnameslist[]Hostnames for the HTTPRoute
httpRoute.ruleslistsee values.yamlHTTPRoute rules for the Graylog service

ListenerSet parameters

KeyTypeDefaultDescription
listenerSet.enabledboolfalseEnable ListenerSet for Gateway API
listenerSet.annotationsobject{}Additional ListenerSet annotations
listenerSet.labelsobject{}Additional ListenerSet labels
listenerSet.parentRefobject{}Gateway parent reference (required)
listenerSet.listenerslist[]Listeners to attach to the parent Gateway

Network policies

Allows to define optional network policies for ingress and egress The policyTypes will be automatically set

KeyTypeDefaultDescription
networkPolicy.ingressobject{}Ingress network policies
networkPolicy.egressobject{}Egress network policies

Database settings

KeyTypeDefaultDescription
externalDatabase.hoststringnilExternal MongoDB database host
externalDatabase.namestring"graylog"External database name
externalDatabase.userstringnilExternal database user name
externalDatabase.passwordstringnilExternal database user password
mongodb.enabledboolfalseEnable MongoDB deployment (will disable external database settings)
mongodb.settings.rootUsernamestring"admin"The root username
mongodb.settings.rootPasswordstring""The root user password
mongodb.userDatabaseobject{}Optional MongoDB user database
mongodb.userDatabase.namestringnilName of the user database
mongodb.userDatabase.userstringnilUser name with full access to user database
mongodb.userDatabase.passwordstringnilPassword of created user
mongodb.storageobjectsee values.yamlMongoDB storage settings

MaxMind GeoIP2 database

KeyTypeDefaultDescription
initGeoIPDatabase.enabledboolfalseEnable GeoIP database download
initGeoIPDatabase.accountIdstring""MaxMind UserId / AccountId
initGeoIPDatabase.licenseKeystring""MaxMind license key
initGeoIPDatabase.editionIdstring"GeoLite2-City"Default database edition id - see MaxMind page
initGeoIPDatabase.hoststring""The MaxMind download host (not necessary to change that - default updates.maxmind.com)
initGeoIPDatabase.proxystring""A valid proxy if internet access is running through a proxy
initGeoIPDatabase.proxyUserPasswordstring""Proxy username and password in format "username:password"

Storage parameters

KeyTypeDefaultDescription
storage.accessModes[0]string"ReadWriteOnce"Storage access mode
storage.persistentVolumeClaimNamestringnilPVC name when existing storage volume should be used
storage.volumeNamestring"graylog-volume"Internal volume name
storage.requestedSizestringnilSize for new PVC, when no existing PVC is used
storage.classNamestringnilStorage class name
storage.annotationsobject{}Additional storage annotations
storage.labelsobject{}Additional storage labels

Graylog parameters

KeyTypeDefaultDescription
settings.http.externalUristringhttp://127.0.0.1:9000/External URI for Graylog
settings.http.publishUristringnilGraylog publish URI
settings.clusterNamestringsinglenode-clusterCluster name
settings.javaOptsstringnilAdditional JVM options for Graylog
settings.passwordSecretstringsomepasswordpepperSecret for password encryption and salting
settings.rootUser.usernamestring"admin"Graylog root user name
settings.rootUser.sha2passwordstring"8c6976e5b5410415bde908bd4dee15dfb167a9c873fc4bb8a81f6f2ab448a918"Graylog root user password SHA2 (default: "admin")
settings.rootUser.emailstring""Graylog root user email address
settings.rootUser.timezonestring"UTC"Graylog root user timezone
settings.journal.maxAgestring"12h"Graylog max. journal age
settings.journal.maxSizestring"5gb"Graylog max. journal size
settings.elastic.hostsstring"http://127.0.0.1:9200"Comma separated list of Elasticsearch hosts (only used when elasticsearch.enabled is false)
settings.elastic.indexPrefixstring"graylog"Elasticsearch index prefix
settings.smtp.enabledboolfalseEnable/Disable SMTP
settings.smtp.hoststring"mail.example.com"SMTP host name
settings.smtp.portint587SMTP port
settings.smtp.useAuthbooltrueUse SMTP authentication
settings.smtp.useTlsbooltrueUse SMTP with STARTTLS
settings.smtp.useSslboolfalseEnable SMTP over SSL (SMTPS)
settings.smtp.usernamestring"[email protected]"SMTP username
settings.smtp.passwordstring"secret"SMTP password
settings.smtp.emailFromstring"[email protected]"Mail from address
settings.smtp.subjectPrefixstring"[graylog]"Mail subject prefix

Further Graylog parameter can be set via environment variables (see Deployment parameter: env:)

Metrics support parameters

KeyTypeDefaultDescription
metrics.enabledboolfalseEnable metrics support
metrics.service.typestring"ClusterIP"Service type (not available when haMode is enabled)
metrics.service.servicePortint9833Redis metrics exporter service port
metrics.service.containerPortint9833Redis metrics exporter conta

Deploy graylog with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has graylog 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 chartgraylog is pinned at v0.13.14 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