Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Readiness Endpoint support #2183

Merged
merged 4 commits into from
Jun 25, 2024
Merged

Conversation

dvaldivia
Copy link
Collaborator

@dvaldivia dvaldivia commented Jun 25, 2024

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
Copy link
Contributor

cniackz commented Jun 25, 2024

gofumpt it please

@pjuarezd
Copy link
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

Copy link
Contributor

@cesnietor cesnietor left a comment

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
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
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
Collaborator Author

all lint problems taken care of @cesnietor @pjuarezd

pjuarezd
pjuarezd previously approved these changes Jun 25, 2024
Copy link
Member

@pjuarezd pjuarezd left a comment

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
@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
12 checks passed
@djwfyi djwfyi mentioned this pull request Jul 18, 2024
13 tasks
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.

4 participants