diff --git a/example/redis/distros/deploy-distros.sh b/example/redis/distros/deploy-distros.sh index a41a093e..2799a519 100755 --- a/example/redis/distros/deploy-distros.sh +++ b/example/redis/distros/deploy-distros.sh @@ -78,8 +78,13 @@ bind_valkey() { apply_cp valkey cp-valkey.yaml; label_sts valkey valkey-primary bind_keydb() { apply_cp keydb cp-keydb.yaml; label_sts keydb keydb keydb; } bind_dragonfly() { apply_cp dragonfly cp-dragonfly.yaml + # The operator only stamps podMetadata onto NEWLY created pods — a live patch does + # not relabel the running instance, so node-agent never switches to the profile. + # Patch the CR, then recreate the instance pod so it is born with the label. kubectl -n dragonfly patch dragonfly dragonfly --type merge \ -p '{"spec":{"podMetadata":{"labels":{"kubescape.io/user-defined-profile":"dragonfly"}}}}' + kubectl -n dragonfly delete pod dragonfly-0 --ignore-not-found + kubectl -n dragonfly wait --for=condition=ready pod/dragonfly-0 --timeout=120s } do_distro() { # deploy-fn bind-fn diff --git a/example/redis/distros/functional/dragonfly.yaml b/example/redis/distros/functional/dragonfly.yaml index ff3843da..e5fb0cf9 100644 --- a/example/redis/distros/functional/dragonfly.yaml +++ b/example/redis/distros/functional/dragonfly.yaml @@ -33,7 +33,6 @@ tests: - {name: time, redis: {command: ["TIME"]}} - {name: dbsize, redis: {command: ["DBSIZE"]}} - {name: slowlog-get, redis: {command: ["SLOWLOG", "GET", "10"]}} - - {name: memory-doctor, redis: {command: ["MEMORY", "DOCTOR"]}} # ── Strings + expiry variants ───────────────────────────────────────────── - {name: set, redis: {command: ["SET", "s:k", "hello"], expectedReply: "OK"}} @@ -104,8 +103,9 @@ tests: - {name: eval, redis: {command: ["EVAL", "return redis.call('SET', KEYS[1], ARGV[1])", "1", "lua:k", "luaval"]}} - {name: eval-compute, redis: {command: ["EVAL", "local t=0 for i=1,100 do t=t+i end return t", "0"]}} - {name: script-load, redis: {command: ["SCRIPT", "LOAD", "return 1"]}} - - {name: function-list, redis: {command: ["FUNCTION", "LIST"]}} - - {name: function-stats,redis: {command: ["FUNCTION", "STATS"]}} + # dragonfly (v1.39) implements a Redis SUBSET: FUNCTION (Redis 7 server-side + # functions), OBJECT, MEMORY DOCTOR and CONFIG SET appendonly are unsupported, + # so those tests are omitted here (they remain in the redis-oss/valkey suites). # NOTE: MULTI/EXEC transactions and SUBSCRIBE/MONITOR/blocking ops are omitted — # bobctl's RESP client opens a fresh RESP2 connection per test, so multi-command @@ -122,7 +122,6 @@ tests: - {name: ttl, redis: {command: ["TTL", "s:k"]}} - {name: persist, redis: {command: ["PERSIST", "s:k"]}} - {name: type, redis: {command: ["TYPE", "z:lb"]}} - - {name: object-encoding, redis: {command: ["OBJECT", "ENCODING", "z:lb"]}} - {name: copy, redis: {command: ["COPY", "s:k", "s:kcopy"]}} - {name: scan, redis: {command: ["SCAN", "0", "COUNT", "100"]}} - {name: randomkey, redis: {command: ["RANDOMKEY"]}} @@ -131,8 +130,6 @@ tests: # ── Persistence — the fork-triggering paths (key for a realistic profile) ── - {name: bgsave, redis: {command: ["BGSAVE", "SCHEDULE"]}} - {name: lastsave, redis: {command: ["LASTSAVE"]}} - - {name: config-aof-on, redis: {command: ["CONFIG", "SET", "appendonly", "yes"], expectedReply: "OK"}} - - {name: config-aof-off, redis: {command: ["CONFIG", "SET", "appendonly", "no"]}} # ── Cleanup ─────────────────────────────────────────────────────────────── - {name: unlink, redis: {command: ["UNLINK", "s:kcopy", "l:q2", "set:u", "z:dst"]}} diff --git a/example/redis/distros/functional/keydb.yaml b/example/redis/distros/functional/keydb.yaml index 52f5b62a..dafc6b1c 100644 --- a/example/redis/distros/functional/keydb.yaml +++ b/example/redis/distros/functional/keydb.yaml @@ -100,12 +100,12 @@ tests: - {name: xinfo, redis: {command: ["XINFO", "STREAM", "st:s"]}} - {name: xtrim, redis: {command: ["XTRIM", "st:s", "MAXLEN", "100"]}} - # ── Scripting (Lua) + functions ─────────────────────────────────────────── + # ── Scripting (Lua) ───────────────────────────────────────────────────────── + # keydb 6.x is Redis-6-based: FUNCTION (Redis 7.0 server-side functions) is not + # implemented, so only EVAL/SCRIPT are exercised here. - {name: eval, redis: {command: ["EVAL", "return redis.call('SET', KEYS[1], ARGV[1])", "1", "lua:k", "luaval"]}} - {name: eval-compute, redis: {command: ["EVAL", "local t=0 for i=1,100 do t=t+i end return t", "0"]}} - {name: script-load, redis: {command: ["SCRIPT", "LOAD", "return 1"]}} - - {name: function-list, redis: {command: ["FUNCTION", "LIST"]}} - - {name: function-stats,redis: {command: ["FUNCTION", "STATS"]}} # NOTE: MULTI/EXEC transactions and SUBSCRIBE/MONITOR/blocking ops are omitted — # bobctl's RESP client opens a fresh RESP2 connection per test, so multi-command