Skip to content

Commit

Permalink
Merge pull request #1817 from mrueg/prep-release-2.6.0
Browse files Browse the repository at this point in the history
*: Cut v2.6.0
  • Loading branch information
k8s-ci-robot authored Aug 24, 2022
2 parents 6dfeab3 + 1b8b443 commit bc3b985
Show file tree
Hide file tree
Showing 18 changed files with 176 additions and 32 deletions.
17 changes: 17 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
## v2.6.0 / 2022-08-26
* [FEATURE] Add local storage labels to kube_persistentvolume_info #1814 @nabokihms
* [FEATURE] Add support for StateSet and Info metrics for Custom-Resource State #1777 @chrischdi
* [FEATURE] Add support for Rolebinding resource metrics #1799 @kaitoii11
* [FEATURE] Add new kube_horizontalpodautoscaler_status_target_metric #1725 @tanguyfalconnet
* [FEATURE] Add support for Role and Clusterrole resource metrics #1759 @kaitoii11
* [FEATURE] Add support for the ServiceAccount resource metrics #1773 @Serializator
* [FEATURE] Add metric for pod tolerations #1769 @Serializator
* [FEATURE] Add new kube_endpoint_address metric #1761 @bavarianbidi
* [FEATURE] Support reading the timestamp fields of custom resources #1766 @dontan001
* [ENHANCEMENT] Migrate to structured logging #1807 @dmpe
* [ENHANCEMENT] Switch registry vanity domain from k8s.gcr.io to registry.k8s.io #1750 @mrueg
* [ENHANCEMENT] Graduate new endpoint metrics to stable #1812 @bavarianbidi
* [BUGFIX] Fix label name for kube_pod_nodeselector #1756 @yosshi825
* [BUGFIX] Fix Custom-Resource State Metrics not to contain underscores #1754 @chrischdi
* [BUGFIX] Fix kube_node_status_allocatable unit doc #1760 @jumbosushi

## v2.5.0 / 2022-06-03

