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!

{
    // 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",
            }
        }
    ]
}