diff --git a/cost-analyzer/templates/cost-analyzer-frontend-config-map-template.yaml b/cost-analyzer/templates/cost-analyzer-frontend-config-map-template.yaml index c30f361a3..18f748461 100755 --- a/cost-analyzer/templates/cost-analyzer-frontend-config-map-template.yaml +++ b/cost-analyzer/templates/cost-analyzer-frontend-config-map-template.yaml @@ -987,12 +987,40 @@ data: proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; } location = /model/debug/orchestrator { + {{ if .Values.kubecostFrontend.orchestratorEnabled }} proxy_read_timeout {{ .Values.kubecostFrontend.timeoutSeconds | default 300 }}; proxy_pass http://aggregator/debug/orchestrator; proxy_redirect off; proxy_set_header Connection ""; proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + {{ else }} + default_type 'application/json'; + add_header 'Access-Control-Allow-Origin' '*' always; + add_header 'Access-Control-Allow-Methods' 'GET, PUT, POST, DELETE, OPTIONS' always; + return 200 '{ + "fsmCurrent": "orchestrator-disabled", + "dbReadMemLimit": "", + "readDBPath": "/var/configs/waterfowl/duckdb/v0_10_3/kubecost-1718644669.duckdb.read", + "writeDBPath": "/var/configs/waterfowl/duckdb/v0_10_3/kubecost.duckdb.write", + "dbCopyFilePath": "/var/configs/waterfowl/duckdb/v0_10_3/kubecost.duckdb.copy", + "currentBucketRefreshInterval": "orchestrator-disabled", + "bootCyclesCompleted": 4, + "initialCompletionPercentage": 0, + "initialSetupStage": 1, + "initialSetupLabel": "stable", + "ingestedDurationHours": 0, + "ingestedGiB": 0, + "ingestedGiBPerHour": 0, + "pendingGiB": 0, + "estimatedIngestionHoursRemaining": 0, + "storageStats": { + "totalInMiB": 999.999, + "usedInMiB": 999.999, + "freeInMiB": 999.999, + "usedPercent": 0.0 } + }'; + {{ end }} } location = /model/prediction/speccost { proxy_read_timeout {{ .Values.kubecostFrontend.timeoutSeconds | default 300 }}; diff --git a/cost-analyzer/values.yaml b/cost-analyzer/values.yaml index ff8b76557..2b95ff406 100644 --- a/cost-analyzer/values.yaml +++ b/cost-analyzer/values.yaml @@ -459,6 +459,8 @@ kubecostFrontend: # 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. + orchestratorEnabled: true # controls the green progress bar on the frontend. This option is experimental and should not be used without Kubecost support. + # set to true to set all upstreams to use ..svc.cluster.local instead of just . useDefaultFqdn: false # api: