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

add HEALTHY column to modules list #2272

Open
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

Cortey
Copy link
Contributor

@Cortey Cortey commented Dec 4, 2024

Description

Changes proposed in this pull request:

  • add HEALTHY column

Related issue(s)

@kyma-bot kyma-bot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. cla: yes Indicates the PR's author has signed the CLA. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Dec 4, 2024
@kyma-bot kyma-bot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Dec 9, 2024
@halamix2 halamix2 changed the title wip1 add HEALTHY column to modules list Dec 9, 2024
@halamix2 halamix2 marked this pull request as ready for review December 9, 2024 09:28
@halamix2 halamix2 requested a review from a team as a code owner December 9, 2024 09:28
@kyma-bot kyma-bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Dec 9, 2024
@anoipm anoipm self-assigned this Dec 9, 2024
internal/modules/render_test.go Show resolved Hide resolved
internal/kube/fake/rootless.go Outdated Show resolved Hide resolved
@@ -87,7 +100,114 @@ func List(ctx context.Context, client kyma.Interface) (ModulesList, error) {
return modulesList, nil
}

func getInstallDetails(kyma *kyma.Kyma, releaseMetas kyma.ModuleReleaseMetaList, moduleName string) ModuleInstallDetails {
func getModuleDeploymentHealth(ctx context.Context, client kube.Client, moduleTemplate kyma.ModuleTemplate, kymaCR *kyma.Kyma) (Healthy, error) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Did you think about refactoring this method? It is now very complex (15 ifs inside) and hard to understand.

return HealthyUnknown, nil
}

func getResourceState(ctx context.Context, client kube.Client, apiVersion, kind, namespace, name string) (string, error) {
Copy link
Contributor

Choose a reason for hiding this comment

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

The same as before. IMO this method is too complex and is hard to read.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes Indicates the PR's author has signed the CLA. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants