Skip to content
This repository was archived by the owner on Mar 20, 2026. It is now read-only.

Readiness Endpoint support - #2183

Merged
dvaldivia merged 4 commits into
minio:masterfrom
dvaldivia:readiness-probe
Jun 25, 2024
Merged

dvaldivia merged 4 commits into
minio:masterfrom
dvaldivia:readiness-probe

Conversation

@dvaldivia

@dvaldivia dvaldivia commented Jun 25, 2024 •

Copy link
Copy Markdown
Collaborator

This PR introduces a readiness endpoint for the MinIO Tenant via the sidecar container. This endpoint is used to check
if the MinIO Tenant is ready to serve requests. The readiness endpoint is exposed at the /ready path.

The intention is to prevent kubernetes from routing traffic to a MinIO pod if it's not ready, while allowing MinIO pods
to talk to each other via the headless service with the publishNotReady flag set to true.

If MinIO returns 403 status, we deem that MinIO ready to receive traffic

This also removes MINIO_OPERATOR_VERSION to prevent rolling restarts on operator upgrades

With this change pods that are not "online" should not shown as ready

Screenshot 2024-06-25 at 9 50 49 AM

Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
@dvaldivia dvaldivia self-assigned this Jun 25, 2024
@dvaldivia
dvaldivia requested a review from jiuker June 25, 2024 18:43
cniackz
cniackz previously approved these changes Jun 25, 2024
@cniackz

cniackz commented Jun 25, 2024

Copy link
Copy Markdown
Contributor

gofumpt it please

@pjuarezd

Copy link
Copy Markdown
Member

Linting is complaining

Running lint check
level=warning msg="[linters_context] running gomodguard failed: unable to parse module file go.mod: go.mod:3: invalid go version '1.22.0': must match format 1.23\ngo.mod:5: unknown directive: toolchain: if you are not using go modules it is suggested to disable this linter"
pkg/resources/statefulsets/minio-statefulset.go:19: File is not `gofumpt`-ed (gofumpt)
	"k8s.io/apimachinery/pkg/util/intstr"
pkg/resources/statefulsets/minio-statefulset.go:23: File is not `gofumpt`-ed (gofumpt)
	"strings"
pkg/resources/statefulsets/minio-statefulset.go:909: File is not `gofumpt`-ed (gofumpt)

pkg/resources/statefulsets/minio-statefulset.go:24: File is not `goimports`-ed (goimports)

make: *** [Makefile:50: lint] Error 1

@cesnietor cesnietor left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

evel=warning msg="[linters_context] running gomodguard failed: unable to parse module file go.mod: go.mod:3: invalid go version '1.22.0': must match format 1.23\ngo.mod:5: unknown directive: toolchain: if you are not using go modules it is suggested to disable this linter"

@dvaldivia

Copy link
Copy Markdown
Collaborator Author

@cesnietor I don't think that is an error, it's simply a warning

Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
@pjuarezd

Copy link
Copy Markdown
Member

Sidecar is still complaining on the import

level=warning msg="[linters_context] running gomodguard failed: unable to parse module file go.mod: go.mod:3: invalid go version '1.22.0': must match format 1.23\ngo.mod:5: unknown directive: toolchain: if you are not using go modules it is suggested to disable this linter"
Error: pkg/common/generate_config.go:29:1: exported: exported function AttachGeneratedConfig should have comment or be unexported (revive)
func AttachGeneratedConfig(tenant *miniov2.Tenant, fileContents string) string {
^
make: *** [Makefile:50: lint] Error 1
Error: Process completed with exit code 2.

@dvaldivia

Copy link
Copy Markdown
Collaborator Author

all lint problems taken care of @cesnietor @pjuarezd

pjuarezd
pjuarezd previously approved these changes Jun 25, 2024

@pjuarezd pjuarezd left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Could you add this feature to the V6.0 release notes in pr #2141 ?

cesnietor
cesnietor previously approved these changes Jun 25, 2024
Comment thread pkg/controller/upgrades.go Resolved
@dvaldivia
dvaldivia dismissed stale reviews from cesnietor and pjuarezd via 5b1a996 June 25, 2024 22:54
Co-authored-by: Cesar N. <11819101+cesnietor@users.noreply.github.com>
@dvaldivia
dvaldivia merged commit cb96689 into minio:master Jun 25, 2024
@djwfyi djwfyi mentioned this pull request Jul 18, 2024
10 of 13 tasks
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants