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

Add Storage Capacity metrics #2487

Open
sergelogvinov opened this issue Aug 27, 2024 · 1 comment
Open

Add Storage Capacity metrics #2487

sergelogvinov opened this issue Aug 27, 2024 · 1 comment
Assignees
Labels
kind/feature Categorizes issue or PR as related to a new feature. triage/accepted Indicates an issue or PR is ready to be actively worked on.

Comments

@sergelogvinov
Copy link

What would you like to be added:

https://kubernetes.io/docs/concepts/storage/storage-capacity/

Why is this needed:

It exposes storage capacity available on the zone topology.

# kubectl get csistoragecapacities -ocustom-columns=CLASS:.storageClassName,AVAIL:.capacity,ZONE:.nodeTopology.matchLabels -A
CLASS            AVAIL       ZONE
csi-proxmox      1643124Mi   map[topology.kubernetes.io/region:fsn1 topology.kubernetes.io/zone:pve-2]

# kubectl -n csi-proxmox get csistoragecapacities csisc-2r9fp -oyaml
apiVersion: storage.k8s.io/v1
capacity: 1643124Mi
kind: CSIStorageCapacity
metadata:
  creationTimestamp: "2024-08-06T08:14:57Z"
  generateName: csisc-
  labels:
    csi.storage.k8s.io/drivername: csi.proxmox.sinextra.dev
    csi.storage.k8s.io/managed-by: external-provisioner
  name: csisc-2r9fp
  namespace: csi-proxmox
  ownerReferences:
  - apiVersion: apps/v1
    controller: true
    kind: Deployment
    name: proxmox-csi-plugin-controller
    uid: 9fdf1eca-8cc4-45ac-a116-e09f2b657bc3
  resourceVersion: "434485298"
  uid: 712957a8-f329-4662-96d5-955fb40415ed
nodeTopology:
  matchLabels:
    topology.kubernetes.io/region: fsn1
    topology.kubernetes.io/zone: pve-2
storageClassName: csi-proxmox

Describe the solution you'd like

Add options to allow gather this metrics:

kube_csistoragecapacities_available{namespace="csi-proxmox",csi_storage_k8s_io_drivername="csi.proxmox.sinextra.dev",topology_kubernetes_io_region="fsn1",topology_kubernetes_io_zone="pve-2"} 1682558976

What do you think, can I introduce it for you?

@sergelogvinov sergelogvinov added the kind/feature Categorizes issue or PR as related to a new feature. label Aug 27, 2024
@k8s-ci-robot k8s-ci-robot added the needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. label Aug 27, 2024
@dashpole
Copy link

dashpole commented Sep 5, 2024

/triage accepted
/assign @rexagod

@k8s-ci-robot k8s-ci-robot added triage/accepted Indicates an issue or PR is ready to be actively worked on. and removed needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Sep 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature. triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
None yet
Development

No branches or pull requests

4 participants