File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
java-components/cache/src/main/java/com/redhat/hacbs/artifactcache/artifactwatch Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change 8
8
import javax .inject .Inject ;
9
9
10
10
import org .apache .http .client .utils .DateUtils ;
11
+ import org .eclipse .microprofile .config .inject .ConfigProperty ;
11
12
12
13
import com .redhat .hacbs .artifactcache .services .StorageManager ;
13
14
import com .redhat .hacbs .resources .model .v1alpha1 .ModelConstants ;
@@ -33,9 +34,12 @@ public class CacheControl {
33
34
KubernetesClient client ;
34
35
SharedIndexInformer <GenericKubernetesResource > informer ;
35
36
37
+ @ ConfigProperty (name = "kube.disabled" , defaultValue = "false" )
38
+ boolean disabled ;
39
+
36
40
@ PostConstruct
37
41
void setup () {
38
- if (LaunchMode .current () == LaunchMode .TEST ) {
42
+ if (LaunchMode .current () == LaunchMode .TEST || disabled ) {
39
43
//don't start in tests, as kube might not be present
40
44
return ;
41
45
}
You can’t perform that action at this time.
0 commit comments