Skip to content

Commit

Permalink
Adding Selection process
Browse files Browse the repository at this point in the history
  • Loading branch information
davidcollom committed May 31, 2024
1 parent 0fb832f commit 1369200
Show file tree
Hide file tree
Showing 5 changed files with 151 additions and 1 deletion.
13 changes: 13 additions & 0 deletions content/selection/alerting.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Alerting Selection

**Capability**: [Anomaly Management](https://www.finops.org/framework/capabilities/anomaly-management/)

There appears to be little to no open-source tooling that specifically helps with monitoring and alerting. In this case, options are to either make use of existing monitoring and alerting tools, or to build custom alerting.

## Tooling considered

### Prometheus / Alertmanager

This is a logical choice as a leading open-source tool for Kubernetes metrics and alerting, and is also a prerequisite for OpenCost installation.

Custom tooling would be unnecessarily complicated in this case. Instead, we should consider offering some useful metrics/prometheus rules to alert on.
79 changes: 79 additions & 0 deletions content/selection/automation-and-tooling.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
# Automation and tooling Selection

## Policy enforcement/guard rails

**Capability**: [Cloud Policy & Governance](https://www.finops.org/framework/capabilities/cloud-policy-governance/), [Workload Optimisation](https://www.finops.org/framework/capabilities/workload-optimization/)

Admission control can provide enforcement of sensible defaults and guard rails through enforcement of sensible defaults, and enforcing policies that prevent expensive/anomalous misconfigurations.

There are several admission controllers that could be used for this purpose - so here this decision is based on existing/available reference policies as well as our opinion on which of these tools are most established from observed customer adoption.

Policies should cover:

- CPU and Memory requests and limits
- Cost allocation labels
- Possible: resource quotas
- LimitRange per namespace

### Tooling considered

#### [Kyverno](https://kyverno.io/)

Nirmata provide a collection of ‘out-of-the-box’ FinOps and Cost-Optimisation policies (https://github.com/nirmata/finops-policies, https://nirmata.com/2023/03/22/kubernetes-finops-policies-with-kyverno/). May require some additional policiers - but this is a good starting point.
**Community recognition**: Not on FinOps landscape. CNCF Incubating Project.
**License**: Apache
**Level of Maintenance**: Actively maintained

#### [Gatekeeper](https://github.com/open-policy-agent/gatekeeper)

No cost/FinOps specific collections of policies - but library contains some useful policies (CPU requests and limits, container resource ratios etc). Additional policies would need writing to gain full benefit.
**Community recognition**: Not on FinOps landscape. On CNCF Landscape.
**License**: Apache
**Level of Maintenance**: Actively maintained

#### [Polaris](https://www.fairwinds.com/polaris)

Has a few out of the box policies related to efficiency - CPU and Memory requests and limits. Additional policies would need writing to gain full benefit.
**Community recognition**: On FinOps landscape. Not a CNCF Project.
**License**: Apache
**Level of Maintenance**: Actively maintained

## Rate optimisation

In other words - cloud discounts. Pay less for what you need.

Ideally tooling would:
Identify potential for discounts (e.g. Spot Instances or Commitments vs on-demand pricing)
Automate use of a cheaper machine type or machine discount model (i.e. Spot) where available

Capability: [Rate Optimisation](https://www.finops.org/framework/capabilities/rate-optimization/)

### Tooling considered

There does not appear to be open-source tooling that we can use to build recommendations. This therefore requires custom work.
For any custom work, we should think about preferred direction:

- Providing advice and recommendations. If we want to provide recommendations, we would need to build custom tooling to either make our own recommendations OR hook into cloud provider recommendation APIS (if /where available).
- Provide automation for rate optimisation as 'opt-in'. In reality, this would be spot instances only.

## Workload optimisation
Capability: [Workload Optimisation](https://www.finops.org/framework/capabilities/workload-optimization/)

Consider:
- Horizontal scaling
- Vertical scaling
- Out of hours

Tooling considered:
- [Goldilocks](https://www.fairwinds.com/goldilocks)
- VPA
- **Custom tooling with VPA**
- Out of hours
- HPA

Out of scope: Cloud Provider-specific (e.g. MDA)

## Cost avoidance

Identifying idle resources.
Deleting idle resources.
File renamed without changes.
54 changes: 54 additions & 0 deletions content/selection/monitoring.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# Monitoring Selection

## Capability: [Allocation](https://www.finops.org/framework/capabilities/allocation/), [Reporting and Analytics](https://www.finops.org/framework/capabilities/reporting-analytics/)

## **Aims to understand**: What are we spending where?

Should cover:
- Spend
- Cost-allocation
- Gathering and visualising this data

## Tooling considered

### [OpenCost](https://www.opencost.io/)

“A vendor-neutral open source project for measuring and allocating cloud infrastructure and container costs in real time”.
Community recognition: A CNCF Sandbox Project, and part of FinOps Foundation’s Landscape, this project has strong credibility in this space.
Requires Prometheus to be installed.

**License**: Apache
**Level of Maintenance**: actively maintained.

**Provides**: metrics and visibility.
Does not provide: recommendations/reports (these are in Kubecost free).
Requires user configuration to get started (can’t install and get running without a GCP api key if using google cloud - autodetected).
**Installation**: first Prometheus, then Cloud provider configuration, then opencost.

### [KubeCost](https://www.kubecost.com/) (free tier)

KubeCost is the commercial version of OpenCost. It is an open core product, and the free version of KubeCost can be installed using their cost-analyzer helm-chart. This chart is open-source, [https://github.com/kubecost/cost-analyzer-helm-chart].
**License**: Apache
**Level of Maintenance**: actively maintained.
**Question**: do you need to sign up for an API key to keep using the free version?
Full comparison of KubeCost vs OpenCost is [here](https://docs.kubecost.com/architecture/opencost-product-comparison).
Grafana and Prometheus are bundled with the install.
Get data/running ui on install without any preconfiguration.

### [Crane](https://gocrane.io/)

“A FinOps Platform for Cloud Resource Analytics and Economics in Kubernetes clusters.”
Community recognition: On CNCF Landscape, not a CNCF Project, not on FinOps Foundation’s Landscape.
**License**: Apache
**Level of Maintenance**: last release Jul 2023. Does not appear actively maintained.

### [Komiser](https://www.komiser.io/)

“A cloud-agnostic resource mananger… integrates with multiple cloud providers … builds a cloud asset inventory, and helps you break down your cost at the resource level 💰”
Community recognition: Not on CNCF Landscape, not a CNCF Project, not on FinOps Foundation’s Landscape. Has community following: 4.8k stars on GitHub.
**License**: Elastic License (ELv2).
**Level of Maintenance**: actively maintained.

### Custom Tooling
Self-calculation of costs based on data from publicly available cloud provider costing APIs is an option. However, existing tools (OpenCost and Crane) are already able to calculate and visualise these costs.
So custom tooling would be an unacceptable/unnecessary overhead.
6 changes: 5 additions & 1 deletion mkdocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,11 @@ nav:
- intro.md
- Installation: install.md
- Architecture: architecture.md
- Selection: selection.md
- Selection:
- selection/index.md
- selection/monitoring.md
- selection/alerting.md
- selection/automation-and-tooling.md
- credit.md

extra_css:
Expand Down

0 comments on commit 1369200

Please sign in to comment.