Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -417,13 +417,13 @@ stern statefulset/graylog-datanode -n graylog-helm-dev-1
---

# Graylog Helm Chart Values Reference
| Key Path | Description | Default |
|--------------------|------------------------------------------------------------------| --------- |
| `size` | Preset cluster size (optional). | `""` |
| `provider` | Kubernetes provider (optional). | `""` |
| `version` | Override Graylog and Graylog Data Node version (optional). | `""` |
| `nameOverride` | Override the `app.kubernetes.io/name` label value (optional). | `""` |
| `fullnameOverride` | Override the fully qualified name of the application (optional). | `""` |
| Key Path | Description | Default |
|--------------------|--------------------------------------------------------------------------------------------------| --------- |
| `provider` | Kubernetes provider (optional). | `""` |
| `version` | Override Graylog and Graylog Data Node version (optional). | `""` |
| `sizeOverride` | Override Graylog and Graylog Data Node replicas and resource requests using a preset (optional). | `""` |
| `nameOverride` | Override the `app.kubernetes.io/name` label value (optional). | `""` |
| `fullnameOverride` | Override the fully qualified name of the application (optional). | `""` |

## Global
These values affect Graylog, DataNode, and MongoDB
Expand Down
10 changes: 7 additions & 3 deletions graylog/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,10 @@ usage: (list <size preset key> <size field to index> . | list "graylog" | includ
{{- $dictName := index . 0 }}
{{- $args := index . 1 | initial }}
{{- $ctx := index . 1 | last }}
{{- $sizeKey := index $args 0 | default "default" }}
{{- $sizeKey := index $args 0 }}
{{- if empty $sizeKey }}
{{- int 0 }}
{{- else }}
{{- $fieldToIndex := index $args 1 | required "please request a valid size field: replicas, cpu, memory" }}
{{- if hasKey $defaults $dictName | not }}
{{- fail "presets are only available for 'graylog' and 'datanode'" }}
Expand All @@ -86,6 +89,7 @@ usage: (list <size preset key> <size field to index> . | list "graylog" | includ
{{- $values := dig "size" $sizeKey $dictName $default $presets }}
{{- index $indices $fieldToIndex | index $values }}
{{- end }}
{{- end }}

{{/*
Graylog size presets
Expand All @@ -111,14 +115,14 @@ usage: (list $key <field> . | include "datanode.presets.size")
Graylog replicas
*/}}
{{- define "graylog.replicas" }}
{{- .Values.graylog.replicas | default (list .Values.size "replicas" . | include "graylog.presets.size") | default 2 }}
{{- coalesce (list .Values.sizeOverride "replicas" . | include "graylog.presets.size" | int) .Values.graylog.replicas | default 2 | int }}
{{- end }}

{{/*
Datanode replicas
*/}}
{{- define "graylog.datanode.replicas" }}
{{- .Values.datanode.replicas | default (list .Values.size "replicas" . | include "graylog.datanode.presets.size") | default 3 }}
{{- coalesce (list .Values.sizeOverride "replicas" . | include "graylog.datanode.presets.size" | int) .Values.datanode.replicas | default 3 | int }}
{{- end }}

{{/*
Expand Down
20 changes: 10 additions & 10 deletions graylog/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,32 +4,32 @@
"type": "object",
"required": [],
"properties": {
"size": {
"provider": {
"type": "string",
"description": "Preset cluster size (optional)",
"description": "Kubernetes provider (optional)",
"oneOf": [
{
"type": "string",
"enum": [ "xs", "small", "medium", "large", "xl", "xxl", "default", "poc", "" ]
"enum": [ "aws", "aws-managed-sc", "azure", "gcp", "microk8s", "" ]
},
{ "type": "null" }
]
},
"provider": {
"version": {
"type": "string",
"description": "Kubernetes provider (optional)",
"description": "Override Graylog and Graylog Data Node version (optional)"
},
"sizeOverride": {
"type": "string",
"description": "Override the preset cluster size (optional)",
"oneOf": [
{
"type": "string",
"enum": [ "aws", "aws-managed-sc", "azure", "gcp", "microk8s", "" ]
"enum": [ "xs", "small", "medium", "large", "xl", "xxl", "default", "poc", "" ]
},
{ "type": "null" }
]
},
"version": {
"type": "string",
"description": "Override Graylog and Graylog Data Node version (optional)"
},
"nameOverride": {
"type": "string",
"description": "Override the name of the chart. Affects app.kubernetes.io/name annotation"
Expand Down
6 changes: 3 additions & 3 deletions graylog/values.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# Default values for Graylog.

# Preset cluster size (optional)
size: ""

# Kubernetes provider (optional)
provider: ""

# Override Graylog and Graylog Data Node version (optional)
version: ""

# Override the preset cluster size (optional)
sizeOverride: ""

# Override the chart name (optional)
nameOverride: ""

Expand Down
Loading