Skip to content

v0.2.0

Latest

Choose a tag to compare

@github-actions github-actions released this 27 May 07:40
· 28 commits to master since this release

[github.com/gardener/pvc-autoscaler:v0.2.0]

⚠️ Breaking Changes

  • [USER] The new .status.volumeRecommendations section added to the PersistentVolumeClaimAutoscaler API replaces the deprecated .status.UsedSpacePercentage, .status.UsedInodesPercentage, .status.PrevSize, .status.NewSize, etc... by @RadaBDimitrova [#151]
  • [USER] The .spec.scaleTargetRef field of the PersistentVolumeClaimAutoscaler is now changed to .spec.targetRef of type k8s.io/api/autoscaling/v1.CrossVersionObjectReference and requires the specification of kind and apiVersion. by @RadaBDimitrova [#135]
  • [USER] The PersistentVolumeClaimAutoscaler API now uses .spec.volumePolicies array which allows for fine-grained control over autoscaling behavior for certain PVCs. by @RadaBDimitrova [#140]

📰 Noteworthy

  • [USER] The pvc-autoscaler can now target various workload controllers that manage pods which mount PersistentVolumeClaims, for example, StatefulSets. Such PersistentVolumeClaims are automatically identified and scaled, depending on the provided volume policy. The current volume usage metrics and whether resize is in progress for each PersistentVolumeClaim, are aggregated into RecommendationsAvailable and Resizing conditions on the PersistentVolumeClaimAutoscalerResource. by @plkokanov [#233]

✨ New Features

  • [USER] Enable Static Application Security Testing (SAST) linter by @dnaeon [#15]
  • [USER] feat: introduce PersistentVolumeClaimAutoscaler CRD by @dnaeon [#29]
  • [USER] The following new flags for specifying custom prometheus queries are introduced:
    • metrics-available-bytes-query
    • metrics-capacity-bytes-query
    • metrics-available-inodes-query
    • metrics-capacity-inodes-query by @Kostov6 [#108]
  • [USER] feat: migrate to golangci-lint v2 by @dnaeon [#89]
  • [USER] bump golang.org/x/net to v0.33.0 by @dnaeon [#35]
  • [DEVELOPER] Fake metrics server can dynamically be changed what metrics it exports by @Kostov6 [#124]
  • [DEVELOPER] The local kind setup now does a kubelet_volume_stats_* metrics endpoint verification, before fully deploying the PVC autoscaler. by @RadaBDimitrova [#118]
  • [DEVELOPER] The e2e tests can now be run in a kind setup with the make targets test-e2e-local and ci-e2e-kind. by @RadaBDimitrova [#126]
  • [DEVELOPER] Renovate is activated for this repository by @Kostov6 [#127]
  • [DEVELOPER] New make targets make kind-{up,down} to create/tear down cluster and make pvc-autoscaler-{up,dev} deploy pvc-autoscaler and relevant components. by @RadaBDimitrova [#111]
  • [DEVELOPER] There are now fake kubelet_volume_stats_* metrics available for use in local development. They can be modified via config/prometheus/metrics.txt during the run of pvc-autoscaler-dev. by @RadaBDimitrova [#115]
  • [DEVELOPER] Added pvcfetcher.Fetcher interface that can be used to fetch the PVCs that should be managed by a PersistentVolumeClaimAutoscaler by using a label selector fetcher. by @plkokanov [#150]
  • [DEVELOPER] Added selectorfetcher.Fetcher interface that can be used to fetch the label selector of the workload controller targeted by a PersistentVolumeClaimAutoscaler. by @plkokanov [#150]

🐛 Bug Fixes

  • [OPERATOR] A bug, where a PVC could be subjected to excessive expansion while prometheus data lags behind actual PVC state, was fixed. by @andrerun [#13]

🏃 Others

  • [OPERATOR] Added RecommendationAvailable and Resizing status conditions to PersistentVolumeClaimAutoscaler resources. by @RadaBDimitrova [#148]
  • [OPERATOR] When the pvc-autoscaler resizes a PersistentVolumeClaim it will annotate it with pvc.autoscaling.gardener.cloud/prev-size to indicate what was the size before the resize was triggered.
    In cases where there are no conditions set on the PersistentVolumeClaim yet, the value of this annotation is compared to the .status.capacity.storage field of the PersistentVolumeClaim and a resize is considered to be still in progress if the values are equal. by @plkokanov [#237]
  • [OPERATOR] The pvc-autoscaler does not scale a PersistentVolumeClaim, if it is targeted by multiple PersistentVolumeClaimAutoscalers. If multiple PersistentVolumeClaimAutoscalers target the same PersistentVolumeClaim, this will be reflected in their RecommendationAvailable condition. by @plkokanov [#176]
  • [OPERATOR] Stale metrics are found by the formula max(4%*size, 0.5Gi). by @plkokanov [#234]
  • [USER] The .spec.volumeRecommendations[].cooldownDuration field of the PersistentVolumeClaimAutoscaler now prevents rapid close resize operations by enforcing a minimum wait time between scaling events for the same PVC. The remaining cooldown time is visible in the PVCA status conditions. by @RadaBDimitrova [#177]
  • [USER] StepPercent minimum is now 5. by @RadaBDimitrova [#212]
  • [USER] The controller deployment now has imagePullPolicy set to IfNotPresent. by @RadaBDimitrova [#232]
  • [DEVELOPER] gosec is made available for SAST(static application security testing), it can be run with make sast or make sast-report by @Kostov6 [#125]
  • [DEVELOPER] The recommendation and update logic are now both in the periodic runner, removing the separate controller components to minimize synchronization and state issues. by @RadaBDimitrova [#154]
  • [DEVELOPER] Introduced verify, verify-extended, check-generate, generate, check, format, clean, tidy, test-cov, test-cov-clean targets, similar to gardener/gardener. by @RadaBDimitrova [#134]
  • [DEVELOPER] The following dependencies are updated:
    • k8s.io/*: v0.33.5 -> v0.34.1
    • sigs.k8s.io/controller-runtime: v0.21.0 -> v0.22.3
    • github.com/onsi/ginkgo/v2: v2.23.4 to v2.26.0
    • github.com/onsi/gomega from v1.38.0 to v1.38.2 by @plkokanov [#110]
  • [DEVELOPER] Update to controller-runtime v0.23 & k8s.io/* to v0.35 by @RadaBDimitrova [#230]
  • [DEVELOPER] Restructure config/ into kustomize base/components/overlays layout, separating production (config/overlays/default) from local KinD dev (config/overlays/kind) artefacts. by @plkokanov [#173]

application/spdx+json

  • pvc-autoscaler-spdx-ref: europe-docker.pkg.dev/gardener-project/releases/gardener/pvc-autoscaler@sha256:13bfe7c2a20f9c8c1d327e85a8991b78ff4d0cfc80e8340d862c27bb23bbdb50
  • pvc-autoscaler-spdx-ref: europe-docker.pkg.dev/gardener-project/releases/gardener/pvc-autoscaler@sha256:9f4e2fd0aaff52e7f9e107f2880f4e11cff70002f0e82c0f73e448b2d19f2cc3

Container (OCI) Images

  • pvc-autoscaler: europe-docker.pkg.dev/gardener-project/releases/gardener/pvc-autoscaler:v0.2.0