Skip to content

Commit

Permalink
Make Prometheus in revtr-sidecar listen on a cluster-local address (#906
Browse files Browse the repository at this point in the history
)

* Makes revtr-sidecar Prom listen on private cluster address

* Temporarily removes PRIVATE_IP from prometheus.port flag

The flag name is literal, and expects only an int. I've left the PRIVATE_IP env
variable, but removed it from the flag. I submitted a PR to the revtr-sidecar
repository to address this:

NEU-SNS/revtr-sidecar#8

Once that PR is merged, assuming it does get merged, then I will update this
again to specify a full address instead of just a port.

* Updates revtr-sidecar to v1.4.2

This includes an update to revtr-sidecar which changes the flag
-prometheus.port to -prometheus.addr, and allows us to cause Prometheus to
listen on a cluster-local address instead of a public interface.
  • Loading branch information
nkinkade authored Sep 25, 2024
1 parent 64c276f commit b41af7c
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions k8s/daemonsets/templates.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -608,17 +608,25 @@ local UUIDAnnotator(expName, tcpPort, hostNetwork) = [
local Revtr(expName, tcpPort) = [
{
name: 'revtr-sidecar',
image: 'measurementlab/revtr-sidecar:v1.4.1',
image: 'measurementlab/revtr-sidecar:v1.4.2',
args: [
'-tcpinfo.eventsocket=' + tcpinfoServiceVolume.socketFilename,
'-revtr.hostname=revtr.ccs.neu.edu',
'-revtr.grpcPort=9999',
'-prometheus.port='+tcpPort,
'-prometheus.addr=$(PRIVATE_IP):'+tcpPort,
'-revtr.sampling=4', // 100/x == 25%
'-revtr.APIKey=$(REVTR_APIKEY)',
'-loglevel=debug',
],
env: [
{
name: 'PRIVATE_IP',
valueFrom: {
fieldRef: {
fieldPath: 'status.podIP',
},
},
},
{
name: 'REVTR_APIKEY',
valueFrom: {
Expand Down

0 comments on commit b41af7c

Please sign in to comment.