diff --git a/PROJECT b/PROJECT index a24997a0c..610967fbc 100644 --- a/PROJECT +++ b/PROJECT @@ -67,4 +67,8 @@ resources: kind: VerticaScrutinize path: github.com/vertica/vertica-kubernetes/api/v1beta1 version: v1beta1 + webhooks: + defaulting: true + validation: true + webhookVersion: v1 version: "3" diff --git a/tests/e2e-leg-6/verify-vrpq-conditions/35-create-vrpq-with-start-timestamp-filter.yaml b/tests/e2e-leg-6/verify-vrpq-conditions/20-create-vrpq-with-filter.yaml similarity index 64% rename from tests/e2e-leg-6/verify-vrpq-conditions/35-create-vrpq-with-start-timestamp-filter.yaml rename to tests/e2e-leg-6/verify-vrpq-conditions/20-create-vrpq-with-filter.yaml index 37e4a8c6d..3e3ff47bc 100644 --- a/tests/e2e-leg-6/verify-vrpq-conditions/35-create-vrpq-with-start-timestamp-filter.yaml +++ b/tests/e2e-leg-6/verify-vrpq-conditions/20-create-vrpq-with-filter.yaml @@ -11,9 +11,11 @@ # See the License for the specific language governing permissions and # limitations under the License. -apiVersion: kuttl.dev/v1beta1 -kind: TestStep -commands: - - script: |- - export STARTTIMESTAMP=$(kubectl get vrpq archive-query -o json -n $NAMESPACE | jq -r '.status.restorePoints[] | select(.index==1 and .archive=="db") | .timestamp') - sh -c "envsubst < vrpq-start-timestamp.yaml | kubectl apply -n $NAMESPACE -f -" \ No newline at end of file +apiVersion: vertica.com/v1beta1 +kind: VerticaRestorePointsQuery +metadata: + name: archive-query +spec: + verticaDBName: archive-query + filterOptions: + startTimestamp: "2024-02-18" \ No newline at end of file diff --git a/tests/e2e-leg-6/verify-vrpq-conditions/25-assert.yaml b/tests/e2e-leg-6/verify-vrpq-conditions/25-assert.yaml new file mode 100644 index 000000000..3e3ff47bc --- /dev/null +++ b/tests/e2e-leg-6/verify-vrpq-conditions/25-assert.yaml @@ -0,0 +1,21 @@ +# (c) Copyright [2021-2023] Open Text. +# Licensed under the Apache License, Version 2.0 (the "License"); +# You may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +apiVersion: vertica.com/v1beta1 +kind: VerticaRestorePointsQuery +metadata: + name: archive-query +spec: + verticaDBName: archive-query + filterOptions: + startTimestamp: "2024-02-18" \ No newline at end of file diff --git a/tests/e2e-leg-6/verify-vrpq-conditions/20-invalid-startTimestamp.yaml b/tests/e2e-leg-6/verify-vrpq-conditions/25-invalid-startTimestamp.yaml similarity index 100% rename from tests/e2e-leg-6/verify-vrpq-conditions/20-invalid-startTimestamp.yaml rename to tests/e2e-leg-6/verify-vrpq-conditions/25-invalid-startTimestamp.yaml diff --git a/tests/e2e-leg-6/verify-vrpq-conditions/25-create-vrpq-with-archive-name-filter.yaml b/tests/e2e-leg-6/verify-vrpq-conditions/30-create-vrpq-with-archive-name-filter.yaml similarity index 100% rename from tests/e2e-leg-6/verify-vrpq-conditions/25-create-vrpq-with-archive-name-filter.yaml rename to tests/e2e-leg-6/verify-vrpq-conditions/30-create-vrpq-with-archive-name-filter.yaml diff --git a/tests/e2e-leg-6/verify-vrpq-conditions/30-assert.yaml b/tests/e2e-leg-6/verify-vrpq-conditions/35-assert.yaml similarity index 100% rename from tests/e2e-leg-6/verify-vrpq-conditions/30-assert.yaml rename to tests/e2e-leg-6/verify-vrpq-conditions/35-assert.yaml diff --git a/tests/e2e-leg-6/verify-vrpq-conditions/30-verify-conditions.yaml b/tests/e2e-leg-6/verify-vrpq-conditions/35-verify-conditions.yaml similarity index 100% rename from tests/e2e-leg-6/verify-vrpq-conditions/30-verify-conditions.yaml rename to tests/e2e-leg-6/verify-vrpq-conditions/35-verify-conditions.yaml diff --git a/tests/e2e-leg-6/verify-vrpq-conditions/20-assert.yaml b/tests/e2e-leg-6/verify-vrpq-conditions/40-create-vrpq-with-start-timestamp-filter.yaml similarity index 81% rename from tests/e2e-leg-6/verify-vrpq-conditions/20-assert.yaml rename to tests/e2e-leg-6/verify-vrpq-conditions/40-create-vrpq-with-start-timestamp-filter.yaml index 37e4a8c6d..e868b35a3 100644 --- a/tests/e2e-leg-6/verify-vrpq-conditions/20-assert.yaml +++ b/tests/e2e-leg-6/verify-vrpq-conditions/40-create-vrpq-with-start-timestamp-filter.yaml @@ -15,5 +15,5 @@ apiVersion: kuttl.dev/v1beta1 kind: TestStep commands: - script: |- - export STARTTIMESTAMP=$(kubectl get vrpq archive-query -o json -n $NAMESPACE | jq -r '.status.restorePoints[] | select(.index==1 and .archive=="db") | .timestamp') + export STARTTIMESTAMP="$(kubectl get vrpq archive-query -o json -n $NAMESPACE | jq -r '.status.restorePoints[] | select(.index==1 and .archive=="db") | .timestamp')" sh -c "envsubst < vrpq-start-timestamp.yaml | kubectl apply -n $NAMESPACE -f -" \ No newline at end of file diff --git a/tests/e2e-leg-6/verify-vrpq-conditions/40-assert.yaml b/tests/e2e-leg-6/verify-vrpq-conditions/45-assert.yaml similarity index 100% rename from tests/e2e-leg-6/verify-vrpq-conditions/40-assert.yaml rename to tests/e2e-leg-6/verify-vrpq-conditions/45-assert.yaml diff --git a/tests/e2e-leg-6/verify-vrpq-conditions/40-verify-conditions.yaml b/tests/e2e-leg-6/verify-vrpq-conditions/45-verify-conditions.yaml similarity index 100% rename from tests/e2e-leg-6/verify-vrpq-conditions/40-verify-conditions.yaml rename to tests/e2e-leg-6/verify-vrpq-conditions/45-verify-conditions.yaml diff --git a/tests/e2e-leg-6/verify-vrpq-conditions/45-create-vrpq-with-end-timestamp-filter.yaml b/tests/e2e-leg-6/verify-vrpq-conditions/50-create-vrpq-with-end-timestamp-filter.yaml similarity index 81% rename from tests/e2e-leg-6/verify-vrpq-conditions/45-create-vrpq-with-end-timestamp-filter.yaml rename to tests/e2e-leg-6/verify-vrpq-conditions/50-create-vrpq-with-end-timestamp-filter.yaml index a32bd6d60..647e5e3d8 100644 --- a/tests/e2e-leg-6/verify-vrpq-conditions/45-create-vrpq-with-end-timestamp-filter.yaml +++ b/tests/e2e-leg-6/verify-vrpq-conditions/50-create-vrpq-with-end-timestamp-filter.yaml @@ -15,5 +15,5 @@ apiVersion: kuttl.dev/v1beta1 kind: TestStep commands: - script: |- - export ENDTIMESTAMP=$(kubectl get vrpq archive-query -o json -n $NAMESPACE | jq -r '.status.restorePoints[] | select(.index==1 and .archive=="db") | .timestamp') + export ENDTIMESTAMP="$(kubectl get vrpq archive-query -o json -n $NAMESPACE | jq -r '.status.restorePoints[] | select(.index==1 and .archive=="db") | .timestamp')" sh -c "envsubst < vrpq-end-timestamp.yaml | kubectl apply -n $NAMESPACE -f -" \ No newline at end of file diff --git a/tests/e2e-leg-6/verify-vrpq-conditions/50-assert.yaml b/tests/e2e-leg-6/verify-vrpq-conditions/55-assert.yaml similarity index 100% rename from tests/e2e-leg-6/verify-vrpq-conditions/50-assert.yaml rename to tests/e2e-leg-6/verify-vrpq-conditions/55-assert.yaml diff --git a/tests/e2e-leg-6/verify-vrpq-conditions/50-verify-conditions.yaml b/tests/e2e-leg-6/verify-vrpq-conditions/55-verify-conditions.yaml similarity index 100% rename from tests/e2e-leg-6/verify-vrpq-conditions/50-verify-conditions.yaml rename to tests/e2e-leg-6/verify-vrpq-conditions/55-verify-conditions.yaml diff --git a/tests/e2e-leg-6/verify-vrpq-conditions/55-create-vrpq-with-both-timestamps-filter.yaml b/tests/e2e-leg-6/verify-vrpq-conditions/60-create-vrpq-with-both-timestamps-filter.yaml similarity index 77% rename from tests/e2e-leg-6/verify-vrpq-conditions/55-create-vrpq-with-both-timestamps-filter.yaml rename to tests/e2e-leg-6/verify-vrpq-conditions/60-create-vrpq-with-both-timestamps-filter.yaml index f774acf7b..37ab69b49 100644 --- a/tests/e2e-leg-6/verify-vrpq-conditions/55-create-vrpq-with-both-timestamps-filter.yaml +++ b/tests/e2e-leg-6/verify-vrpq-conditions/60-create-vrpq-with-both-timestamps-filter.yaml @@ -15,6 +15,6 @@ apiVersion: kuttl.dev/v1beta1 kind: TestStep commands: - script: |- - export STARTTIMESTAMP=$(kubectl get vrpq archive-query -o json -n $NAMESPACE | jq -r '.status.restorePoints[] | select(.index==1 and .archive=="db") | .timestamp') - export ENDTIMESTAMP=$STARTTIMESTAMP + export STARTTIMESTAMP="$(kubectl get vrpq archive-query -o json -n $NAMESPACE | jq -r '.status.restorePoints[] | select(.index==1 and .archive=="db") | .timestamp')" + export ENDTIMESTAMP="$STARTTIMESTAMP" sh -c "envsubst < vrpq-both-timestamps.yaml | kubectl apply -n $NAMESPACE -f -" \ No newline at end of file diff --git a/tests/e2e-leg-6/verify-vrpq-conditions/60-assert.yaml b/tests/e2e-leg-6/verify-vrpq-conditions/65-assert.yaml similarity index 100% rename from tests/e2e-leg-6/verify-vrpq-conditions/60-assert.yaml rename to tests/e2e-leg-6/verify-vrpq-conditions/65-assert.yaml diff --git a/tests/e2e-leg-6/verify-vrpq-conditions/60-verify-conditions.yaml b/tests/e2e-leg-6/verify-vrpq-conditions/65-verify-conditions.yaml similarity index 100% rename from tests/e2e-leg-6/verify-vrpq-conditions/60-verify-conditions.yaml rename to tests/e2e-leg-6/verify-vrpq-conditions/65-verify-conditions.yaml diff --git a/tests/e2e-leg-6/verify-vrpq-conditions/65-create-vrpq-with-both-timestamps-filter.yaml b/tests/e2e-leg-6/verify-vrpq-conditions/70-create-vrpq-with-both-timestamps-filter.yaml similarity index 66% rename from tests/e2e-leg-6/verify-vrpq-conditions/65-create-vrpq-with-both-timestamps-filter.yaml rename to tests/e2e-leg-6/verify-vrpq-conditions/70-create-vrpq-with-both-timestamps-filter.yaml index 6448c605c..91b32299e 100644 --- a/tests/e2e-leg-6/verify-vrpq-conditions/65-create-vrpq-with-both-timestamps-filter.yaml +++ b/tests/e2e-leg-6/verify-vrpq-conditions/70-create-vrpq-with-both-timestamps-filter.yaml @@ -15,6 +15,6 @@ apiVersion: kuttl.dev/v1beta1 kind: TestStep commands: - script: |- - export STARTTIMESTAMP=$(kubectl get vrpq archive-query -o json -n $NAMESPACE | jq -r '.status.restorePoints[] | select(.index==2 and .archive=="db") | .timestamp' | cut -d ' ' -f 1) - export ENDTIMESTAMP=$(kubectl get vrpq archive-query -o json -n $NAMESPACE | jq -r '.status.restorePoints[] | select(.index==1 and .archive=="db2") | .timestamp' | cut -d ' ' -f 1) + export STARTTIMESTAMP="$(kubectl get vrpq archive-query -o json -n $NAMESPACE | jq -r '.status.restorePoints[] | select(.index==2 and .archive=="db") | .timestamp' | cut -d ' ' -f 1)" + export ENDTIMESTAMP="$(kubectl get vrpq archive-query -o json -n $NAMESPACE | jq -r '.status.restorePoints[] | select(.index==1 and .archive=="db2") | .timestamp' | cut -d ' ' -f 1)" sh -c "envsubst < vrpq-both-date-only-timestamps.yaml | kubectl apply -n $NAMESPACE -f -" \ No newline at end of file diff --git a/tests/e2e-leg-6/verify-vrpq-conditions/70-assert.yaml b/tests/e2e-leg-6/verify-vrpq-conditions/75-assert.yaml similarity index 100% rename from tests/e2e-leg-6/verify-vrpq-conditions/70-assert.yaml rename to tests/e2e-leg-6/verify-vrpq-conditions/75-assert.yaml diff --git a/tests/e2e-leg-6/verify-vrpq-conditions/70-verify-conditions.yaml b/tests/e2e-leg-6/verify-vrpq-conditions/75-verify-conditions.yaml similarity index 100% rename from tests/e2e-leg-6/verify-vrpq-conditions/70-verify-conditions.yaml rename to tests/e2e-leg-6/verify-vrpq-conditions/75-verify-conditions.yaml