mirror of
https://github.com/prometheus-operator/prometheus-operator.git
synced 2025-04-21 03:38:43 +00:00
chore: fix TestPrometheusVersionUpgrade
This change reduces the scope of the upgrade tests: we're now testing from the current LTS version (v2.45.0) to the latest stable release. Closes #7039 Signed-off-by: Simon Pasquier <spasquie@redhat.com>
This commit is contained in:
parent
30f11e2fa1
commit
d5dbb3df3e
4 changed files with 26 additions and 75 deletions
.github/workflows
Documentation
pkg/operator
test/e2e
11
.github/workflows/test-prom-version-upgrade.yaml
vendored
11
.github/workflows/test-prom-version-upgrade.yaml
vendored
|
@ -9,6 +9,11 @@ jobs:
|
|||
name: Upgrade Prometheus
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Reclaim disk space
|
||||
run: |
|
||||
docker image prune --force --all
|
||||
sudo rm -rf /usr/share/dotnet
|
||||
sudo rm -rf /usr/local/lib/android
|
||||
- uses: actions/checkout@v4
|
||||
- name: Import environment variables from file
|
||||
run: |
|
||||
|
@ -19,10 +24,6 @@ jobs:
|
|||
with:
|
||||
go-version: '${{ env.golang-version }}'
|
||||
check-latest: true
|
||||
- name: Build images
|
||||
run: |
|
||||
export SHELL=/bin/bash
|
||||
make build image
|
||||
- name: Start KinD
|
||||
uses: helm/kind-action@v1.10.0
|
||||
with:
|
||||
|
@ -36,7 +37,7 @@ jobs:
|
|||
kubectl wait --for=condition=Ready pods --all --all-namespaces --timeout=300s
|
||||
kubectl cluster-info
|
||||
kubectl get pods -A
|
||||
- name: Load images
|
||||
- name: Build and load images
|
||||
run: |
|
||||
make test-e2e-images
|
||||
kubectl apply -f scripts/kind-rbac.yaml
|
||||
|
|
|
@ -30,32 +30,6 @@ v0.31.2
|
|||
Prometheus Operator supports all Prometheus versions >= v2.0.0. The operator's end-to-end tests verify that the operator can deploy the following Prometheus versions:
|
||||
|
||||
```$ mdox-exec="go run ./cmd/po-docgen/. compatibility"
|
||||
* v2.37.0
|
||||
* v2.37.1
|
||||
* v2.37.2
|
||||
* v2.37.3
|
||||
* v2.37.4
|
||||
* v2.37.5
|
||||
* v2.37.6
|
||||
* v2.37.7
|
||||
* v2.37.8
|
||||
* v2.38.0
|
||||
* v2.39.0
|
||||
* v2.39.1
|
||||
* v2.39.2
|
||||
* v2.40.0
|
||||
* v2.40.1
|
||||
* v2.40.2
|
||||
* v2.40.3
|
||||
* v2.40.4
|
||||
* v2.40.5
|
||||
* v2.40.6
|
||||
* v2.40.7
|
||||
* v2.41.0
|
||||
* v2.42.0
|
||||
* v2.43.0
|
||||
* v2.43.1
|
||||
* v2.44.0
|
||||
* v2.45.0
|
||||
* v2.46.0
|
||||
* v2.47.0
|
||||
|
@ -71,7 +45,6 @@ Prometheus Operator supports all Prometheus versions >= v2.0.0. The operator's e
|
|||
* v2.51.1
|
||||
* v2.51.2
|
||||
* v2.52.0
|
||||
* v2.52.1
|
||||
* v2.53.0
|
||||
* v2.53.1
|
||||
* v2.54.0
|
||||
|
|
|
@ -48,35 +48,9 @@ var (
|
|||
DefaultPrometheusConfigReloaderImage = "quay.io/prometheus-operator/prometheus-config-reloader:v" + version.Version
|
||||
|
||||
// PrometheusCompatibilityMatrix is a list of supported prometheus versions.
|
||||
// prometheus-operator end-to-end tests verify that the operator can deploy from LTS n-1 to the latest stable.
|
||||
// prometheus-operator end-to-end tests verify that the operator can deploy from the current LTS version to the latest stable release.
|
||||
// This list should be updated every time a new LTS is released.
|
||||
PrometheusCompatibilityMatrix = []string{
|
||||
"v2.37.0",
|
||||
"v2.37.1",
|
||||
"v2.37.2",
|
||||
"v2.37.3",
|
||||
"v2.37.4",
|
||||
"v2.37.5",
|
||||
"v2.37.6",
|
||||
"v2.37.7",
|
||||
"v2.37.8",
|
||||
"v2.38.0",
|
||||
"v2.39.0",
|
||||
"v2.39.1",
|
||||
"v2.39.2",
|
||||
"v2.40.0",
|
||||
"v2.40.1",
|
||||
"v2.40.2",
|
||||
"v2.40.3",
|
||||
"v2.40.4",
|
||||
"v2.40.5",
|
||||
"v2.40.6",
|
||||
"v2.40.7",
|
||||
"v2.41.0",
|
||||
"v2.42.0",
|
||||
"v2.43.0",
|
||||
"v2.43.1",
|
||||
"v2.44.0",
|
||||
"v2.45.0",
|
||||
"v2.46.0",
|
||||
"v2.47.0",
|
||||
|
@ -92,7 +66,8 @@ var (
|
|||
"v2.51.1",
|
||||
"v2.51.2",
|
||||
"v2.52.0",
|
||||
"v2.52.1",
|
||||
// The v2.52.1 image tag is missing from docker.io and quay.io registries.
|
||||
// "v2.52.1",
|
||||
"v2.53.0",
|
||||
"v2.53.1",
|
||||
"v2.54.0",
|
||||
|
|
|
@ -853,22 +853,24 @@ func testPromVersionMigration(t *testing.T) {
|
|||
}
|
||||
|
||||
for _, v := range compatibilityMatrix {
|
||||
p, err = framework.PatchPrometheusAndWaitUntilReady(
|
||||
context.Background(),
|
||||
p.Name,
|
||||
ns,
|
||||
monitoringv1.PrometheusSpec{
|
||||
CommonPrometheusFields: monitoringv1.CommonPrometheusFields{
|
||||
Version: v,
|
||||
t.Run("to "+v, func(t *testing.T) {
|
||||
p, err = framework.PatchPrometheusAndWaitUntilReady(
|
||||
context.Background(),
|
||||
name,
|
||||
ns,
|
||||
monitoringv1.PrometheusSpec{
|
||||
CommonPrometheusFields: monitoringv1.CommonPrometheusFields{
|
||||
Version: v,
|
||||
},
|
||||
},
|
||||
},
|
||||
)
|
||||
if err != nil {
|
||||
t.Fatalf("update to version %s: %v", v, err)
|
||||
}
|
||||
if err := framework.WaitForPrometheusRunImageAndReady(context.Background(), ns, p); err != nil {
|
||||
t.Fatalf("update to version %s: %v", v, err)
|
||||
}
|
||||
)
|
||||
if err != nil {
|
||||
t.Fatalf("update to version %s: %v", v, err)
|
||||
}
|
||||
if err := framework.WaitForPrometheusRunImageAndReady(context.Background(), ns, p); err != nil {
|
||||
t.Fatalf("update to version %s: %v", v, err)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue