Skip to content

Commit a114208

Browse files
authored
Merge pull request #8 from sourcegraph/additional-commands
add k8s commands
2 parents 298b83f + f1bb4e9 commit a114208

File tree

2 files changed

+30
-3
lines changed

2 files changed

+30
-3
lines changed

src/utils/commands.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export const commands = require("./commands.json")
1+
export const commands = require("./commands.json")

src/utils/commands.json

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,8 +152,35 @@
152152
"Check Dirty Database": {
153153
"command": "kubectl exec",
154154
"option": "$PGSQL_POD",
155-
"command2": " -- psql -U sg -c 'SELECT * FROM schema_migrations'",
155+
"command2": "-- psql -U sg -c 'SELECT * FROM schema_migrations'",
156156
"description": "Get inside the PGSQL Pod to check for dirty database."
157+
},
158+
"Generate Postgres Database Dump": {
159+
"command": "kubectl exec -it -- bash",
160+
"option": "$PGSQL_POD",
161+
"command2": "-c 'pg_dump -C -U sg' > sourcegraph_db.out",
162+
"description": "This allows you to generate a database dump for Postgres."
163+
},
164+
"Generate Code Intel Database Dump": {
165+
"command": "kubectl exec -it -- bash",
166+
"option": "$CODEINTEL_POD",
167+
"command2": "-c 'pg_dump -C -U sg' > codeintel_db.out",
168+
"description": "This allows you to generate a database dump for the Code Intel service."
169+
},
170+
"Stop existing deployment": {
171+
"command": "kubectl scale --replicas=0 deployment/sourcegraph-frontend",
172+
"option": "",
173+
"description": "Stop the existing deployment by removing the frontend."
174+
},
175+
"Show pod metrics": {
176+
"command": "kubectl top pod -- containers",
177+
"option": "$POD",
178+
"description": "This allows you to show metrics for a given pod and it's containers."
179+
},
180+
"Check Storage Class": {
181+
"command":"kubectl get storage class",
182+
"option": "",
183+
"description":"This allows you to check the existence of a storage class and it's name."
157184
}
158185
}
159-
}
186+
}

0 commit comments

Comments
 (0)