* [FEATURE] Add experimental Custom-Resource State Metrics #1710 @iamnoah
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,10 @@ At most, 5 kube-state-metrics and 5 [kubernetes releases](https://github.com/kub

| kube-state-metrics | **Kubernetes 1.20** | **Kubernetes 1.21** | **Kubernetes 1.22** | **Kubernetes 1.23** | **Kubernetes 1.24** |
|--------------------|:--------------------:|:---------------------:|:-------------------:|:-------------------:|:-------------------:|
| **v2.2.4** ||||| - |
| **v2.3.0** ||||| - |
| **v2.4.2** | -/✓ | -/✓ ||| - |
| **v2.5.0** | -/✓ | -/✓ ||||
| **v2.6.0** | -/✓ | -/✓ ||||
| **master** | -/✓ | -/✓ ||||

- `` Fully supported version range.
Expand All @@ -90,7 +90,7 @@ release.
#### Container Image

The latest container image can be found at:
* `registry.k8s.io/kube-state-metrics/kube-state-metrics:v2.5.0` (arch: `amd64`, `arm`, `arm64`, `ppc64le` and `s390x`)
* `registry.k8s.io/kube-state-metrics/kube-state-metrics:v2.6.0` (arch: `amd64`, `arm`, `arm64`, `ppc64le` and `s390x`)

### Metrics Documentation

Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.5.0
2.6.0
2 changes: 1 addition & 1 deletion docs/persistentvolume-metrics.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@
| kube_persistentvolume_status_phase | Gauge | | | `persistentvolume`=&lt;pv-name&gt; <br>`phase`=&lt;Bound\|Failed\|Pending\|Available\|Released&gt; | STABLE |
| kube_persistentvolume_claim_ref | Gauge | | | `persistentvolume`=&lt;pv-name&gt; <br>`claim_namespace`=&lt;<namespace>&gt; <br>`name`=&lt;<name>&gt; | STABLE |
| kube_persistentvolume_labels | Gauge | | | `persistentvolume`=&lt;persistentvolume-name&gt; <br> `label_PERSISTENTVOLUME_LABEL`=&lt;PERSISTENTVOLUME_LABEL&gt; | STABLE |
| kube_persistentvolume_info | Gauge | | | `persistentvolume`=&lt;pv-name&gt; <br> `storageclass`=&lt;storageclass-name&gt; <br> `gce_persistent_disk_name`=&lt;pd-name&gt; <br> `ebs_volume_id`=&lt;ebs-volume-id&gt; <br> `azure_disk_name`=&lt;azure-disk-name&gt; <br> `fc_wwids`=&lt;fc-wwids-comma-separated&gt; <br> `fc_lun`=&lt;fc-lun&gt; <br> `fc_target_wwns`=&lt;fc-target-wwns-comma-separated&gt; <br> `iscsi_target_portal`=&lt;iscsi-target-portal&gt; <br> `iscsi_iqn`=&lt;iscsi-iqn&gt; <br> `iscsi_lun`=&lt;iscsi-lun&gt; <br> `iscsi_initiator_name`=&lt;iscsi-initiator-name&gt; <br> `nfs_server`=&lt;nfs-server&gt; <br> `nfs_path`=&lt;nfs-path&gt; <br> `csi_driver`=&lt;csi-driver&gt; <br> `csi_volume_handle`=&lt;csi-volume-handle&gt; | STABLE |
| kube_persistentvolume_info | Gauge | | | `persistentvolume`=&lt;pv-name&gt; <br> `storageclass`=&lt;storageclass-name&gt; <br> `gce_persistent_disk_name`=&lt;pd-name&gt; <br> `host_path`=&lt;path-of-a-host-volume&gt; <br> `host_path_type`=&lt;host-mount-type&gt; <br> `ebs_volume_id`=&lt;ebs-volume-id&gt; <br> `azure_disk_name`=&lt;azure-disk-name&gt; <br> `fc_wwids`=&lt;fc-wwids-comma-separated&gt; <br> `fc_lun`=&lt;fc-lun&gt; <br> `fc_target_wwns`=&lt;fc-target-wwns-comma-separated&gt; <br> `iscsi_target_portal`=&lt;iscsi-target-portal&gt; <br> `iscsi_iqn`=&lt;iscsi-iqn&gt; <br> `iscsi_lun`=&lt;iscsi-lun&gt; <br> `iscsi_initiator_name`=&lt;iscsi-initiator-name&gt; <br> `local_path`=&lt;path-of-a-local-volume&gt; <br> `local_fs`=&lt;local-volume-fs-type&gt; <br> `nfs_server`=&lt;nfs-server&gt; <br> `nfs_path`=&lt;nfs-path&gt; <br> `csi_driver`=&lt;csi-driver&gt; <br> `csi_volume_handle`=&lt;csi-volume-handle&gt; | STABLE |
| kube_persistentvolume_created | Gauge | Unix Creation Timestamp | seconds | `persistentvolume`=&lt;persistentvolume-name&gt; <br> | EXPERIMENTAL |

2 changes: 1 addition & 1 deletion examples/autosharding/cluster-role-binding.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ metadata:
labels:
app.kubernetes.io/component: exporter
app.kubernetes.io/name: kube-state-metrics
app.kubernetes.io/version: 2.5.0
app.kubernetes.io/version: 2.6.0
name: kube-state-metrics
roleRef:
apiGroup: rbac.authorization.k8s.io
Expand Down
2 changes: 1 addition & 1 deletion examples/autosharding/cluster-role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ metadata:
labels:
app.kubernetes.io/component: exporter
app.kubernetes.io/name: kube-state-metrics
app.kubernetes.io/version: 2.5.0
app.kubernetes.io/version: 2.6.0
name: kube-state-metrics
rules:
- apiGroups:
Expand Down
2 changes: 1 addition & 1 deletion examples/autosharding/role-binding.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ metadata:
labels:
app.kubernetes.io/component: exporter
app.kubernetes.io/name: kube-state-metrics
app.kubernetes.io/version: 2.5.0
app.kubernetes.io/version: 2.6.0
name: kube-state-metrics
namespace: kube-system
roleRef:
Expand Down
2 changes: 1 addition & 1 deletion examples/autosharding/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ metadata:
labels:
app.kubernetes.io/component: exporter
app.kubernetes.io/name: kube-state-metrics
app.kubernetes.io/version: 2.5.0
app.kubernetes.io/version: 2.6.0
name: kube-state-metrics
namespace: kube-system
rules:
Expand Down
2 changes: 1 addition & 1 deletion examples/autosharding/service-account.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ metadata:
labels:
app.kubernetes.io/component: exporter
app.kubernetes.io/name: kube-state-metrics
app.kubernetes.io/version: 2.5.0
app.kubernetes.io/version: 2.6.0
name: kube-state-metrics
namespace: kube-system
2 changes: 1 addition & 1 deletion examples/autosharding/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ metadata:
labels:
app.kubernetes.io/component: exporter
app.kubernetes.io/name: kube-state-metrics
app.kubernetes.io/version: 2.5.0
app.kubernetes.io/version: 2.6.0
name: kube-state-metrics
namespace: kube-system
spec:
Expand Down
6 changes: 3 additions & 3 deletions examples/autosharding/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ metadata:
labels:
app.kubernetes.io/component: exporter
app.kubernetes.io/name: kube-state-metrics
app.kubernetes.io/version: 2.5.0
app.kubernetes.io/version: 2.6.0
name: kube-state-metrics
namespace: kube-system
spec:
Expand All @@ -18,7 +18,7 @@ spec:
labels:
app.kubernetes.io/component: exporter
app.kubernetes.io/name: kube-state-metrics
app.kubernetes.io/version: 2.5.0
app.kubernetes.io/version: 2.6.0
spec:
automountServiceAccountToken: true
containers:
Expand All @@ -34,7 +34,7 @@ spec:
valueFrom:
fieldRef:
fieldPath: metadata.namespace
image: registry.k8s.io/kube-state-metrics/kube-state-metrics:v2.5.0
image: registry.k8s.io/kube-state-metrics/kube-state-metrics:v2.6.0
livenessProbe:
httpGet:
path: /healthz
Expand Down
2 changes: 1 addition & 1 deletion examples/standard/cluster-role-binding.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ metadata:
labels:
app.kubernetes.io/component: exporter
app.kubernetes.io/name: kube-state-metrics
app.kubernetes.io/version: 2.5.0
app.kubernetes.io/version: 2.6.0
name: kube-state-metrics
roleRef:
apiGroup: rbac.authorization.k8s.io
Expand Down
2 changes: 1 addition & 1 deletion examples/standard/cluster-role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ metadata:
labels:
app.kubernetes.io/component: exporter
app.kubernetes.io/name: kube-state-metrics
app.kubernetes.io/version: 2.5.0
app.kubernetes.io/version: 2.6.0
name: kube-state-metrics
rules:
- apiGroups:
Expand Down
6 changes: 3 additions & 3 deletions examples/standard/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ metadata:
labels:
app.kubernetes.io/component: exporter
app.kubernetes.io/name: kube-state-metrics
app.kubernetes.io/version: 2.5.0
app.kubernetes.io/version: 2.6.0
name: kube-state-metrics
namespace: kube-system
spec:
Expand All @@ -17,11 +17,11 @@ spec:
labels:
app.kubernetes.io/component: exporter
app.kubernetes.io/name: kube-state-metrics
app.kubernetes.io/version: 2.5.0
app.kubernetes.io/version: 2.6.0
spec:
automountServiceAccountToken: true
containers:
- image: registry.k8s.io/kube-state-metrics/kube-state-metrics:v2.5.0
- image: registry.k8s.io/kube-state-metrics/kube-state-metrics:v2.6.0
livenessProbe:
httpGet:
path: /healthz
Expand Down
2 changes: 1 addition & 1 deletion examples/standard/service-account.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ metadata:
labels:
app.kubernetes.io/component: exporter
app.kubernetes.io/name: kube-state-metrics
app.kubernetes.io/version: 2.5.0
app.kubernetes.io/version: 2.6.0
name: kube-state-metrics
namespace: kube-system
2 changes: 1 addition & 1 deletion examples/standard/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ metadata:
labels:
app.kubernetes.io/component: exporter
app.kubernetes.io/name: kube-state-metrics
app.kubernetes.io/version: 2.5.0
app.kubernetes.io/version: 2.6.0
name: kube-state-metrics
namespace: kube-system
spec:
Expand Down
30 changes: 29 additions & 1 deletion internal/store/persistentvolume.go
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,17 @@ func persistentVolumeMetricFamilies(allowAnnotationsList, allowLabelsList []stri
metric.Gauge,
"",
wrapPersistentVolumeFunc(func(p *v1.PersistentVolume) *metric.Family {
var gcePDDiskName, ebsVolumeID, azureDiskName, fcWWIDs, fcLun, fcTargetWWNs, iscsiTargetPortal, iscsiIQN, iscsiLun, iscsiInitiatorName, nfsServer, nfsPath, csiDriver, csiVolumeHandle string
var (
gcePDDiskName,
ebsVolumeID,
azureDiskName,
fcWWIDs, fcLun, fcTargetWWNs,
iscsiTargetPortal, iscsiIQN, iscsiLun, iscsiInitiatorName,
nfsServer, nfsPath,
csiDriver, csiVolumeHandle,
localFS, localPath,
hostPath, hostPathType string
)

switch {
case p.Spec.PersistentVolumeSource.GCEPersistentDisk != nil:
Expand Down Expand Up @@ -202,6 +212,16 @@ func persistentVolumeMetricFamilies(allowAnnotationsList, allowLabelsList []stri
case p.Spec.PersistentVolumeSource.CSI != nil:
csiDriver = p.Spec.PersistentVolumeSource.CSI.Driver
csiVolumeHandle = p.Spec.PersistentVolumeSource.CSI.VolumeHandle
case p.Spec.PersistentVolumeSource.Local != nil:
localPath = p.Spec.PersistentVolumeSource.Local.Path
if p.Spec.PersistentVolumeSource.Local.FSType != nil {
localFS = *p.Spec.PersistentVolumeSource.Local.FSType
}
case p.Spec.PersistentVolumeSource.HostPath != nil:
hostPath = p.Spec.PersistentVolumeSource.HostPath.Path
if p.Spec.PersistentVolumeSource.HostPath.Type != nil {
hostPathType = string(*p.Spec.PersistentVolumeSource.HostPath.Type)
}
}

return &metric.Family{
Expand All @@ -223,6 +243,10 @@ func persistentVolumeMetricFamilies(allowAnnotationsList, allowLabelsList []stri
"nfs_path",
"csi_driver",
"csi_volume_handle",
"local_path",
"local_fs",
"host_path",
"host_path_type",
},
LabelValues: []string{
p.Spec.StorageClassName,
Expand All @@ -240,6 +264,10 @@ func persistentVolumeMetricFamilies(allowAnnotationsList, allowLabelsList []stri
nfsPath,
csiDriver,
csiVolumeHandle,
localPath,
localFS,
hostPath,
hostPathType,
},
Value: 1,
},
Expand Down
Loading

0 comments on commit bc3b985

Please sign in to comment.