aws / aws/eks-charts

Support luaScripts - add ConfigMap template and DaemonSet volume mount for Lua scripts

Open Beginner friendly
#1,307 1 comment 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Mustache
Stars
1.3k
Forks
1.1k
Avg merge
22m
Merged PRs (30d)
5

Description

## Feature Request
Add native support for Lua scripts in the chart.

## Use Case
Fluent Bit supports Lua filters via the `lua` filter plugin. Currently there is no way to
provide Lua scripts through the chart — users have to manually patch the ConfigMap after
every Helm deployment.

## Proposed Implementation
1. Add `luaScripts` to `values.yaml`:
```yaml
luaScripts: {}
# helpers.lua: |
# function my_filter(tag, timestamp, record)
# return 2, timestamp, record
# end
```

2. Add templates/configmap-luascripts.yaml:
```yaml
{{- if .Values.luaScripts -}}
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ include "aws-for-fluent-bit.fullname" . }}-luascripts
namespace: {{ include "aws-for-fluent-bit.namespace" . }}
labels:
{{- include "aws-for-fluent-bit.labels" . | nindent 4 }}
data:
{{ range $key, $value := .Values.luaScripts }}
{{ $key }}: {{ (tpl $value $) | quote }}
{{ end }}
{{- end -}}
```

3. Add to daemonset.yaml volumeMount:
```yaml
{{- if .Values.luaScripts }}
- name: luascripts
mountPath: /fluent-bit/scripts/
{{- end }}
```

4. Add to daemonset.yaml volume:
```yaml
{{- if .Values.luaScripts }}
- name: luascripts
configMap:
name: {{ include "aws-for-fluent-bit.fullname" . }}-luascripts
{{- end }}
```

## References
fluent/fluent-bit chart implements this:
https://github.com/fluent/helm-charts/blob/main/charts/fluent-bit/templates/configmap-luascripts.yaml

Contributor guide

Open the contributing guide

Research direction

Start with values.yaml and the existing templates/configmap and daemonset.yaml files, then compare the referenced Fluent Bit chart implementation. Render the chart with luaScripts configured and without it; done means the Lua ConfigMap and DaemonSet volume mount are present only when scripts are supplied.

Written by the indexing model from the issue text.

Assessment

Tech stack
helm, kubernetes
Domain
devops, infrastructure
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
84/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.