timescale / helm-charts

Configuration and Documentation to run TimescaleDB in your Kubernetes cluster
Apache License 2.0
264 stars 223 forks source link

Added possibility to enable thanos StoreAPI port #458

Closed kadaffy closed 2 years ago

kadaffy commented 2 years ago

Currently only ports 9201 and 9202 are enabled and it is not possible to enable a port with the helm chart to use the Thanos StoreAPI according to the configuration in https://github.com/timescale/promscale/blob/master/docs/configuration.md using the param thanos.store-api.server-address.

I added the port configuration in the values.yaml and updated the deployment and service template, by default port will be set on false.

I already performed some test configuring the Thanos StoreAPI with:

config:
  thanos.store-api.server-address: ":9203"

service:
  thanosStoreAPI:
    enabled: true
    port: 9203

then checking the logs:

level=info ts=2022-09-19T16:22:29.822Z caller=runner.go:162 msg="Started Rule-Manager"
level=info ts=2022-09-19T16:22:29.822Z caller=runner.go:266 msg="Started Prometheus remote-storage HTTP server" listening-port=:9201
level=info ts=2022-09-19T16:22:29.822Z caller=rules.go:209 msg="Starting rule manager..."
level=info ts=2022-09-19T16:22:29.822Z caller=runner.go:247 msg="Started OpenTelemetry OTLP GRPC server" listening-port=:9202
level=info ts=2022-09-19T16:22:29.822Z caller=runner.go:204 msg="Started Thanos StoreAPI GRPC server" listening-port=:9203

Thanos StoreAPI is enabled and using the new configuration the service enabled the port to access the API.

service:

NAME               TYPE        CLUSTER-IP    EXTERNAL-IP   PORT(S)                      AGE
test-promscale     ClusterIP   10.96.15.61   <none>        9201/TCP,9202/TCP,9203/TCP   41s

Then Thanos query is able to connect to promscale.

Signed-off-by: Kadaffy Talavera kadaffy@ongres.com

What this PR does / why we need it

Currently only ports 9201 and 9202 are enabled and it is not possible to enable a port using the helm chart to use the Thanos StoreAPI according to the configuration in https://github.com/timescale/promscale/blob/master/docs/configuration.md using the param thanos.store-api.server-address.

This PR adds the possibility to enable a port to use the Thanos StoreAPI

Which issue this PR fixes

(optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close that issue when PR gets merged)

Special notes for your reviewer

Checklist

nhudson commented 2 years ago

@kadaffy if you can run make promscale-mixin and check in that change as well I think that will fix the CI failure.

kadaffy commented 2 years ago

It works @nhudson thanks for the help.

kadaffy commented 2 years ago

Done @nhudson, thanks.