generated from runwhen-contrib/codecollection-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #11 from infracloudio/fix/rds
Fixes secrets and environment variables
- Loading branch information
Showing
23 changed files
with
215 additions
and
169 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,4 +3,4 @@ __pycache__ | |
output.xml | ||
log.html | ||
report.html | ||
test/sre-stack/* | ||
dev-cluster/sre-stack/* |
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,4 +1,4 @@ | ||
[submodule "test/sre-stack"] | ||
path = test/sre-stack | ||
[submodule "dev-cluster/sre-stack"] | ||
path = dev-cluster/sre-stack | ||
url = https://github.com/infracloudio/sre-stack.git | ||
branch = main |
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
12 changes: 1 addition & 11 deletions
12
codebundles/rds-mysql-conn-count/kill-mysql-sleep-processes.sh
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
36 changes: 14 additions & 22 deletions
36
codebundles/rds-mysql-conn-count/runwhen-config/runbook.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 |
---|---|---|
@@ -1,26 +1,18 @@ | ||
location: location-01-us-west1 | ||
codeBundle: | ||
repoUrl: https://github.com/infracloudio/infracloud-runwhen-codecollection.git | ||
ref: codebundle-rds-mysql-conn | ||
repoUrl: https://github.com/infracloudio/ifc-rw-codecollection | ||
ref: main | ||
pathToRobot: codebundles/rds-mysql-conn-count/runbook.robot | ||
configProvided: | ||
- name: KUBERNETES_DISTRIBUTION_BINARY | ||
value: kubectl | ||
- name: NAMESPACE | ||
value: default | ||
- name: ERROR_PATTERN | ||
value: (Error|Exception) | ||
- name: CONTEXT | ||
value: default | ||
- name: SERVICE_ERROR_PATTERN | ||
value: (Error:) | ||
- name: SERVICE_EXCLUDE_PATTERN | ||
value: (node_modules|opentelemetry) | ||
- name: ANOMALY_THRESHOLD | ||
value: '5.0' | ||
secretsProvided: | ||
- name: kubeconfig | ||
workspaceKey: kubeconfig | ||
secretsProvided: [] | ||
servicesProvided: | ||
- name: kubectl | ||
locationServiceName: kubectl-service.shared | ||
- name: curl | ||
locationServiceName: curl-service.shared | ||
configProvided: | ||
- name: MYSQL_USER | ||
value: admin | ||
- name: MYSQL_HOST | ||
value: robotshopmysql.example.us-west-2.rds.amazonaws.com | ||
- name: PROCESS_USER | ||
value: shipping | ||
- name: MYSQL_PASSWORD | ||
value: example_pass |
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
14 changes: 0 additions & 14 deletions
14
codebundles/rds-mysql-conn-count/test/scripts/create-msql-sleeping-connections.sh
This file was deleted.
Oops, something went wrong.
22 changes: 0 additions & 22 deletions
22
codebundles/rds-mysql-conn-count/test/scripts/local-docker.sh
This file was deleted.
Oops, something went wrong.
35 changes: 35 additions & 0 deletions
35
...es/rds-mysql-conn-count/tests/runbook/dev-cluster/create-mysql-sleep-conn-deployment.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,35 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: create-mysql-sleep-connection | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
app: create-mysql-sleep-connection | ||
template: | ||
metadata: | ||
labels: | ||
app: create-mysql-sleep-connection | ||
spec: | ||
containers: | ||
- name: create-mysql-sleep-connection | ||
image: mysql:8.0.36 | ||
env: | ||
- name: MYSQL_USER | ||
value: "shipping" | ||
- name: MYSQL_PASSWORD | ||
value: "secret" | ||
- name: MYSQL_HOST | ||
value: "robotshopmysql.c5eo4uy8mys1.us-west-2.rds.amazonaws.com" | ||
- name: CONNECTIONS | ||
value: "30" | ||
- name: SLEEP_TIMEOUT | ||
value: "260" | ||
command: ["/bin/bash", "-c"] | ||
args: | ||
- | | ||
for ((i=1; i<=$CONNECTIONS; i++)); do | ||
MYSQL_PWD="$MYSQL_PASSWORD" mysql -h "$MYSQL_HOST" -u "$MYSQL_USER" -N -s -e "SELECT SLEEP(${SLEEP_TIMEOUT});" & | ||
done | ||
while true; do sleep 5; done |
18 changes: 5 additions & 13 deletions
18
...-count/test/manifests/sli-deployment.yaml → ...nbook/dev-cluster/runbook-deployment.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
Oops, something went wrong.