Skip to content

add startup probe to valkey containers#68

Merged
sandeepkunusoth merged 2 commits into
valkey-io:mainfrom
ysqyang:startup-probe
Jan 31, 2026
Merged

add startup probe to valkey containers#68
sandeepkunusoth merged 2 commits into
valkey-io:mainfrom
ysqyang:startup-probe

Conversation

@ysqyang
Copy link
Copy Markdown
Contributor

@ysqyang ysqyang commented Jan 29, 2026

As titled. Without a startup probe, the existing liveness check can fail repeatedly and restart the container before Valkey finishes starting. This PR adds a startup probe that uses the existing liveness-check.sh with a longer failure budget (about 150s) to allow slow boots.

Comment thread internal/controller/scripts_test.go Outdated
})
}
}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Adding a comment that the script is run with a stubbed valkey-cli might be helpful

Copy link
Copy Markdown
Contributor Author

@ysqyang ysqyang Jan 31, 2026

Choose a reason for hiding this comment

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

done (line 293)

Comment on lines +295 to +296
script := []byte("#!/bin/sh\n" +
"echo \"${VALKEY_RESPONSE:-PONG}\"\n")
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

An alternative is

Suggested change
script := []byte("#!/bin/sh\n" +
"echo \"${VALKEY_RESPONSE:-PONG}\"\n")
script := `#!/bin/sh
echo "${VALKEY_RESPONSE:-PONG}"
`

and then []byte(script) below

yang.qiu added 2 commits January 31, 2026 15:36
Signed-off-by: yang.qiu <yang.qiu@reddit.com>
Signed-off-by: yang.qiu <yang.qiu@reddit.com>
@sandeepkunusoth sandeepkunusoth merged commit bf79b90 into valkey-io:main Jan 31, 2026
4 checks passed
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