We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7b9b59a commit e872266Copy full SHA for e872266
pkg/kubernetes/openshift.go
@@ -7,11 +7,13 @@ import (
7
)
8
9
func (k *Kubernetes) IsOpenShift(ctx context.Context) bool {
10
+ // This method should be fast and not block (it's called at startup)
11
+ timeoutSeconds := int64(5)
12
if _, err := k.dynamicClient.Resource(schema.GroupVersionResource{
13
Group: "project.openshift.io",
14
Version: "v1",
15
Resource: "projects",
- }).List(ctx, metav1.ListOptions{Limit: 1}); err == nil {
16
+ }).List(ctx, metav1.ListOptions{Limit: 1, TimeoutSeconds: &timeoutSeconds}); err == nil {
17
return true
18
}
19
return false
0 commit comments