Add modules and extraConfig fields to Valkey CRD#396
Open
chistopat wants to merge 5 commits intohyperspike:mainfrom
Open
Add modules and extraConfig fields to Valkey CRD#396chistopat wants to merge 5 commits intohyperspike:mainfrom
chistopat wants to merge 5 commits intohyperspike:mainfrom
Conversation
Support loading Valkey modules via loadmodule directive and appending arbitrary configuration to valkey.conf through the custom resource spec.
Dockerfile.valkey: remove exact version pins that break when Alpine updates packages (openssl 3.5.4 -> 3.5.5). scan.yaml: pin gosec to v2.22.4 instead of master to avoid invalid SARIF output from unreleased versions.
Dockerfile.valkey: add hadolint ignore for DL3018 since exact Alpine package pins break on every minor update. scan.yaml: replace gosec Docker action with go install to avoid broken SARIF output from the container image.
openssl 3.5.4-r0 -> 3.5.5-r0, openssl-dev 3.5.4-r0 -> 3.5.5-r0
Author
|
@dmolik review it please |
0361db7 to
2fc8e24
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
ModuleConfigtype andmodules/extraConfigfields toValkeySpecvalkey.confrendersloadmoduledirectives from.Spec.Modules.Spec.ExtraConfigat the end ofvalkey.confopenssl3.5.4 -> 3.5.5)go installto fix invalid SARIF outputMotivation
Currently there's no way to load Valkey modules (like valkey-search) or set arbitrary config directives through the CRD. Users have to build custom images with baked-in configuration and hack entrypoint scripts.
These two fields solve it declaratively:
Changes
api/v1/valkey_types.go— newModuleConfigtype + 2 fields inValkeySpecinternal/controller/scripts/valkey.conf— template directives for modules and extraConfigapi/v1/zz_generated.deepcopy.go— auto-generatedconfig/crd/bases/hyperspike.io_valkeys.yaml— auto-generatedNo controller changes needed —
upsertConfigMapalready passes the fullValkeyobject to the template.Test plan
go build ./...go test ./...make generate+make manifests