-
Notifications
You must be signed in to change notification settings - Fork 60
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
35 changed files
with
1,221 additions
and
297 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
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 |
---|---|---|
|
@@ -55,3 +55,4 @@ spec: | |
value: override_1 | ||
- name: ENV_VAR_3 | ||
value: env_var_3 | ||
web: True |
7 changes: 7 additions & 0 deletions
7
bundle/tests/scorecard/kuttl/test-web-services/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-web-services | ||
spec: | ||
finalizers: | ||
- kubernetes |
52 changes: 52 additions & 0 deletions
52
bundle/tests/scorecard/kuttl/test-web-services/01-assert.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,52 @@ | ||
--- | ||
apiVersion: v1 | ||
kind: Secret | ||
metadata: | ||
name: puptoo | ||
namespace: test-web-services | ||
labels: | ||
app: puptoo | ||
ownerReferences: | ||
- apiVersion: cloud.redhat.com/v1alpha1 | ||
kind: ClowdApp | ||
name: puptoo | ||
type: Opaque | ||
--- | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: puptoo-processor | ||
namespace: test-web-services | ||
spec: | ||
template: | ||
spec: | ||
containers: | ||
- env: | ||
- name: ENV_VAR_1 | ||
value: "env_var_1" | ||
- name: ENV_VAR_2 | ||
value: "env_var_2" | ||
- name: ACG_CONFIG | ||
value: /cdapp/cdappconfig.json | ||
--- | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: puptoo-processor | ||
namespace: test-web-services | ||
spec: | ||
selector: | ||
pod: puptoo-processor | ||
ports: | ||
- port: 9000 | ||
targetPort: 9000 | ||
name: metrics | ||
protocol: TCP | ||
- port: 8000 | ||
targetPort: 8000 | ||
name: public | ||
protocol: TCP | ||
- port: 10000 | ||
targetPort: 10000 | ||
name: private | ||
protocol: TCP |
58 changes: 58 additions & 0 deletions
58
bundle/tests/scorecard/kuttl/test-web-services/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,58 @@ | ||
--- | ||
apiVersion: cloud.redhat.com/v1alpha1 | ||
kind: ClowdEnvironment | ||
metadata: | ||
name: test-web-services | ||
spec: | ||
targetNamespace: test-web-services | ||
providers: | ||
web: | ||
port: 8000 | ||
privatePort: 10000 | ||
mode: operator | ||
metrics: | ||
port: 9000 | ||
mode: operator | ||
path: "/metrics" | ||
kafka: | ||
namespace: kafka | ||
clusterName: my-cluster | ||
mode: none | ||
db: | ||
image: "registry.redhat.io/rhel8/postgresql-12:1-36" | ||
mode: none | ||
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: puptoo | ||
namespace: test-web-services | ||
spec: | ||
envName: test-web-services | ||
deployments: | ||
- name: processor | ||
podSpec: | ||
image: quay.io/psav/clowder-hello | ||
env: | ||
- name: ENV_VAR_1 | ||
value: env_var_1 | ||
- name: ENV_VAR_2 | ||
value: env_var_2 | ||
webServices: | ||
private: | ||
enabled: True | ||
public: | ||
enabled: True |
12 changes: 12 additions & 0 deletions
12
bundle/tests/scorecard/kuttl/test-web-services/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,12 @@ | ||
--- | ||
apiVersion: kudo.dev/v1alpha1 | ||
kind: TestStep | ||
commands: | ||
- script: sleep 1 | ||
- script: kubectl get secret --namespace=test-web-services puptoo -o json > /tmp/test-web-services | ||
- script: jq -r '.data["cdappconfig.json"]' < /tmp/test-web-services | base64 -d > /tmp/test-web-services-json | ||
|
||
- script: jq -r '.publicPort == 8000' -e < /tmp/test-web-services-json | ||
- script: jq -r '.metricsPort == 9000' -e < /tmp/test-web-services-json | ||
- script: jq -r '.privatePort == 10000' -e < /tmp/test-web-services-json | ||
- script: jq -r '.metricsPath == "/metrics"' -e < /tmp/test-web-services-json |
10 changes: 10 additions & 0 deletions
10
bundle/tests/scorecard/kuttl/test-web-services/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-web-services | ||
- apiVersion: cloud.redhat.com/v1alpha1 | ||
kind: ClowdEnvironment | ||
name: test-web-services |
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.