-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Mikalai Radchuk <mradchuk@redhat.com>
- Loading branch information
Showing
3 changed files
with
79 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#!/bin/bash | ||
|
||
set -euo pipefail | ||
|
||
help="post-upgrade-checks.sh is used to perform checks after OLMv1 upgrade. | ||
The following environment variables are required for configuring this script: | ||
- \$CATALOG_IMG - the tag for the catalog image that contains the registry+v1 bundle. | ||
" | ||
|
||
TEST_CATALOG_NAME="test-catalog" | ||
TEST_EXTENSION_NAME="test-package" | ||
|
||
if [[ -z "${CATALOG_IMG}" ]]; then | ||
echo "\$CATALOG_IMG is required to be set" | ||
echo "${help}" | ||
exit 1 | ||
fi | ||
|
||
|
||
kubectl wait --for=condition=Unpacked --timeout=60s ClusterCatalog $TEST_CATALOG_NAME | ||
kubectl wait --for=condition=Installed --timeout=60s ClusterExtension $TEST_EXTENSION_NAME |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
#!/bin/bash | ||
|
||
set -euo pipefail | ||
|
||
help="pre-upgrade-setup.sh is used to create some basic resources | ||
which will later be used in upgrade testing. | ||
The following environment variables are required for configuring this script: | ||
- \$CATALOG_IMG - the tag for the catalog image that contains the registry+v1 bundle. | ||
" | ||
|
||
TEST_CATALOG_NAME="test-catalog" | ||
TEST_EXTENSION_NAME="test-package" | ||
|
||
if [[ -z "${CATALOG_IMG}" ]]; then | ||
echo "\$CATALOG_IMG is required to be set" | ||
echo "${help}" | ||
exit 1 | ||
fi | ||
|
||
kubectl apply -f - << EOF | ||
apiVersion: catalogd.operatorframework.io/v1alpha1 | ||
kind: ClusterCatalog | ||
metadata: | ||
name: ${TEST_CATALOG_NAME} | ||
spec: | ||
source: | ||
type: image | ||
image: | ||
ref: ${CATALOG_IMG} | ||
pollInterval: 24h | ||
insecureSkipTLSVerify: true | ||
EOF | ||
|
||
|
||
kubectl apply -f - << EOF | ||
apiVersion: olm.operatorframework.io/v1alpha1 | ||
kind: ClusterExtension | ||
metadata: | ||
name: ${TEST_EXTENSION_NAME} | ||
spec: | ||
installNamespace: default | ||
packageName: prometheus | ||
EOF | ||
|
||
kubectl wait --for=condition=Available --timeout=60s -n olmv1-system deployment --all | ||
kubectl wait --for=condition=Unpacked --timeout=60s ClusterCatalog $TEST_CATALOG_NAME | ||
kubectl wait --for=condition=Installed --timeout=60s ClusterExtension $TEST_EXTENSION_NAME |