Skip to content

add support for plugins#6

Merged
monrax merged 6 commits intomainfrom
feat/plugins
Aug 25, 2025
Merged

add support for plugins#6
monrax merged 6 commits intomainfrom
feat/plugins

Conversation

@monrax
Copy link
Copy Markdown
Collaborator

@monrax monrax commented Jun 30, 2025

Add support for plugins through direct download at init time

@monrax monrax changed the title Feat/plugins add support for plugins Jun 30, 2025
@williamtrelawny
Copy link
Copy Markdown
Collaborator

@monrax Can you resolve this conflict please? I'm not familiar enough with git syntax to know how to fix it 😓

@monrax
Copy link
Copy Markdown
Collaborator Author

monrax commented Aug 20, 2025

I just updated this branch, and rebased on top of main. All conflicts should be resolved @williamtrelawny

This PR introduces support for Graylog plugins, as well as support for custom environment variables in both graylog and datanode.

Plugins

  • Given an existing PVC, by specifying the existingClaim name for a given plugin, it will be mounted to the copy-data init container at /mnt/shared/plugins/<plugin-name>. The init container will then copy all .jar files from /mnt/shared/plugins/* to the main application plugin directory (mounted at /mnt/plugin in the init container, and /usr/share/graylog/plugin in the main graylog container).
  • Given a custom container image that holds any number of JAR files in its working directory, by specifying the image field with the full image reference (image: "<repo/image:tag>") for a given plugin, it will be used to start a new init container with the following command: cp *.jar /mnt/plugins/, copying all .jar files to the main application plugin directory (mounted at /mnt/plugin in the init container, and /usr/share/graylog/plugin in the main graylog container).
  • Given the URL of a JAR file available in a remote location, and a SHA256 hash of that JAR file, by specifying both the url and checksum fields for a given plugin, the copy-data init container will fetch the JAR resource and check if the hashes match, and if so it will copy the file to the main application plugin directory (mounted at /mnt/plugin in the init container, and /usr/share/graylog/plugin in the main graylog container).

Env vars

For both graylog.custom and datanode.custom, custom environment variables can be specified:

  • As simple name-value pairs using env.
    e.g. --set graylog.custom.env.FOO=BAR or --set datanode.custom.env.MY_FLAG=true
  • As a full Kubernetes EnvVar list spec using extraEnv.
# e.g. 
graylog:
  custom:
    extraEnv:
    - name: FOO
      value: BAZ
    - name: MADE_UP_PASSWORD
      valueFrom:
        secretKeyRef:
          name: mysecret
          key: password

In the case of a given key specified using both env and extraEnv, the latter takes preference.


All of this has been tested with both microk8s and EKS.

@monrax monrax mentioned this pull request Aug 20, 2025
Copy link
Copy Markdown
Collaborator

@alix-graylog alix-graylog left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. I don't have a great way to test this on my end, but I this looks solid.

monrax added 5 commits August 22, 2025 18:34
1. copy *.jar files directly from custom image as additional init container
2. copy *.jar files from dir mounted from existing PVC on init container
3. fetch using URL with init container

- update values.yaml with final plugin schema:
  do not differentiate between type-1-and-2 plugins and type-3 plugins, instead check for url to distinguish type-3 plugins from the others
- update values reference in README
- update helpers to use new schema
- update conditionals in statefulset to accomodate new schema
@monrax monrax force-pushed the feat/plugins branch 2 times, most recently from 121983d to 7b99b76 Compare August 25, 2025 09:02
@monrax monrax merged commit 5119967 into main Aug 25, 2025
1 check passed
@monrax monrax deleted the feat/plugins branch December 5, 2025 11:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants