-
Task
-
Resolution: Unresolved
-
Minor
-
None
-
None
-
None
-
False
-
-
False
-
-
-
0
This is a followup to ROX-28698. While working on that ticket, we noticed that there are two env variables in `pkg/env/sensor.go` that are used to communicate Sensor host address to other services. Those are:
// AdvertisedEndpoint is used to provide the Sensor with the endpoint it // should advertise to services that need to contact it, within its own cluster. AdvertisedEndpoint = RegisterSetting("ROX_ADVERTISED_ENDPOINT", WithDefault("sensor.stackrox.svc:443"), StripAnyPrefix("https://", "http://")) // SensorEndpoint is used to communicate the sensor endpoint to other services in the same cluster. SensorEndpoint = RegisterSetting("ROX_SENSOR_ENDPOINT", WithDefault("sensor.stackrox.svc:443"))
There is no need to have two variables that do the same thing - the `StripAnyPrefix` has been added in ROX-28698 to add basic input sanitization to this var. This task is about unifying them - pick one and make sure that it is used correctly.
Extras:
- Those vars exist because we are not always able to reliably determine the namespace in which Sensor is deployed. Find a way to reliably derive the namespace of Sensor, so that we can get rid of both of those env vars.
- clones
-
ROX-28698 Node Indexing is broken when Sensor is not in stackrox namespace
-
- Closed
-