Skip to content

Commit

Permalink
hideDiagnostics / hideOrphanedResources (#2739)
Browse files Browse the repository at this point in the history
* hideDiagnostics / hideOrphanedResources
  • Loading branch information
jessegoodier authored Nov 8, 2023
1 parent 4168152 commit 42a0d72
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -612,15 +612,23 @@ data:
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
{{- end }}

location = /model/hideOrphanedResources {
default_type 'application/json';
{{- if .Values.kubecostFrontend.hideOrphanedResources }}
return 200 '{"hideOrphanedResources": "true"}';
{{- else }}
return 200 '{"hideOrphanedResources": "false"}';
{{- end }}
}
location = /model/hideDiagnostics {
default_type text/html;
default_type 'application/json';
{{- if .Values.kubecostFrontend.hideDiagnostics }}
return 200 'true';
return 200 '{"hideDiagnostics": "true"}';
{{- else }}
return 200 'false';
return 200 '{"hideDiagnostics": "false"}';
{{- end }}
}

{{- if .Values.kubecostAggregator.cloudCost.enabled }}
location = /model/cloudCost/status {
proxy_read_timeout 300;
Expand Down
4 changes: 2 additions & 2 deletions cost-analyzer/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -361,8 +361,8 @@ kubecostFrontend:
# proxy_buffers 4 512k;
# proxy_buffer_size 256k;
# large_client_header_buffers 4 64k;
# hideDiagnostics: false # used if the primary is not monitored. Supported in limited environments.

# hideDiagnostics: false # useful if the primary is not monitored. Supported in limited environments.
# hideOrphanedResources: false # OrphanedResources works on the primary-cluster's cloud-provider only.
# api:
# fqdn: kubecost-api.kubecost.svc.cluster.local:9001
# model:
Expand Down

0 comments on commit 42a0d72

Please sign in to comment.