Skip to content

krateoplatformops/finops-operator-focus

Repository files navigation

FinOps Operator FOCUS

This repository is part of the wider exporting architecture for the Krateo Composable FinOps and manages custom costs in the FOCUS format.

Summary

  1. Overview
  2. Architecture
  3. Examples
  4. Configuration

Overview

This component is tasked with the creation of a generic exporting pipeline, according to the description given in a Custom Resource (CR). After the creation of the CR, the operator reads the FOCUS fields and creates a new resource for the FinOps Operator Exporter, pointing the api field at the Kubernetes API server and the FOCUS custom resource. This allow to create an exporter that reads directly the custom resource. The FinOps Operator Exporter then continues with the creation of the all the required resources, such as deployments, configMaps, services, and the CR for the FinOps Operator Scraper that manages scraping.

Architecture

Krateo Composable FinOps Operator FOCUS

Examples

apiVersion: finops.krateo.io/v1
kind: DatabaseConfig
metadata:
  name: # DatabaseConfig name
  namespace: # DatabaseConfig namespace
spec:
  username: # username string
  passwordSecretRef: # object reference to secret with password
    name: # secret name
    namespace: # secret namespace
    key: # secret key
---
apiVersion: finops.krateo.io/v1
kind: FocusConfig
metadata:
  name: # FocusConfig name
  namespace: # FocusConfig namespace
spec:
  scraperConfig: # same fields as krateoplatformops/finops-prometheus-scraper-generic
    tableName: # tableName in the database to upload the data to
    pollingInterval: # time duration, e.g., 12h30m
    scraperDatabaseConfigRef: # See above kind DatabaseConfig
      name: # name of the databaseConfigRef CR 
      namespace: # namespace of the databaseConfigRef CR
  focusSpec: # See FOCUS for field details
    availabilityZone:
    billedCost:
    billingAccountId:
    billingAccountName:
    billingCurrency:
    billingPeriodEnd:
    billingPeriodStart:
    chargeCategory:
    chargeClass:
    chargeDescription:
    chargeFrequency:
    chargePeriodEnd:
    chargePeriodStart:
    commitmentDiscountCategory:
    commitmentDiscountName:
    commitmentDiscountStatus:
    commitmentDiscountType:
    commitmentDiscoutId:
    consumedQuantity:
    consumedUnit:
    contractedCost:
    contractedUnitCost:
    effectiveCost:
    invoiceIssuerName:
    listCost:
    listUnitPrice:
    pricingCategory:
    pricingQuantity:
    pricingUnit:
    providerName:
    publisherName:
    regionId:
    regionName:
    resourceId:
    resourceName:
    resourceType:
    serviceCategory:
    serviceName:
    skuId:
    skuPriceId:
    subAccountId:
    subAccountName:
    tags:
      - key:
        value:

Example Use Case for Pricing Visualization

The Composable FinOps can be used to display pricing in the Krateo Composable Portal cards through a dedicated composition. You can find out more here: krateo-v2-template-finops-example-pricing-vm-azure.

Configuration

Prerequisites

  • Access to a Kubernetes v1.30.0+ cluster: Kubernetes must have the CustomResourceFieldSelectors feature gate enabled.

Dependencies

To run this repository in your Kubernetes cluster, you need to have the following images in the same container registry:

  • finops-operator-exporter
  • finops-operator-scraper
  • finops-prometheus-exporter-generic
  • finops-prometheus-scraper-generic

Detailed information on FOCUS can be found at the official website.

Installation with HELM

$ helm repo add krateo https://charts.krateo.io
$ helm repo update krateo
$ helm install finops-operator-focus krateo/finops-operator-focus

About

No description or website provided.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors