Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

provide proportional PV costs via PARCs #1998

Closed
wants to merge 2 commits into from

Conversation

ameijer
Copy link
Contributor

@ameijer ameijer commented Jun 22, 2023

What does this PR change?

  • adds PV support to PARCs

Does this PR relate to any other PRs?

  • no

How will this PR impact users?

  • This is response to a specific ask from the Azure team to provide a proportion of a PV used by a given allocation in the specified window.

Does this PR address any GitHub or Zendesk issues?

  • Closes ...

How was this PR tested?

  • tested on an AKS cluster. Deleted pods and observed the PV parc percentage matched the relative lifetime of the pods within the window

Does this PR require changes to documentation?

  • no

Have you labeled this PR and its corresponding Issue as "next release" if it should be part of the next OpenCost release? If not, why not?

Signed-off-by: Alex Meijer <ameijer@kubecost.com>
(cherry picked from commit e5d5c4a)
Signed-off-by: Alex Meijer <ameijer@kubecost.com>
@ameijer ameijer marked this pull request as ready for review June 23, 2023 18:59
Copy link
Contributor

@nikovacevic nikovacevic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Going to be "forking" this, manually, to try to get it across the line this week.

// adding the duration on here has the effect of
// interpolating the results over any missing data due
// to prom resolutions
e := s.Add(queryDuration)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think you can do this, though. PVs don't always run for the entire duration of a query window. Beyond that, for the "current" window, we'll have end times in the future.

@r2k1
Copy link
Contributor

r2k1 commented Jul 26, 2023

Could you also expose VolumeHandle property from PersistentVolume somewhere?

Currently I see next data in /assets:

"Azure/82acd5bb-4206-47d4-9c12-a65db028483d/__undefined__/Storage/cluster-one/Disk/Kubernetes/pvc-c404ccf0-e136-41e3-901a-0ba6c43bdb40/pvc-c404ccf0-e136-41e3-901a-0ba6c43bdb40": {
      "type": "Disk",
      "properties": {
        "category": "Storage",
        "provider": "Azure",
        "account": "82acd5bb-4206-47d4-9c12-a65db028483d",
        "service": "Kubernetes",
        "cluster": "cluster-one",
        "name": "pvc-c404ccf0-e136-41e3-901a-0ba6c43bdb40",
        "providerID": "pvc-c404ccf0-e136-41e3-901a-0ba6c43bdb40"
      }

But I need to this resource id /subscriptions/82acd5bb-4206-47d4-9c12-a65db028483d/resourceGroups/mc_artur_artur-dev-cluster_australiaeast/providers/Microsoft.Compute/disks/pvc-c404ccf0-e136-41e3-901a-0ba6c43bdb40

@nikovacevic
Copy link
Contributor

Replaced by #2059

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants