Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ jobs:
steps:
- uses: actions/checkout@v6
- uses: actions/setup-go@v6
with: { go-version: stable }
with: { go-version: '1.25.x' } # TODO: revert to stable when chainsaw supports Go 1.26 (missing testDeps.ModulePath)

- name: Start k3s
uses: ./.github/actions/k3d
Expand Down Expand Up @@ -124,7 +124,7 @@ jobs:
--name 'postgres-operator' localhost/postgres-operator

- run: |
make check-chainsaw && exit
make check-chainsaw CHAINSAW_EXTRA_ARGS='--exclude-test-regex chainsaw/.*autogrow.*' && exit
failed=$?
echo '::group::PGO logs'; docker logs 'postgres-operator'; echo '::endgroup::'
exit $failed
Expand All @@ -142,7 +142,7 @@ jobs:
steps:
- uses: actions/checkout@v6
- uses: actions/setup-go@v6
with: { go-version: stable }
with: { go-version: '1.25.x' } # TODO: revert to stable when kuttl supports Go 1.26 (missing testDeps.ModulePath)

- name: Start k3s
uses: ./.github/actions/k3d
Expand Down
7 changes: 6 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -185,9 +185,14 @@ check-envtest-existing: createnamespaces
#
# https://kyverno.github.io/chainsaw/latest/operations/script#kubeconfig
#
# NOTE: The autogrow volume tests require a storage provider that supports real
# volume expansion (e.g., GKE, EKS, AKS). They will fail on k3d/kind with the
# default local-path provisioner. Use CHAINSAW_EXTRA_ARGS to skip them when needed:
# make check-chainsaw CHAINSAW_EXTRA_ARGS='--exclude-test-regex chainsaw/.*autogrow.*'
#
.PHONY: check-chainsaw
check-chainsaw:
$(CHAINSAW_TEST) --config testing/chainsaw/e2e/config.yaml --values testing/chainsaw/e2e/values.yaml testing/chainsaw/e2e
$(CHAINSAW_TEST) --config testing/chainsaw/e2e/config.yaml --values testing/chainsaw/e2e/values.yaml $(CHAINSAW_EXTRA_ARGS) testing/chainsaw/e2e

# Expects operator to be running
#
Expand Down
34 changes: 34 additions & 0 deletions testing/chainsaw/e2e/autogrow-volume/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Autogrow Volume Tests

These tests validate the automatic volume expansion (autogrow) feature of PGO.
They create PostgresCluster instances with 1Gi volumes, write data to trigger the
autogrow threshold, and verify that PVC requests and capacities are updated correctly.

## Kubernetes Environment Requirements

These tests require a storage provider that supports **real volume expansion**, meaning
the CSI driver must implement `ControllerExpandVolume` and/or `NodeExpandVolume` so
that PVC `status.capacity` is updated after a resize request.

The default StorageClass must have `allowVolumeExpansion: true`.

### Supported environments

- **GKE** with `pd-standard` or `pd-ssd` StorageClass (tests were designed for this)
- **AWS EKS** with `gp2` or `gp3` StorageClass
- **Azure AKS** with `managed-csi` StorageClass
- Any cluster with a CSI driver that supports volume expansion

### Unsupported environments

- **k3d / k3s** with the default `local-path` provisioner — `local-path` does not
implement volume expansion. Setting `allowVolumeExpansion: true` on the StorageClass
allows PVC `spec.resources.requests` to be updated, but `status.capacity` will not
change, causing test assertions to fail.
- **kind** with the default local provisioner (same limitation)

### Running in CI

These tests are excluded from the GitHub Actions e2e workflow (`--exclude-test-regex autogrow`)
because it uses k3d with `local-path`. They should be run in a CI environment that
provides a storage backend with volume expansion support (e.g., GKE).
Loading
Loading