-
Notifications
You must be signed in to change notification settings - Fork 139
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
Check and show health state of K8s Namespace resource #2828
Conversation
The following files are not gofmt-ed. By commenting pkg/app/piped/cloudprovider/kubernetes/state.go--- pkg/app/piped/cloudprovider/kubernetes/state.go.orig
+++ pkg/app/piped/cloudprovider/kubernetes/state.go
@@ -560,15 +560,15 @@
status = model.KubernetesResourceState_HEALTHY
var cond *corev1.NamespaceCondition
- L:
- for i := range ns.Status.Conditions {
- c := ns.Status.Conditions[i]
- switch c.Type {
- case corev1.NamespaceDeletionDiscoveryFailure, corev1.NamespaceDeletionContentFailure, corev1.NamespaceDeletionGVParsingFailure:
- cond = &c
- break L
- }
+L:
+ for i := range ns.Status.Conditions {
+ c := ns.Status.Conditions[i]
+ switch c.Type {
+ case corev1.NamespaceDeletionDiscoveryFailure, corev1.NamespaceDeletionContentFailure, corev1.NamespaceDeletionGVParsingFailure:
+ cond = &c
+ break L
}
+ }
if cond != nil && cond.Status == corev1.ConditionTrue {
status = model.KubernetesResourceState_OTHER
|
The golinter build is completed with FAILURE. The build will be triggered again when you push any other commits. Or you can trigger it manually by You can check the build log from here. |
Code coverage for golang is
|
The golinter build is completed with FAILURE. The build will be triggered again when you push any other commits. Or you can trigger it manually by You can check the build log from here. |
The golinter build is completed with FAILURE. The build will be triggered again when you push any other commits. Or you can trigger it manually by You can check the build log from here. |
Code coverage for golang is
|
Code coverage for golang is
|
Just left the last nit. |
Co-authored-by: Le Van Nghia <nghialv2607@gmail.com>
Code coverage for golang is
|
/lgtm |
Way to go! |
What this PR does / why we need it:
Which issue(s) this PR fixes:
Fixes #1610
Does this PR introduce a user-facing change?: