Comments (5)
Here's some info I put elsewhere for another reason, but which I just had the thought could be very relevant here as well:
https://github.com/cryostatio/cryostat/issues/990#issuecomment-1613364915
tl;dr "Common Expression Language" looks like it would be a good syntax for describing smart triggers, and this looks a lot like the JavaScript-based matchExpressions already used by the Cryostat server for Automated Rules and Stored Credentials. This could be used with either Idea 1 or Idea 2 from the original issue I filed here. For Idea 2 I think it is relatively straightforward, an expression or list of expression strings would be passed as part of the Java command line and would become arguments to the agentmain
. For Idea 2, the expressions could be provided as the value of a SmallRye Config property, or perhaps a series of properties with a common key format so that multiple expressions can be provided. For the follow-up about using a mounted ConfigMap, this still slots in well, since these CEL expressions can be easily embedded into ex. a YAML document that backs a ConfigMap.
from cryostat-agent.
The idea of using a configuration file for this purpose could also fit with simply defining an optional path to such a file via SmallRye Config property.
In a containers/k8s/OpenShift story, this could be supplied by a ConfigMap:
https://kubernetes.io/docs/tasks/configure-pod-container/configure-pod-configmap/
The ConfigMap can be mounted as a file in the container, and a config property used to tell the agent to load that file to figure out what triggers it should set up.
This same technique can already be used to override the agent's own default microprofile-config.properties
, so this idea does also slot in with Idea 1 above in that sense.
If the trigger definition syntax can be expressed in terms of environment variables then the user can either perform this configuration by environment variable or by ConfigMap and embedding the trigger configuration into the existing .properties
.
If the trigger syntax cannot be expressed as environment variables or otherwise does not work well with SmallRye Config properties, then a separate config file (ex. ConfigMap) defined in some other format such as JSON/YAML could be used.
from cryostat-agent.
from cryostat-agent.
Sounds like a good approach to me, I'll do some reading/look into it!
from cryostat-agent.
Done in #197
from cryostat-agent.
Related Issues (20)
- [Bug] Shaded JAR Manifest includes `Class-Path` entry
- [Bug] Agent cannot accept `ALL` event template in recording start requests HOT 1
- [Question] Drop Dagger DI? HOT 4
- [Bug] Agent loses registration with server, does not re-attempt HOT 1
- [Task] Publish to Maven Central
- [Task] Basic auth user should be configurable
- [Bug] Use SSLContext with TLS v1.2 or v1.3
- [Request] Audit log levels and ensure appropriate level is selected
- [Epic] Kubernetes/OpenShift awareness
- [Task] detect default service account token and try to present this for Cryostat authorization, if nothing else specified
- [Bug] Harvester-created snapshots are left behind if they are empty when created
- [Request] Shut down Agent without exiting host JVM
- [Bug] Host part of dual-registration URLs can differ
- [Request] Periodically re-read from mounted k8s serviceaccount token file
- [Bug] CI action fails to start
- [CI] Push snapshots on every merge, not only on release HOT 1
- [Task] Add option for users to import whole truststore instead of certs HOT 4
- [Request] Configuration to grab env vars/system properties and include in registration target node labels/annotations
- [Bug] Agent HTTP client improperly closes HTTP response body streams
- [Bug] When loaded via WildFly `MODULE_OPTS`, the default configuration properties are unset
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cryostat-agent.