Skip to content

Commit c5902bb

Browse files
committed
[SRVKS-885] Add cost management integration docs
1 parent 240db73 commit c5902bb

File tree

3 files changed

+53
-0
lines changed

3 files changed

+53
-0
lines changed

_topic_maps/_topic_map.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3616,5 +3616,7 @@ Topics:
36163616
- Name: Integrations
36173617
Dir: integrations
36183618
Topics:
3619+
- Name: Integrating Serverless with the cost management service
3620+
File: serverless-cost-management-integration
36193621
- Name: Using NVIDIA GPU resources with serverless applications
36203622
File: gpu-resources
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * /serverless/integrations/serverless-cost-management-integration.adoc
4+
5+
:_content-type: REFERENCE
6+
[id="serverless-cost-management-labels_{context}"]
7+
= Using labels for cost management queries
8+
9+
Labels, also known as _tags_ in cost management, can be applied for nodes, namespaces or pods. Each label is a key and value pair. You can use a combination of multiple labels to generate reports. You can access reports about costs by using the link:https://console.redhat.com/openshift/cost-management/[Red Hat hybrid console].
10+
11+
Labels are inherited from nodes to namespaces, and from namespaces to pods. However, labels are not overridden if they already exist on a resource. For example, Knative services have a default `app=<revision_name>` label:
12+
13+
.Example Knative service default label
14+
[source,yaml]
15+
----
16+
apiVersion: serving.knative.dev/v1
17+
kind: Service
18+
metadata:
19+
name: example-service
20+
spec:
21+
...
22+
labels:
23+
app: <revision_name>
24+
...
25+
----
26+
27+
If you define a label for a namespace, such as `app=my-domain`, the cost management service does not take into account costs coming from a Knative service with the tag `app=<revision_name>` when querying the application using the `app=my-domain` tag. Costs for Knative services that have this tag must be queried under the `app=<revision_name>` tag.
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
:_content-type: ASSEMBLY
2+
[id="serverless-cost-management-integration"]
3+
= Integrating {ServerlessProductShortName} with the cost management service
4+
include::_attributes/common-attributes.adoc[]
5+
:context: serverless-cost-management-integration
6+
7+
toc::[]
8+
9+
link:https://access.redhat.com/documentation/en-us/cost_management_service/2022/html/getting_started_with_cost_management/assembly-introduction-cost-management#about-cost-management_getting-started[Cost management] is an {product-title} service that enables you to better understand and track costs for clouds and containers. It is based on the open source link:https://project-koku.github.io/[Koku] project.
10+
11+
[id="prerequisites_serverless-cost-management-integration"]
12+
== Prerequisites
13+
14+
* You have cluster administrator permissions.
15+
16+
* You have set up cost management and added an link:https://access.redhat.com/documentation/en-us/cost_management_service/2022/html/adding_an_openshift_container_platform_source_to_cost_management/index[{product-title} source].
17+
18+
include::modules/serverless-cost-management-labels.adoc[leveloffset=+1]
19+
20+
[role="_additional-resources"]
21+
[id="additional-resources_serverless-cost-management-integration"]
22+
== Additional resources
23+
* link:https://access.redhat.com/documentation/en-us/cost_management_service/2022/html/getting_started_with_cost_management/assembly-installing-cost-management#configure-tagging-next-step_configuring[Configure tagging for your sources]
24+
* link:https://access.redhat.com/documentation/en-us/cost_management_service/2022/html/getting_started_with_cost_management/assembly-using-cost-management#cost-explorer-next-step_using-cost-management[Use the Cost Explorer to visualize your costs]

0 commit comments

Comments
 (0)