Giter VIP home page Giter VIP logo

kubernetes-cost-report's People

Contributors

alvarof2 avatar cesarempathy avatar jparisr avatar kaskol10 avatar renovate[bot] avatar roberdvs avatar support-empathy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

kubernetes-cost-report's Issues

found duplicate series for the match group

Error explanation

Dears I found an issue in prometheus server when processing the rules that if two different machine types got the same ip and hence kubernetes node name, then the rule would fail as it does not know how to join the metrics.

Error Message (in prometheus server)

err="found duplicate series for the match group {node=\"ip-172-30-42-190.eu-west-1.compute.internal\"} on the right hand-side of the operation:
[
{label_beta_kubernetes_io_instance_type=\"m5d.2xlarge\", label_eks_amazonaws_com_capacity_type=\"ON_DEMAND\", node=\"ip-172-30-42-190.eu-west-1.compute.internal\"}, 
{label_beta_kubernetes_io_instance_type=\"m5d.xlarge\", label_eks_amazonaws_com_capacity_type=\"ON_DEMAND\", node=\"ip-172-30-42-190.eu-west-1.compute.internal\"}];
many-to-many matching not allowed: matching labels must be unique on one side"

My solution

I've developed node-to-pod-labeler that scans the whole cluster and as soon as a pod is assigned to a node it will transfer the relevant labels from the node to the pod, then kube-state-metrics will expose these labels as part of the metrics, then the rules can be simplified and this error avoided.

Im sharing it in case you find it useful

Runtime AWS region selection

I have clusters I want to test this on, but none of them are in eu-west-1. I forked the repo and added this feature (with some hackey and really ugly golang) that gets the AWS_REGION from an environment variable. Please feel free to critique and provide suggestions as to how it can be better. I didn't create a PR, I wanted to see how it was received first.

Branch: https://github.com/mrballcb/kubernetes-cost-report/tree/aws-region-env-var
Commit: main...mrballcb:kubernetes-cost-report:aws-region-env-var

I built a docker image of the above and put it at:
https://hub.docker.com/repository/docker/mrball/cost-report

I am currently testing it on one of my clusters.

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Rate-Limited

These updates are currently rate-limited. Click on a checkbox below to force their creation now.

  • Update actions/setup-go action to v5
  • Update azure/setup-helm action to v4
  • Update dependency ubuntu to v22
  • Update docker/build-push-action action to v5
  • Update docker/login-action action to v3
  • Update docker/metadata-action action to v5
  • Update docker/setup-buildx-action action to v3
  • Update github/codeql-action action to v3
  • Update goreleaser/goreleaser-action action to v6
  • Update release-drafter/release-drafter action to v6
  • ๐Ÿ” Create all rate-limited PRs at once ๐Ÿ”

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

dockerfile
Dockerfile
github-actions
.github/workflows/chart-release.yml
  • actions/checkout v2
  • azure/setup-helm v1
  • helm/chart-releaser-action v1.2.1
.github/workflows/codeql-analysis.yml
  • actions/checkout v3
  • github/codeql-action v2
  • github/codeql-action v2
  • github/codeql-action v2
.github/workflows/codeql.yml
  • actions/checkout v3
  • github/codeql-action v2
  • github/codeql-action v2
  • github/codeql-action v2
.github/workflows/docker.yml
  • actions/checkout v2
  • docker/setup-buildx-action v1
  • docker/metadata-action v3
  • docker/login-action v1
  • docker/build-push-action v2
  • ubuntu 18.04
.github/workflows/goreleaser.yml
  • actions/checkout v2
  • actions/setup-go v2
  • goreleaser/goreleaser-action v2
  • ubuntu 18.04
.github/workflows/gosec.yaml
  • actions/checkout v2
  • ubuntu 18.04
.github/workflows/kics.yaml
  • actions/checkout v4
  • checkmarx/kics-action v1.5
.github/workflows/release-drafter.yml
  • release-drafter/release-drafter v5
  • ubuntu 18.04
.github/workflows/reviewdog.yml
  • actions/checkout v2
  • WillAbides/setup-go-faster v1.7.0
  • reviewdog/action-setup v1
  • reviewdog/action-golangci-lint v2
  • reviewdog/action-golangci-lint v2
  • ubuntu 18.04
.github/workflows/tfsec.yaml
  • aquasecurity/tfsec-pr-commenter-action v1.0.3
  • ubuntu 18.04
gomod
go.mod
  • go 1.19
  • github.com/aws/aws-sdk-go v1.44.110
  • github.com/prometheus/client_golang v1.12.2
  • github.com/robfig/cron/v3 v3.0.1
  • github.com/tidwall/gjson v1.12.1
  • golang.org/x/text v0.3.7
  • google.golang.org/protobuf v1.26.0
helm-values
charts/kubernetes-cost-report/values.yaml
  • empathyco/cost-report 0.0.12
terraform
terraform/iam.tf
  • terraform-aws-modules/iam/aws 4.24.1
terraform/main.tf

  • Check this box to trigger a request for Renovate to run again on this repository

cpuMemRelation

First of all, great project!

I just wanted to ask you what was the rationale to choose cpuMemRelation = 7.2, which somehow ends up with memory having "bigger weight" o the price.

I was wandering why not assign half of the price to mem and half to cpu

MemPrice = ( p.Price / 2 ) / float64(p.GetMemory())
CPUPrice = ( p.Price / 2 ) / float64(p.GetCPU())

Thanks!

Pod CrashLoopBackOff

I get this error when I want to deploy with helm on my k8s cluster and pod crashloopbackoff:

panic: NoCredentialProviders: no valid providers in chain. Deprecated.
        For verbose messaging see aws.Config.CredentialsChainVerboseErrors

Can anyone help me?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.