diff --git a/docs/modules/ROOT/nav.adoc b/docs/modules/ROOT/nav.adoc index 154b054ea..4f1808575 100644 --- a/docs/modules/ROOT/nav.adoc +++ b/docs/modules/ROOT/nav.adoc @@ -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] diff --git a/docs/modules/ROOT/pages/examples/vscode.adoc b/docs/modules/ROOT/pages/examples/vscode.adoc new file mode 100644 index 000000000..0493f3dee --- /dev/null +++ b/docs/modules/ROOT/pages/examples/vscode.adoc @@ -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", + } + } + ] +} + +----