gridgain9

by GridGain Systems Inc.

Helm chartv1.1.13App 9.1.18Verified publisher

A Helm chart to deploy GridGain 9

About this chart

gridgain9

A Helm chart to deploy GridGain 9

Maintainers

NameEmailUrl
GridGain Systems, Inc. All Rights Reservedhttps://www.gridgain.com/

Source Code

TL;DR

helm repo add gridgain https://gridgain.github.io/helm-charts/
helm repo update 
helm install my-release gridgain/gridgain9

Prerequisites

  • Kubernetes 1.26+
  • Helm 3.11.3+
  • PV provisioner support in the persistence configuration

Limitations and Considerations

When running GridGain 9 in a Kubernetes environment, the node configuration becomes read-only and cannot be modified by using the gridgain9 node config update CLI command. This is by design, as node configuration is managed via Kubernetes resources.

Warning

While it is technically possible to make the node configuration writable by using an init container that copies the mounted configuration from one location to another (and pointing GridGain 9 to this new location), we strongly discourage this approach. It is not native to the Kubernetes model, and any changes made to the configuration will be lost during pod restarts or re-deployments.

Cluster initialization

The chart creates a Job that runs gridgain9 cluster init once all nodes have joined. The Job is idempotent: it checks the cluster state over REST first and exits successfully if the cluster is already initialized, including clusters with authentication enabled.

Argo CD

Argo CD renders the chart with helm template, so the init Job always has the same name and is tracked as a regular resource. When ttlSecondsAfterFinished deletes the finished Job, Argo CD reports the application as OutOfSync and self-heal recreates it. Use one of the following:

  • Keep the finished Job, so there is nothing to recreate:

    initJob:
      ttlSecondsAfterFinished: null
    
  • Run the Job as an Argo CD hook:

    annotations:
      argocd.argoproj.io/hook: PostSync
      argocd.argoproj.io/hook-delete-policy: BeforeHookCreation
    

    Argo CD runs hooks on every sync. Runs after the first one exit right away because the cluster is already initialized. Do not put hook annotations into commonAnnotations, which applies them to every resource of the release.

  • Disable the Job once the cluster is initialized:

    initJob:
      enabled: false
    

Values

