Skip to content
This repository has been archived by the owner on May 16, 2023. It is now read-only.

[Logstash] allow array values for extra #1450

Merged
merged 4 commits into from
Feb 24, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
8 changes: 4 additions & 4 deletions logstash/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,12 +105,12 @@ useful for the [http input plugin][], for instance.
| `antiAffinityTopologyKey` | The [anti-affinity][] topology key]. By default this will prevent multiple Logstash nodes from running on the same Kubernetes node | `kubernetes.io/hostname` |
| `antiAffinity` | Setting this to hard enforces the [anti-affinity][] rules. If it is set to soft it will be done "best effort". Other values will be ignored | `hard` |
| `envFrom` | Templatable string to be passed to the [environment from variables][] which will be appended to the `envFrom:` definition for the container | `[]` |
| `extraContainers` | Templatable string of additional containers to be passed to the `tpl` function | `""` |
| `extraContainers` | Templatable string of additional containers to be passed to the `tpl` function | `[]` |
| `extraEnvs` | Extra [environment variables][] which will be appended to the `env:` definition for the container | `[]` |
| `extraInitContainers` | Templatable string of additional `initContainers` to be passed to the `tpl` function | `""` |
| `extraInitContainers` | Templatable string of additional `initContainers` to be passed to the `tpl` function | `[]` |
| `extraPorts` | An array of extra ports to open on the pod | `[]` |
| `extraVolumeMounts` | Templatable string of additional `volumeMounts` to be passed to the `tpl` function | `""` |
| `extraVolumes` | Templatable string of additional `volumes` to be passed to the `tpl` function | `""` |
| `extraVolumeMounts` | Templatable string of additional `volumeMounts` to be passed to the `tpl` function | `[]` |
| `extraVolumes` | Templatable string of additional `volumes` to be passed to the `tpl` function | `[]` |
| `fullnameOverride` | Overrides the full name of the resources. If not set the name will default to " `.Release.Name` - `.Values.nameOverride or .Chart.Name` " | `""` |
| `hostAliases` | Configurable [hostAliases][] | `[]` |
| `httpPort` | The http port that Kubernetes will use for the healthchecks and the service | `9600` |
Expand Down
16 changes: 16 additions & 0 deletions logstash/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,11 @@ spec:
name: {{ template "logstash.fullname" . }}-pattern
{{- end }}
{{- if .Values.extraVolumes }}
{{- if eq "string" (printf "%T" .Values.extraVolumes) }}
{{ tpl .Values.extraVolumes . | indent 8 }}
{{- else }}
{{ toYaml .Values.extraVolumes | indent 8 }}
{{- end }}
{{- end }}
{{- if .Values.imagePullSecrets }}
imagePullSecrets:
Expand All @@ -151,7 +155,11 @@ spec:
{{- end }}
{{- if .Values.extraInitContainers }}
initContainers:
{{- if eq "string" (printf "%T" .Values.extraInitContainers) }}
{{ tpl .Values.extraInitContainers . | indent 6 }}
{{- else }}
{{ toYaml .Values.extraInitContainers | indent 6 }}
{{- end }}
{{- end }}
containers:
- name: "{{ template "logstash.name" . }}"
Expand Down Expand Up @@ -212,12 +220,20 @@ spec:
{{- end -}}
{{- end -}}
{{- if .Values.extraVolumeMounts }}
{{- if eq "string" (printf "%T" .Values.extraVolumeMounts) }}
{{ tpl .Values.extraVolumeMounts . | indent 10 }}
{{- else }}
{{ toYaml .Values.extraVolumeMounts | indent 10 }}
{{- end }}
{{- end }}
{{- if .Values.lifecycle }}
lifecycle:
{{ toYaml .Values.lifecycle | indent 10 }}
{{- end }}
{{- if .Values.extraContainers }}
{{- if eq "string" (printf "%T" .Values.extraContainers) }}
{{ tpl .Values.extraContainers . | indent 6 }}
{{- else }}
{{ toYaml .Values.extraContainers | indent 6 }}
{{- end }}
{{- end }}
8 changes: 4 additions & 4 deletions logstash/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -128,21 +128,21 @@ persistence:
enabled: false
annotations: {}

extraVolumes: ""
extraVolumes: []
# - name: extras
# emptyDir: {}

extraVolumeMounts: ""
extraVolumeMounts: []
# - name: extras
# mountPath: /usr/share/extras
# readOnly: true

extraContainers: ""
extraContainers: []
# - name: do-something
# image: busybox
# command: ['do', 'something']

extraInitContainers: ""
extraInitContainers: []
# - name: do-something
# image: busybox
# command: ['do', 'something']
Expand Down