-
Notifications
You must be signed in to change notification settings - Fork 65
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Removed the imageList and Image(already deprecated) from the spec No code should break because we have supplied a hard coded list instead. Also removed DatabaseImage struct as it is no longer used. * Added new SharedDBAppName to reference the app that we would like to share the DB from. * Added new helper called GetAppForDBInSameEnv in ClowdApp types, which finds the correct app spec and ensures the DB name matches. * Added new helper called GetAppInSameEnv which, given an app, returns all other ClowdApp objects in the same Env. * Kuttl test timeout increased to 400s to allow the kafka test to finish - on rare occasions it takes longer than 300s and this causes the test to fail when really the test passes fine. * Updated all tests to drop the usage of imageList and image. * Updated all documentation to drop the usage imageList and image. * Updated all CRDs to drop the usage of imageList and image. * Updated local and app-interface modes to allow the SharedDBAppName to be respected.
- Loading branch information
Showing
31 changed files
with
299 additions
and
151 deletions.
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
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
apiVersion: kudo.dev/v1alpha1 | ||
kind: TestSuite | ||
startControlPlane: false | ||
timeout: 300 | ||
timeout: 400 | ||
parallel: 4 |
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
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
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
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
7 changes: 7 additions & 0 deletions
7
bundle/tests/scorecard/kuttl/test-multi-app-interface-db/00-install.yaml
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,7 @@ | ||
apiVersion: v1 | ||
kind: Namespace | ||
metadata: | ||
name: test-multi-app-interface-db | ||
spec: | ||
finalizers: | ||
- kubernetes |
79 changes: 79 additions & 0 deletions
79
bundle/tests/scorecard/kuttl/test-multi-app-interface-db/01-pods.yaml
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,79 @@ | ||
--- | ||
apiVersion: cloud.redhat.com/v1alpha1 | ||
kind: ClowdEnvironment | ||
metadata: | ||
name: test-multi-app-interface-db | ||
spec: | ||
targetNamespace: test-multi-app-interface-db | ||
providers: | ||
web: | ||
port: 8000 | ||
mode: operator | ||
metrics: | ||
port: 9000 | ||
mode: operator | ||
path: "/metrics" | ||
kafka: | ||
namespace: kafka | ||
clusterName: my-cluster | ||
mode: none | ||
db: | ||
mode: app-interface | ||
logging: | ||
mode: none | ||
objectStore: | ||
mode: none | ||
inMemoryDb: | ||
mode: none | ||
resourceDefaults: | ||
limits: | ||
cpu: 400m | ||
memory: 1024Mi | ||
requests: | ||
cpu: 30m | ||
memory: 512Mi | ||
--- | ||
apiVersion: cloud.redhat.com/v1alpha1 | ||
kind: ClowdApp | ||
metadata: | ||
name: app-b | ||
namespace: test-multi-app-interface-db | ||
spec: | ||
envName: test-multi-app-interface-db | ||
deployments: | ||
- name: processor | ||
podSpec: | ||
image: quay.io/psav/clowder-hello | ||
database: | ||
name: app-b | ||
version: 10 | ||
--- | ||
apiVersion: cloud.redhat.com/v1alpha1 | ||
kind: ClowdApp | ||
metadata: | ||
name: app-c | ||
namespace: test-multi-app-interface-db | ||
spec: | ||
envName: test-multi-app-interface-db | ||
deployments: | ||
- name: processor | ||
podSpec: | ||
image: quay.io/psav/clowder-hello | ||
database: | ||
sharedDbAppName: app-b | ||
version: 10 | ||
dependencies: | ||
- app-b | ||
--- | ||
apiVersion: v1 | ||
kind: Secret | ||
metadata: | ||
name: app-b-readonly-db | ||
namespace: test-multi-app-interface-db | ||
type: Opaque | ||
data: | ||
db.host: YXBwLWItc3RhZ2UucmRzLmV4YW1wbGUuY29t # app-b-stage.rds.example.com | ||
db.name: ZGJuYW1l # dbname | ||
db.port: NTQzMg== # 5432 | ||
db.user: dXNlcg== # user | ||
db.password: cGFzc3dvcmQxMjM= # password123 |
14 changes: 14 additions & 0 deletions
14
bundle/tests/scorecard/kuttl/test-multi-app-interface-db/02-json-asserts.yaml
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,14 @@ | ||
--- | ||
apiVersion: kudo.dev/v1alpha1 | ||
kind: TestStep | ||
commands: | ||
- script: sleep 5 | ||
- script: kubectl get secret --namespace=test-multi-app-interface-db app-c -o json > /tmp/test-multi-app-interface-db-c | ||
- script: jq -r '.data["cdappconfig.json"]' < /tmp/test-multi-app-interface-db-c | base64 -d > /tmp/test-multi-app-interface-db-json-c | ||
|
||
- script: jq -r '.database.hostname == "app-b-stage.rds.example.com"' -e < /tmp/test-multi-app-interface-db-json-c | ||
|
||
- script: kubectl get secret --namespace=test-multi-app-interface-db app-b -o json > /tmp/test-multi-app-interface-db-b | ||
- script: jq -r '.data["cdappconfig.json"]' < /tmp/test-multi-app-interface-db-b | base64 -d > /tmp/test-multi-app-interface-db-json-b | ||
|
||
- script: jq -r '.database.hostname == "app-b-stage.rds.example.com"' -e < /tmp/test-multi-app-interface-db-json-b |
10 changes: 10 additions & 0 deletions
10
bundle/tests/scorecard/kuttl/test-multi-app-interface-db/03-delete.yaml
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,10 @@ | ||
--- | ||
apiVersion: kudo.dev/v1alpha1 | ||
kind: TestStep | ||
delete: | ||
- apiVersion: v1 | ||
kind: Namespace | ||
name: test-multi-app-interface-db | ||
- apiVersion: cloud.redhat.com/v1alpha1 | ||
kind: ClowdEnvironment | ||
name: test-multi-app-interface-db |
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
9 changes: 9 additions & 0 deletions
9
bundle/tests/scorecard/kuttl/test-multi-db/02-json-asserts.yaml
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,9 @@ | ||
--- | ||
apiVersion: kudo.dev/v1alpha1 | ||
kind: TestStep | ||
commands: | ||
- script: sleep 1 | ||
- script: kubectl get secret --namespace=test-multi-db app-c -o json > /tmp/test-multi-db | ||
- script: jq -r '.data["cdappconfig.json"]' < /tmp/test-multi-db | base64 -d > /tmp/test-multi-db-json | ||
|
||
- script: jq -r '.database.hostname == "app-b-db.test-multi-db.svc"' -e < /tmp/test-multi-db-json |
File renamed without changes.
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
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
Oops, something went wrong.