KeyTypeDefaultDescription
affinityobject{}Affinity for GridGain pods assignment
annotationsobject{}Annotations for the cluster init job. Use it for CD tool hook annotations, e.g. argocd.argoproj.io/hook
argslist[]Override default container args (useful when using custom images)
clusterConfig.createSecretobject{"content":"{}\n","mountPath":"/etc/gridgain9db/cluster.conf"}Create secret from raw content passed
clusterConfig.createSecret.contentstring"{}\n"Cluster config raw content
clusterConfig.mountPathstring"/etc/gridgain9db/cluster.conf"path inside GridGain init container to mount the file with cluster config
commandlist[]Override default container command (useful when using custom images)
commonAnnotationsobject{}Add annotations to all the deployed resources
configMapsobjectCheck default values.yaml to view default configGridGain main configuration to be injected as ConfigMap.
configMapsFromFileobject{"gridgain-config":{"filename":"gridgain-config.conf","path":"/opt/gridgain/etc/gridgain-config.conf"}}GridGain main configuration to be injected as ConfigMap from files (files/configmaps)
containerPortslistcheck default container ports in values.yamlGridGain container ports
containerSecurityContextobject{"allowPrivilegeEscalation":false,"capabilities":{"drop":["ALL"]},"privileged":false,"readOnlyRootFilesystem":false,"runAsGroup":1001,"runAsNonRoot":true,"runAsUser":1001,"seccompProfile":{"type":"RuntimeDefault"}}Container Security Context for GridGain container
customLabelsobject{}Add labels to all the deployed resources. May be templated
existingConfigmapobject{}Existing configmap with GridGain configuration to be mounted to StatefulSet
extraDeploylist[]Array of extra objects to deploy with the release (evaluated as a template)
extraEnvVarslist[]Array with extra environment variables to add to GridGain nodes
extraEnvVarsCMstring""Name of existing ConfigMap containing extra env vars for GridGain nodes
extraEnvVarsSecretstring""Name of existing Secret containing extra env vars for GridGain nodes
extraPodSpecobject{}Optionally specify extra PodSpec for the GridGain pod(s)
extraPostHookslist[]Array of extra post install/upgrade hooks to deploy with the release (partially evaluated as a template)
extraVolumeMountslist[]Optionally specify extra list of additional volumeMounts for the GridGain container(s)
extraVolumeslist[]Optionally specify extra list of additional volumes for the GridGain pod(s)
fullnameOverridestring""String to fully override common.names.fullname template
gridgainWorkDirstring"/persistence"GridGain persistent storage directory
hookResourcesobjectCheck defaults belowHook job resource requests and limits for init and recovery jobs
hookResources.limits.cpustring"1"The cpu limit for the hook job containers
hookResources.limits.memorystring"2Gi"The memory limit for the hook job containers
hookResources.requests.cpustring"500m"The requested cpu for the hook job containers
hookResources.requests.memorystring"1Gi"The requested memory for the hook job containers
image.pullPolicystring"IfNotPresent"Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent'
image.registrystring"docker.io"GridGain image registry
image.repositorystring"gridgain/gridgain9"GridGain image repository
image.tagstringnilif not set appVersion field from Chart.yaml is used
imagePullSecretslist[]Name of the secret to pull a docker image from private registry
initJob.enabledbooltrueCreate the Job that initializes the cluster. Can be disabled once the cluster is initialized
initJob.ttlSecondsAfterFinishedint300Seconds after which the finished init Job is deleted. Set to null to keep the finished Job, e.g. when Argo CD manages the release
initContainerslist[]Add additional init containers to the GridGain pod(s)
jmxobject{"agent":{"image":"busybox:1.36","pullPolicy":"IfNotPresent","resources":{"limits":{"cpu":"100m","memory":"128Mi"},"requests":{"cpu":"100m","memory":"128Mi"}}},"config":"lowercaseOutputName: true\nlowercaseOutputLabelNames: true\n","enabled":false,"port":9404}JMX configuration for metrics exposure
jmx.agentobject{"image":"busybox:1.36","pullPolicy":"IfNotPresent","resources":{"limits":{"cpu":"100m","memory":"128Mi"},"requests":{"cpu":"100m","memory":"128Mi"}}}JMX agent configuration
jmx.agent.imagestring"busybox:1.36"JMX agent image
jmx.agent.pullPolicystring"IfNotPresent"JMX agent image pull policy
jmx.agent.resourcesobject{"limits":{"cpu":"100m","memory":"128Mi"},"requests":{"cpu":"100m","memory":"128Mi"}}JMX agent resources
jmx.configstring"lowercaseOutputName: true\nlowercaseOutputLabelNames: true\n"JMX configuration file content
jmx.enabledboolfalseEnable JMX metrics exposure
jmx.portint9404JMX port for metrics
kedaobject{"cooldownPeriod":300,"enabled":false,"maxReplicaCount":10,"minReplicaCount":1,"pollingInterval":30,"triggers":[]}KEDA ScaledObject configuration for autoscaling
keda.cooldownPeriodint300KEDA ScaledObject cooldown period
keda.enabledboolfalseEnable KEDA ScaledObject
keda.maxReplicaCountint10KEDA ScaledObject max replica count
keda.minReplicaCountint1KEDA ScaledObject min replica count
keda.pollingIntervalint30KEDA ScaledObject polling interval
keda.triggerslist[]KEDA ScaledObject triggers
labelsobject{}Map of labels
licenseobject{}GridGain license to be created or mounted as a secret. Needed to use GridGain Enterprise Edition (EE) or Ultimate Edition (UE)
lifecycleHooksobject{}Lifecycle hooks for GridGain container
livenessProbeobjectCheck defaults belowConfigures (liveness probe)[https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#configure-probes] for GridGain container
livenessProbe.enabledbooltrueEnables livenessProbe on GridGain container
livenessProbe.failureThresholdint3Failure threshold for livenessProbe
livenessProbe.httpGetobject{"path":"/health/liveness","port":10300}Path and port for probe
livenessProbe.initialDelaySecondsint5Initial delay seconds for livenessProbe
livenessProbe.periodSecondsint30Period seconds for livenessProbe
livenessProbe.successThresholdint1Success threshold for livenessProbe
livenessProbe.timeoutSecondsint10Timeout seconds for livenessProbe
nameOverridestring""String to partially override common.names.fullname template (will maintain the release name)
networkPolicyobject{}Network Policies
nodeSelectorobject{}Node labels for GridGain pods assignment
persistenceobjectBy default only one volume will be created. Check default values.yaml to view more detailsGridGain persistence configuration
persistence.persistentVolumeClaimRetentionPolicy.enabledboolfalseEnable Persistent volume retention policy
persistence.persistentVolumeClaimRetentionPolicy.whenDeletedstring"Retain"Volume retention behavior that applies when the StatefulSet is deleted
persistence.persistentVolumeClaimRetentionPolicy.whenScaledstring"Retain"Volume retention behavior when the replica count of the StatefulSet is reduced
persistence.volumePermissions.containerSecurityContextobjectdisabledInit container Security Context Note: the chown of the data folder is done to containerSecurityContext.runAsUser and not the below volumePermissions.containerSecurityContext.runAsUser
persistence.volumePermissions.containerSecurityContext.runAsGroupint0Group ID for the init container
persistence.volumePermissions.containerSecurityContext.runAsNonRootboolfalserunAsNonRoot for the init container
persistence.volumePermissions.containerSecurityContext.runAsUserint0User ID for the init container
persistence.volumePermissions.containerSecurityContext.seLinuxOptionsobject{}Set SELinux options in container
persistence.volumePermissions.containerSecurityContext.seccompProfileobject{"type":"RuntimeDefault"}seccompProfile.type for the init container
persistence.volumePermissions.enabledbooltrueEnable init container that changes the owner and group of the persistent volume
persistence.volumePermissions.image.pullPolicystring"IfNotPresent"Init container volume-permissions image pull policy
persistence.volumePermissions.image.registrystring"docker.io"Init container volume-permissions image registry
persistence.volumePermissions.image.repositorystring"debian"Init container volume-permissions image repository
persistence.volumePermissions.image.tagstring"12.12-slim"Init container volume-permissions image tag (immutable tags are recommended)
persistence.volumePermissions.resourcesobject{"limits":{"cpu":"50m","memory":"64Mi"},"requests":{"cpu":"50m","memory":"64Mi"}}Init container resource requests and limits
persistence.volumes.persistence.accessModeslist["ReadWriteOnce"]PVC Access Mode for GridGain volume
persistence.volumes.persistence.annotationsobject{}Annotations for the PVC
persistence.volumes.persistence.enabledbooltrueEnable GridGain data persistence using PVC
persistence.volumes.persistence.existingClaimstring""Name of an existing PVC to use
persistence.volumes.persistence.labelsobject{}Labels for the PVC
persistence.volumes.persistence.mountPathstring"/persistence"The path the volume will be mounted at
persistence.volumes.persist

Deploy gridgain9 with OpenTenant

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