rancher / prometheus-federator

Apache License 2.0
9 stars 21 forks source link

Fix nginx.conf URL for local cluster #65

Closed stormqueen1990 closed 1 year ago

stormqueen1990 commented 1 year ago

Related Issue: rancher/rancher#41036

Changes

Update the Grafana nginx-config.yaml condition for rendering the URL prefixed with /k8s/clusters from

(empty .Values.global.cattle.clusterId)

to

or (eq .Values.global.cattle.clusterId "local") (empty .Values.global.cattle.clusterId)

and invert the blocks for if/else in that same condition.

Reason: right now the cluster ID is being passed into the chart even when the cluster is local, and that is breaking the Grafana UI from rendering correctly, giving the user an HTTP 404.

Checklist

Please fill out this table to identify which fields need to be modified in your PR.

Under Status, either indicate Does Not Apply or Added to this PR.

Version to be incremented Why should this be modified? Status
version in rancher-project-monitoring package.yaml You modified the contents of the rancher-project-monitoring chart to make changes Added to this PR
helmProjectOperator.image.tag in prometheus-federator values.yaml Either you modified the rancher-project-monitoring chart or you modified the main.go file Does not apply
appVersion in prometheus-federator Chart.yaml You modified the helmProjectOperator.image.tag in the above box Does not apply
version in prometheus-federator Chart.yaml Either you modified the appVersion in the above box or you modified the contents of the prometheus-federator chart to make changes Does not apply
erSitzt commented 9 months ago

@stormqueen1990 even though this is closed, i think this change broke fleet and/or helm cli deployments. because those values are only set automatically in the UI when installing the monitoring chart ?

Is there any other use case where someone would want to manually set the clusterId via values.yaml ? Before there was just a wildcard in the nginx.conf if i remember correctly.. is there any other way to make this work, without having to know the clusterId beforehand ?

alexandreLamarre commented 9 months ago

@erSitzt We do not generally support helm cli installations for packages distributed via rancher/charts since the UI does additional validation and variable injection. In this case you would need to know the clusterId beforehand

erSitzt commented 9 months ago

But you do support and promote usage of fleet, don't you? How is this helping any GitOps use case if I need to specify the clusterId beforehand? @alexandreLamarre

erSitzt commented 9 months ago

@alexandreLamarre https://github.com/rancher/fleet-examples/blob/master/single-cluster/helm-multi-chart/rancher-monitoring/fleet.yaml