Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{{- if .Values.finops.enabled }}
apiVersion: v1
data:
title: "Resources Usage"
title: "Cumulative Composition Cost Breakdown"
kind: ConfigMap
metadata:
name: composition-{{ .Release.Name }}-tabpane-finops-panel-row-1-column-2-panel
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,12 @@ spec:
type: chartline
app:
template:
xAxisName: ${ .metrics.status.xAxisName }
yAxisName: ${ .metrics.status.yAxisName }
legendName: ${ .metrics.status.legendName }
color: ${ .metrics.status.color }
data: ${ .metrics.status.data }
lines: ${ .costsbreakdown.status.lines }
xAxisName: ${ .costsbreakdown.status.xAxisName }
yAxisName: ${ .costsbreakdown.status.yAxisName }
api:
- name: metrics
path: "/call?apiVersion=templates.krateo.io%2Fv1&resource=restactions&name=composition-{{ .Release.Name }}-get-metrics&namespace={{ .Release.Namespace }}"
- name: costsbreakdown
path: "/call?apiVersion=templates.krateo.io%2Fv1&resource=restactions&name=composition-{{ .Release.Name }}-get-costs-breakdown&namespace={{ .Release.Namespace }}"
verb: GET
endpointRef:
name: snowplow-endpoint
Expand All @@ -25,26 +23,26 @@ spec:
apiVersion: templates.krateo.io/v1
kind: RESTAction
metadata:
name: composition-{{ .Release.Name }}-get-metrics
name: composition-{{ .Release.Name }}-get-costs-breakdown
spec:
api:
- name: getComposition
path: "/apis/{{ .Values.global.compositionApiVersion }}/namespaces/{{ .Release.Namespace }}/{{ .Values.global.compositionResource }}/{{ .Release.Name }}"
verb: GET
headers:
- 'Accept: application/json'
- name: metrics
- name: costsbreakdown
dependsOn:
name: getComposition
endpointRef:
name: finops-database-handler-endpoint
namespace: krateo-system
path: "/compute/metrics"
path: "/compute/costsbreakdown"
verb: POST
payload: |
${ {table_name: "{{ .Values.global.tableName }}_res", resource_name: .getComposition.spec.name, resource_group_name: .getComposition.spec.resourceGroupName } }
headers:
- 'Accept: application/json'
- 'Content-Type: application/json'
filter: .metrics
filter: .costsbreakdown
{{- end }}
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ spec:
type: paragraph
app:
template:
text: "The total utilization for the requested resources."
text: "The breakdown of the costs of the composition with cumulative lines."
{{- end }}