Add attribute 'mergePlugins' to devfile to manually enable/disable plugin
merging in the plugin broker. Default value when no property is present
is controlled by property che.workspace.plugin_broker.default_merge_plugins
Add a small note to the plugin broker images config lines in
che.properties to make it clear that the Che Operator overrides the
properties by default.
Signed-off-by: Angel Misevski <amisevsk@redhat.com>
* Shutdown Asynchronous Pod after some idle time
Signed-off-by: Vitalii Parfonov <vparfono@redhat.com>
Co-authored-by: Ilya Buziuk <ibuziuk@redhat.com>
* count workspace starts in debug mode
Signed-off-by: Michal Vala <mvala@redhat.com>
fix maven dependencies
Signed-off-by: Michal Vala <mvala@redhat.com>
observe debug mode metrics with events
Signed-off-by: Michal Vala <mvala@redhat.com>
change start attemts in debug mode metrics name, fix pom deps
Signed-off-by: Michal Vala <mvala@redhat.com>
rename start workspace in debug metrics with tags
Signed-off-by: Michal Vala <mvala@redhat.com>
* add options to workspace start event to be able to count debug starts
* remove no longer used logwatch meter binder, write hopefully proper metrics tags
Signed-off-by: Michal Vala <mvala@redhat.com>
* cleanup
Signed-off-by: Michal Vala <mvala@redhat.com>
* fix tags again
Signed-off-by: Michal Vala <mvala@redhat.com>
* grafana graph with workspace start attempts total and in debug
Signed-off-by: Michal Vala <mvala@redhat.com>
* fix tests
Signed-off-by: Michal Vala <mvala@redhat.com>
* fix grafana datasource
Signed-off-by: Michal Vala <mvala@redhat.com>
* set mins for workspace start attempts grafana graphs
Signed-off-by: Michal Vala <mvala@redhat.com>
* collect logs first
* very very rough log watching implementation, does not even work
Signed-off-by: Michal Vala <mvala@redhat.com>
* ok this should work
Signed-off-by: Michal Vala <mvala@redhat.com>
* cleanup
Signed-off-by: Michal Vala <mvala@redhat.com>
* format
Signed-off-by: Michal Vala <mvala@redhat.com>
* simplify, get rid of custom input stream
Signed-off-by: Michal Vala <mvala@redhat.com>
* format
Signed-off-by: Michal Vala <mvala@redhat.com>
* start watching for logs later, when we know the machines we're interested in
Signed-off-by: Michal Vala <mvala@redhat.com>
* make waiting for containers to get the logs rather time based
Signed-off-by: Michal Vala <mvala@redhat.com>
* block closing only when workspace failure, reusing kubernetes threadpool... can this thing get any better?
Signed-off-by: Michal Vala <mvala@redhat.com>
* just some refactoring and cleanup
Signed-off-by: Michal Vala <mvala@redhat.com>
* and format
Signed-off-by: Michal Vala <mvala@redhat.com>
* reading log input stream moved to LogWatcher and PodLongHandler is now responsible for handling just single log messages
Signed-off-by: Michal Vala <mvala@redhat.com>
* more precise checking for log error
Signed-off-by: Michal Vala <mvala@redhat.com>
* format
Signed-off-by: Michal Vala <mvala@redhat.com>
* make it possible to start the workspace in debug mode
Signed-off-by: Michal Vala <mvala@redhat.com>
* debug mode in devfile attributes
Signed-off-by: Michal Vala <mvala@redhat.com>
* get rid of inconsistent executor in KubernetesDeployments#watchLogs method
Signed-off-by: Michal Vala <mvala@redhat.com>
* log and javadoc fixes
Signed-off-by: Michal Vala <mvala@redhat.com>
* nullcheckcs for the devfile and fix tests
Signed-off-by: Michal Vala <mvala@redhat.com>
* better logs
Signed-off-by: Michal Vala <mvala@redhat.com>
* add few tests
Signed-off-by: Michal Vala <mvala@redhat.com>
* LogWatcher tests first batch
Signed-off-by: Michal Vala <mvala@redhat.com>
* remove unused imports
Signed-off-by: Michal Vala <mvala@redhat.com>
* bit reworked container logwatch
Signed-off-by: Michal Vala <mvala@redhat.com>
* fix missing license headers
Signed-off-by: Michal Vala <mvala@redhat.com>
* equals, hashCode and toString
Signed-off-by: Michal Vala <mvala@redhat.com>
* that's not probably needed
Signed-off-by: Michal Vala <mvala@redhat.com>
* review fixes, simplify code, better variable names
Signed-off-by: Michal Vala <mvala@redhat.com>
* we don't need distinct on Set
Signed-off-by: Michal Vala <mvala@redhat.com>
* add rest param to watch the workspace pod logs
Signed-off-by: Michal Vala <mvala@redhat.com>
* fix and add tests
Signed-off-by: Michal Vala <mvala@redhat.com>
* return when finish with watching logs
Signed-off-by: Michal Vala <mvala@redhat.com>
* test successful ended container log watch
Signed-off-by: Michal Vala <mvala@redhat.com>
* simplify
Signed-off-by: Michal Vala <mvala@redhat.com>
* comment up
Signed-off-by: Michal Vala <mvala@redhat.com>
* tests
Signed-off-by: Michal Vala <mvala@redhat.com>
* PodLogHandlerToEventPublisherTest
Signed-off-by: Michal Vala <mvala@redhat.com>
* make debug workspace start query param lowercase
Signed-off-by: Michal Vala <mvala@redhat.com>
* hold sharedpool object in namespace/project factories
Signed-off-by: Michal Vala <mvala@redhat.com>
* watch plugin broker logs
Signed-off-by: Michal Vala <mvala@redhat.com>
* synchroinze closing and adding container log watchers, wait before close on error
Signed-off-by: Michal Vala <mvala@redhat.com>
* synchronize new logwatch with closing
Signed-off-by: Michal Vala <mvala@redhat.com>
* add missing license header
Signed-off-by: Michal Vala <mvala@redhat.com>
* fix logwatch close test
Signed-off-by: Michal Vala <mvala@redhat.com>
* get startOptions down to broker deploy to tell wether we want to watch the logs
Signed-off-by: Michal Vala <mvala@redhat.com>
* Update infrastructures/kubernetes/src/main/java/org/eclipse/che/workspace/infrastructure/kubernetes/namespace/KubernetesDeployments.java
Co-Authored-By: Angel Misevski <amisevsk@redhat.com>
* Update infrastructures/kubernetes/src/main/java/org/eclipse/che/workspace/infrastructure/kubernetes/namespace/log/LogWatcher.java
Co-Authored-By: Angel Misevski <amisevsk@redhat.com>
* review fixes
Signed-off-by: Michal Vala <mvala@redhat.com>
* aaand format
Signed-off-by: Michal Vala <mvala@redhat.com>
* timeoutes to constants
Signed-off-by: Michal Vala <mvala@redhat.com>
* remove unnecessary AtomiBoolean, synchronize creating LogWatch, and few more review fixes
Signed-off-by: Michal Vala <mvala@redhat.com>
* limit log inputstream size to be safe
Signed-off-by: Michal Vala <mvala@redhat.com>
* remove logwatch TODO, which is fixed now
Signed-off-by: Michal Vala <mvala@redhat.com>
* don't need AtomicBoolean, extra options isEmpty check, some javadoc
Signed-off-by: Michal Vala <mvala@redhat.com>
Co-authored-by: Angel Misevski <amisevsk@redhat.com>
Enrich `RuntimeIdentity` with `infrastructureNamespace` property so that it can be used by the namespace/project factories to create/obtain appropriate namespaces for the workspaces and make use of it throughout the workspace provisioning.
Add an explicit query parameter to assign a workspace to a specific namespace, if possible, at workspace creation time.
Load the workspace during then namespace resolution so that we can check
for the attribute stored in the workspace attributes.
Switch the default namespace to `<username>-che`.
Update the property descriptions in che.properties and use the new
CHE_INFRA_KUBERNETES_NAMESPACE_DEFAULT in the helm chart.
Move the delete to the KubernetesNamespace/OpenShiftProject to
concentrate the handling in one place.
Split the isNamespaceStatic() (previously called isPredefined()) into
isCreatingNamespaces() and isManagingNamespaces() to separately capture
the two usecases in which that single method was previously incorrectly
called. Also make these methods workspace-specific to be able to
consistently work with the legacy logic across all methods.
Signed-off-by: Lukas Krejci <lkrejci@redhat.com>