Skip to content

Commit

Permalink
Merge pull request #55 from vshn/docs/vscode
Browse files Browse the repository at this point in the history
Add some vscode samples
  • Loading branch information
Kidswiss authored Aug 10, 2023
2 parents 589c399 + af7fab2 commit 8ac2bf6
Show file tree
Hide file tree
Showing 2 changed files with 116 additions and 1 deletion.
2 changes: 1 addition & 1 deletion docs/modules/ROOT/nav.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
//* xref:tutorials/example.adoc[Dev]
.How To
//* xref:how-tos/example.adoc[Example How-To]
* xref:how-tos/vscode.adoc[]
.Technical reference
* xref:references/apiserver/env-variables.adoc[Env variables]
Expand Down
115 changes: 115 additions & 0 deletions docs/modules/ROOT/pages/examples/vscode.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
= VSCode Launch Configs

Here is an example for vscode launch configs for this repository.
Please adjust any parameters and env vars to your use-case, or they may not work!

[source,json]
----
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Launch Maintenance",
"type": "go",
"request": "launch",
"mode": "auto",
"program": "${workspaceFolder}",
"args": [
"maintenance",
"--service",
"postgresql",
"--log-level",
"1",
],
"env": {
"INSTANCE_NAMESPACE": "vshn-postgresql-pgsql-app1-prod-j8rlk",
"KUBECONFIG": "PATH_TO_YOUR_KIND_CONFIG",
"API_USERNAME": "admin",
"API_PASSWORD": "password",
"CLAIM_NAMESPACE": "default",
"CLAIM_NAME": "pgsql-app1-prod",
"SG_NAMESPACE": "stackgres",
}
},
{
"name": "Launch sliprober",
"type": "go",
"request": "launch",
"mode": "auto",
"program": "${workspaceFolder}",
"args": [
"sliprober",
"--vshn-postgresql",
"--log-level",
"1",
],
"env": {
"KUBECONFIG": "PATH_TO_YOUR_KIND_CONFIG",
}
},
{
"name": "Launch slareport",
"type": "go",
"request": "launch",
"mode": "auto",
"program": "${workspaceFolder}",
"args": [
"slareport",
"--previousmonth",
"--mimirorg",
"vshn",
"--log-level",
"1",
],
"env": {
"KUBECONFIG": "PATH_TO_YOUR_KIND_CONFIG",
}
},
{
"name": "Launch apiserver",
"type": "go",
"request": "launch",
"mode": "auto",
"program": "${workspaceFolder}",
"args": [
"apiserver",
"--secure-port=9443",
"--kubeconfig=PATH_TO_YOUR_KIND_CONFIG",
"--authorization-kubeconfig=PATH_TO_YOUR_KIND_CONFIG",
"--authentication-kubeconfig=PATH_TO_YOUR_KIND_CONFIG",
"--feature-gates=APIPriorityAndFairness=false",
],
"env": {
"KUBECONFIG": "PATH_TO_YOUR_KIND_CONFIG",
"VSHN_REDIS_BACKUP_HANDLER_ENABLED": "true",
"APPCAT_HANDLER_ENABLED": "true",
"VSHN_POSTGRES_BACKUP_HANDLER_ENABLED": "true"
}
},
{
"name": "Launch grpc",
"type": "go",
"request": "launch",
"mode": "auto",
"program": "${workspaceFolder}",
"args": [
"--log-level",
"1",
"start",
"--network",
"tcp",
"--socket",
":9547",
"--devmode"
],
"env": {
"KUBECONFIG": "PATH_TO_YOUR_KIND_CONFIG",
}
}
]
}
----

0 comments on commit 8ac2bf6

Please sign in to comment.