-
Notifications
You must be signed in to change notification settings - Fork 4
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
Add the package util-linux to the base image #796
Comments
And could you please explain to me the exact chain of how logs have been moved? I don't fully understand it yet. |
The logs of OPA are written as JSON into the log volume at ---
apiVersion: opa.stackable.tech/v1alpha1
kind: OpaCluster
spec:
servers:
podOverrides:
spec:
containers:
- name: syslog
image: <image containing the logger command>
command:
- /bin/sh
- -c
args:
- >-
tail
--follow=name
--retry
/stackable/log/opa/current
| grep '"logger"\s*:\s*"decision"'
| logger
--udp
--server syslog-udp.siem.svc.cluster.local
--port 5410
--size 4096
--priority authpriv.info
--rfc5424
volumeMounts:
- mountPath: /stackable/log
name: log Actually, the OPA image was used for the sidecar container. This worked until we started to remove packages from all images to reduce the number of CVEs. This made the images more secure but also made it more uncomfortable to customize the deployment. With re-adding |
Sometimes it is necessary to override the command of a stacklet with a custom script, or it is convenient to use the Stackable image for a custom Job. This is easier if more "standard" tools are installed, e.g. the
util-linux
package.In a concrete case, a customer wanted a side-car container in the OPA pod which forwards the decision logs to a SIEM tool via syslog. A proper solution would be to configure the Vector aggregator accordingly, but on the one hand, the extra step with the aggregator was not desired, and on the other hand, Vector does not yet support syslog sinks (vectordev/vector#6863). So the implemented solution was to use the
logger
command to forward these logs. Unfortunately, this command is not available in the OPA image because theutil-linux
package is not installed. Therefore, a custom image had to be built.Suggested change:
The text was updated successfully, but these errors were encountered: