-
Notifications
You must be signed in to change notification settings - Fork 269
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
Include nextcloud service in trusted domains for metrics exporter #483
Conversation
When nextcloud-exporter is used by enabling metrics, it fails to fetch the serverinfo with 400 response code. This is related to the switch from ingress to local service endpoint for nextcloud-exporter. To fix this, in addition to .Values.nextcloud.host, the nextcloud service also need to be included in the trusted domains. Signed-off-by: Sunny <[email protected]>
Thanks for submitting this! I've approved the workflow run, but do not have time to test this further, so I will add some other PR reviewers :) |
Signed-off-by: JesseBot <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you need to set the complete domain, since that was merged:
#505
(or we should use a public domain here).
so accept my suggestion it could be merged:
Here's a quick fix for those (like me) that can't wait for the chart to be fixed. This file's values will override those in config/config.php. nextcloud:
configs: # I've taken the standard trusted domains and added one that's necessary for the exporter to work
trusted-domains.config.php: |-
<?php
$CONFIG = [
'trusted_domains' =>
array (
0 => 'localhost',
1 => 'nextcloud.example.com',
2 => 'nextcloud.nextcloud.svc.cluster.local'
),
];
?> |
…e and fix spacing for trusted domains Co-authored-by: WrenIX <[email protected]> Signed-off-by: JesseBot <[email protected]>
Signed-off-by: JesseBot <[email protected]>
…xtcloud#483) * Include service in trusted domains for metrics When nextcloud-exporter is used by enabling metrics, it fails to fetch the serverinfo with 400 response code. This is related to the switch from ingress to local service endpoint for nextcloud-exporter. To fix this, in addition to .Values.nextcloud.host, the nextcloud service also need to be included in the trusted domains. Signed-off-by: Sunny <[email protected]> * Update charts/nextcloud/templates/_helpers.tpl - use full service name and fix spacing for trusted domains Co-authored-by: WrenIX <[email protected]> Signed-off-by: JesseBot <[email protected]> --------- Signed-off-by: Sunny <[email protected]> Signed-off-by: JesseBot <[email protected]> Co-authored-by: JesseBot <[email protected]> Co-authored-by: WrenIX <[email protected]> Signed-off-by: switzerchees <[email protected]>
…xtcloud#483) * Include service in trusted domains for metrics When nextcloud-exporter is used by enabling metrics, it fails to fetch the serverinfo with 400 response code. This is related to the switch from ingress to local service endpoint for nextcloud-exporter. To fix this, in addition to .Values.nextcloud.host, the nextcloud service also need to be included in the trusted domains. Signed-off-by: Sunny <[email protected]> * Update charts/nextcloud/templates/_helpers.tpl - use full service name and fix spacing for trusted domains Co-authored-by: WrenIX <[email protected]> Signed-off-by: JesseBot <[email protected]> --------- Signed-off-by: Sunny <[email protected]> Signed-off-by: JesseBot <[email protected]> Co-authored-by: JesseBot <[email protected]> Co-authored-by: WrenIX <[email protected]>
Pull Request
Description of the change
When nextcloud-exporter is used by enabling metrics, it fails to fetch the serverinfo with 400 response code.
nextcloud-exporter log
level=error msg="Error during scrape: unexpected status code: 400"
nextcloud log
10.244.0.38 - admin [24/Nov/2023:22:34:50 +0000] "GET /ocs/v2.php/apps/serverinfo/api/v1/info?format=json HTTP/1.1" 400 11344 "-" "nextcloud-exporter/0.6.1"
This is related to the switch from ingress to local service endpoint for nextcloud-exporter in #388.
To fix this, in addition to
.Values.nextcloud.host
, the nextcloud service also needs to be included in the trusted domains.In config/config.php
where
nextcloud
is the service name.This solution is based on xperimental/nextcloud-exporter#14 , an upstream issue for the same problem.
Benefits
The nextcloud-exporter will be able to fetch and export the metrics properly.
Possible drawbacks
None
Applicable issues
None
Additional information
Without this, the metrics exporter exported metrics about itself only:
Once the issue is fixed, it exports all the nextcloud app metrics:
Checklist
Chart.yaml
according to semver.