-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[RHCLOUD-19829] Fixed logging type #627
Open
psav
wants to merge
1
commit into
master
Choose a base branch
from
psav/fix_logging_type
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
8 changes: 8 additions & 0 deletions
8
bundle/tests/scorecard/kuttl/test-log-app-interface/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,8 @@ | ||
--- | ||
apiVersion: v1 | ||
kind: Namespace | ||
metadata: | ||
name: test-log-app-interface | ||
spec: | ||
finalizers: | ||
- kubernetes |
13 changes: 13 additions & 0 deletions
13
bundle/tests/scorecard/kuttl/test-log-app-interface/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,13 @@ | ||
--- | ||
apiVersion: v1 | ||
kind: Secret | ||
metadata: | ||
name: puptoo | ||
namespace: test-log-app-interface | ||
labels: | ||
app: puptoo | ||
ownerReferences: | ||
- apiVersion: cloud.redhat.com/v1alpha1 | ||
kind: ClowdApp | ||
name: puptoo | ||
type: Opaque |
66 changes: 66 additions & 0 deletions
66
bundle/tests/scorecard/kuttl/test-log-app-interface/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,66 @@ | ||
--- | ||
apiVersion: cloud.redhat.com/v1alpha1 | ||
kind: ClowdEnvironment | ||
metadata: | ||
name: test-log-app-interface | ||
spec: | ||
targetNamespace: test-log-app-interface | ||
providers: | ||
web: | ||
port: 8000 | ||
mode: operator | ||
metrics: | ||
port: 9000 | ||
mode: operator | ||
path: "/metrics" | ||
kafka: | ||
mode: none | ||
db: | ||
mode: none | ||
logging: | ||
mode: app-interface | ||
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-log-app-interface | ||
spec: | ||
envName: test-log-app-interface | ||
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: | ||
public: | ||
enabled: true | ||
private: | ||
enabled: true | ||
--- | ||
apiVersion: v1 | ||
data: | ||
aws_access_key_id: YXdzX2FjY2Vzc19rZXk= | ||
aws_region: dXMtZWFzdA== | ||
aws_secret_access_key: YXdzX3NlY3JldF9rZXk= | ||
log_group_name: dGVzdC1hcHAtaW50ZXJmYWNlLXMz | ||
kind: Secret | ||
metadata: | ||
name: cloudwatch | ||
namespace: test-log-app-interface | ||
type: Opaque |
10 changes: 10 additions & 0 deletions
10
bundle/tests/scorecard/kuttl/test-log-app-interface/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,10 @@ | ||
--- | ||
apiVersion: kuttl.dev/v1beta1 | ||
kind: TestStep | ||
commands: | ||
- script: sleep 5 | ||
- script: kubectl get secret --namespace=test-log-app-interface puptoo -o json > /tmp/test-log-app-interface | ||
- script: jq -r '.data["cdappconfig.json"]' < /tmp/test-log-app-interface | base64 -d > /tmp/test-log-app-interface-json | ||
|
||
- script: jq -r '.logging.type == "cloudwatch"' -e < /tmp/test-log-app-interface-json | ||
- script: jq -r '.logging.cloudwatch.region == "us-east"' -e < /tmp/test-log-app-interface-json |
13 changes: 13 additions & 0 deletions
13
bundle/tests/scorecard/kuttl/test-log-app-interface/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,13 @@ | ||
--- | ||
apiVersion: kuttl.dev/v1beta1 | ||
kind: TestStep | ||
delete: | ||
- apiVersion: v1 | ||
kind: Namespace | ||
name: test-log-app-interface | ||
- apiVersion: cloud.redhat.com/v1alpha1 | ||
kind: ClowdEnvironment | ||
name: test-log-app-interface | ||
- apiVersion: v1 | ||
kind: Namespace | ||
name: test-log-app-interface-secret |
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,8 @@ | ||
--- | ||
apiVersion: v1 | ||
kind: Namespace | ||
metadata: | ||
name: test-log-none | ||
spec: | ||
finalizers: | ||
- kubernetes |
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,13 @@ | ||
--- | ||
apiVersion: v1 | ||
kind: Secret | ||
metadata: | ||
name: puptoo | ||
namespace: test-log-none | ||
labels: | ||
app: puptoo | ||
ownerReferences: | ||
- apiVersion: cloud.redhat.com/v1alpha1 | ||
kind: ClowdApp | ||
name: puptoo | ||
type: Opaque |
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,66 @@ | ||
--- | ||
apiVersion: cloud.redhat.com/v1alpha1 | ||
kind: ClowdEnvironment | ||
metadata: | ||
name: test-log-none | ||
spec: | ||
targetNamespace: test-log-none | ||
providers: | ||
web: | ||
port: 8000 | ||
mode: operator | ||
metrics: | ||
port: 9000 | ||
mode: operator | ||
path: "/metrics" | ||
kafka: | ||
mode: none | ||
db: | ||
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-log-none | ||
spec: | ||
envName: test-log-none | ||
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: | ||
public: | ||
enabled: true | ||
private: | ||
enabled: true | ||
--- | ||
apiVersion: v1 | ||
data: | ||
aws_access_key_id: YXdzX2FjY2Vzc19rZXk= | ||
aws_region: dXMtZWFzdA== | ||
aws_secret_access_key: YXdzX3NlY3JldF9rZXk= | ||
log_group_name: dGVzdC1hcHAtaW50ZXJmYWNlLXMz | ||
kind: Secret | ||
metadata: | ||
name: cloudwatch | ||
namespace: test-log-none | ||
type: Opaque |
9 changes: 9 additions & 0 deletions
9
bundle/tests/scorecard/kuttl/test-log-none/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: kuttl.dev/v1beta1 | ||
kind: TestStep | ||
commands: | ||
- script: sleep 5 | ||
- script: kubectl get secret --namespace=test-log-none puptoo -o json > /tmp/test-log-none | ||
- script: jq -r '.data["cdappconfig.json"]' < /tmp/test-log-none | base64 -d > /tmp/test-log-none-json | ||
|
||
- script: jq -r '.logging.type == "null"' -e < /tmp/test-log-none-json | ||
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,13 @@ | ||
--- | ||
apiVersion: kuttl.dev/v1beta1 | ||
kind: TestStep | ||
delete: | ||
- apiVersion: v1 | ||
kind: Namespace | ||
name: test-log-none | ||
- apiVersion: cloud.redhat.com/v1alpha1 | ||
kind: ClowdEnvironment | ||
name: test-log-none | ||
- apiVersion: v1 | ||
kind: Namespace | ||
name: test-log-none-secret |
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought we left null keys absent these days, but I can see this has been in place in the code for awhile so probably not worth changing just for this simple fix.