gridgain9
A Helm chart to deploy GridGain 9
About this chart
gridgain9
A Helm chart to deploy GridGain 9
Maintainers
| Name | Url | |
|---|---|---|
| GridGain Systems, Inc. All Rights Reserved | https://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: BeforeHookCreationArgo 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
| Key | Type | Default | Description |
|---|---|---|---|
| affinity | object | {} | Affinity for GridGain pods assignment |
| annotations | object | {} | Annotations for the cluster init job. Use it for CD tool hook annotations, e.g. argocd.argoproj.io/hook |
| args | list | [] | Override default container args (useful when using custom images) |
| clusterConfig.createSecret | object | {"content":"{}\n","mountPath":"/etc/gridgain9db/cluster.conf"} | Create secret from raw content passed |
| clusterConfig.createSecret.content | string | "{}\n" | Cluster config raw content |
| clusterConfig.mountPath | string | "/etc/gridgain9db/cluster.conf" | path inside GridGain init container to mount the file with cluster config |
| command | list | [] | Override default container command (useful when using custom images) |
| commonAnnotations | object | {} | Add annotations to all the deployed resources |
| configMaps | object | Check default values.yaml to view default config | GridGain main configuration to be injected as ConfigMap. |
| configMapsFromFile | object | {"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) |
| containerPorts | list | check default container ports in values.yaml | GridGain container ports |
| containerSecurityContext | object | {"allowPrivilegeEscalation":false,"capabilities":{"drop":["ALL"]},"privileged":false,"readOnlyRootFilesystem":false,"runAsGroup":1001,"runAsNonRoot":true,"runAsUser":1001,"seccompProfile":{"type":"RuntimeDefault"}} | Container Security Context for GridGain container |
| customLabels | object | {} | Add labels to all the deployed resources. May be templated |
| existingConfigmap | object | {} | Existing configmap with GridGain configuration to be mounted to StatefulSet |
| extraDeploy | list | [] | Array of extra objects to deploy with the release (evaluated as a template) |
| extraEnvVars | list | [] | Array with extra environment variables to add to GridGain nodes |
| extraEnvVarsCM | string | "" | Name of existing ConfigMap containing extra env vars for GridGain nodes |
| extraEnvVarsSecret | string | "" | Name of existing Secret containing extra env vars for GridGain nodes |
| extraPodSpec | object | {} | Optionally specify extra PodSpec for the GridGain pod(s) |
| extraPostHooks | list | [] | Array of extra post install/upgrade hooks to deploy with the release (partially evaluated as a template) |
| extraVolumeMounts | list | [] | Optionally specify extra list of additional volumeMounts for the GridGain container(s) |
| extraVolumes | list | [] | Optionally specify extra list of additional volumes for the GridGain pod(s) |
| fullnameOverride | string | "" | String to fully override common.names.fullname template |
| gridgainWorkDir | string | "/persistence" | GridGain persistent storage directory |
| hookResources | object | Check defaults below | Hook job resource requests and limits for init and recovery jobs |
| hookResources.limits.cpu | string | "1" | The cpu limit for the hook job containers |
| hookResources.limits.memory | string | "2Gi" | The memory limit for the hook job containers |
| hookResources.requests.cpu | string | "500m" | The requested cpu for the hook job containers |
| hookResources.requests.memory | string | "1Gi" | The requested memory for the hook job containers |
| image.pullPolicy | string | "IfNotPresent" | Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent' |
| image.registry | string | "docker.io" | GridGain image registry |
| image.repository | string | "gridgain/gridgain9" | GridGain image repository |
| image.tag | string | nil | if not set appVersion field from Chart.yaml is used |
| imagePullSecrets | list | [] | Name of the secret to pull a docker image from private registry |
| initJob.enabled | bool | true | Create the Job that initializes the cluster. Can be disabled once the cluster is initialized |
| initJob.ttlSecondsAfterFinished | int | 300 | Seconds after which the finished init Job is deleted. Set to null to keep the finished Job, e.g. when Argo CD manages the release |
| initContainers | list | [] | Add additional init containers to the GridGain pod(s) |
| jmx | object | {"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.agent | object | {"image":"busybox:1.36","pullPolicy":"IfNotPresent","resources":{"limits":{"cpu":"100m","memory":"128Mi"},"requests":{"cpu":"100m","memory":"128Mi"}}} | JMX agent configuration |
| jmx.agent.image | string | "busybox:1.36" | JMX agent image |
| jmx.agent.pullPolicy | string | "IfNotPresent" | JMX agent image pull policy |
| jmx.agent.resources | object | {"limits":{"cpu":"100m","memory":"128Mi"},"requests":{"cpu":"100m","memory":"128Mi"}} | JMX agent resources |
| jmx.config | string | "lowercaseOutputName: true\nlowercaseOutputLabelNames: true\n" | JMX configuration file content |
| jmx.enabled | bool | false | Enable JMX metrics exposure |
| jmx.port | int | 9404 | JMX port for metrics |
| keda | object | {"cooldownPeriod":300,"enabled":false,"maxReplicaCount":10,"minReplicaCount":1,"pollingInterval":30,"triggers":[]} | KEDA ScaledObject configuration for autoscaling |
| keda.cooldownPeriod | int | 300 | KEDA ScaledObject cooldown period |
| keda.enabled | bool | false | Enable KEDA ScaledObject |
| keda.maxReplicaCount | int | 10 | KEDA ScaledObject max replica count |
| keda.minReplicaCount | int | 1 | KEDA ScaledObject min replica count |
| keda.pollingInterval | int | 30 | KEDA ScaledObject polling interval |
| keda.triggers | list | [] | KEDA ScaledObject triggers |
| labels | object | {} | Map of labels |
| license | object | {} | GridGain license to be created or mounted as a secret. Needed to use GridGain Enterprise Edition (EE) or Ultimate Edition (UE) |
| lifecycleHooks | object | {} | Lifecycle hooks for GridGain container |
| livenessProbe | object | Check defaults below | Configures (liveness probe)[https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#configure-probes] for GridGain container |
| livenessProbe.enabled | bool | true | Enables livenessProbe on GridGain container |
| livenessProbe.failureThreshold | int | 3 | Failure threshold for livenessProbe |
| livenessProbe.httpGet | object | {"path":"/health/liveness","port":10300} | Path and port for probe |
| livenessProbe.initialDelaySeconds | int | 5 | Initial delay seconds for livenessProbe |
| livenessProbe.periodSeconds | int | 30 | Period seconds for livenessProbe |
| livenessProbe.successThreshold | int | 1 | Success threshold for livenessProbe |
| livenessProbe.timeoutSeconds | int | 10 | Timeout seconds for livenessProbe |
| nameOverride | string | "" | String to partially override common.names.fullname template (will maintain the release name) |
| networkPolicy | object | {} | Network Policies |
| nodeSelector | object | {} | Node labels for GridGain pods assignment |
| persistence | object | By default only one volume will be created. Check default values.yaml to view more details | GridGain persistence configuration |
| persistence.persistentVolumeClaimRetentionPolicy.enabled | bool | false | Enable Persistent volume retention policy |
| persistence.persistentVolumeClaimRetentionPolicy.whenDeleted | string | "Retain" | Volume retention behavior that applies when the StatefulSet is deleted |
| persistence.persistentVolumeClaimRetentionPolicy.whenScaled | string | "Retain" | Volume retention behavior when the replica count of the StatefulSet is reduced |
| persistence.volumePermissions.containerSecurityContext | object | disabled | Init 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.runAsGroup | int | 0 | Group ID for the init container |
| persistence.volumePermissions.containerSecurityContext.runAsNonRoot | bool | false | runAsNonRoot for the init container |
| persistence.volumePermissions.containerSecurityContext.runAsUser | int | 0 | User ID for the init container |
| persistence.volumePermissions.containerSecurityContext.seLinuxOptions | object | {} | Set SELinux options in container |
| persistence.volumePermissions.containerSecurityContext.seccompProfile | object | {"type":"RuntimeDefault"} | seccompProfile.type for the init container |
| persistence.volumePermissions.enabled | bool | true | Enable init container that changes the owner and group of the persistent volume |
| persistence.volumePermissions.image.pullPolicy | string | "IfNotPresent" | Init container volume-permissions image pull policy |
| persistence.volumePermissions.image.registry | string | "docker.io" | Init container volume-permissions image registry |
| persistence.volumePermissions.image.repository | string | "debian" | Init container volume-permissions image repository |
| persistence.volumePermissions.image.tag | string | "12.12-slim" | Init container volume-permissions image tag (immutable tags are recommended) |
| persistence.volumePermissions.resources | object | {"limits":{"cpu":"50m","memory":"64Mi"},"requests":{"cpu":"50m","memory":"64Mi"}} | Init container resource requests and limits |
| persistence.volumes.persistence.accessModes | list | ["ReadWriteOnce"] | PVC Access Mode for GridGain volume |
| persistence.volumes.persistence.annotations | object | {} | Annotations for the PVC |
| persistence.volumes.persistence.enabled | bool | true | Enable GridGain data persistence using PVC |
| persistence.volumes.persistence.existingClaim | string | "" | Name of an existing PVC to use |
| persistence.volumes.persistence.labels | object | {} | Labels for the PVC |
| persistence.volumes.persistence.mountPath | string | "/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.
- Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
- Place the chartgridgain9 is pinned at v1.1.13 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
- 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