-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a launch.json for local development
Relates: https://issues.redhat.com/browse/ACM-10885 Signed-off-by: mprahl <[email protected]>
- Loading branch information
1 parent
3bc0a9e
commit 9340840
Showing
2 changed files
with
100 additions
and
0 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
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,99 @@ | ||
{ | ||
"version": "0.2.0", | ||
"configurations": [ | ||
// Run `make kind-bootstrap-cluster-dev` before launching this. | ||
{ | ||
"name": "Launch Package", | ||
"type": "go", | ||
"request": "launch", | ||
"mode": "auto", | ||
"program": "${workspaceFolder}/main.go", | ||
"env": { | ||
"HUB_CONFIG": "${workspaceFolder}/kubeconfig_hub", | ||
"MANAGED_CONFIG": "${workspaceFolder}/kubeconfig_managed", | ||
"OSDK_FORCE_RUN_MODE": "local", | ||
}, | ||
"args": [ | ||
"--leader-elect=false", | ||
"--cluster-namespace=managed", | ||
"--cluster-namespace-on-hub=managed", | ||
"--log-level=3" | ||
] | ||
}, | ||
// Run `make kind-bootstrap-cluster-dev` before launching this. | ||
{ | ||
"name": "Launch Package (Compliance API Tests)", | ||
"type": "go", | ||
"request": "launch", | ||
"mode": "auto", | ||
"program": "${workspaceFolder}/main.go", | ||
"env": { | ||
"HUB_CONFIG": "${workspaceFolder}/kubeconfig_hub", | ||
"MANAGED_CONFIG": "${workspaceFolder}/kubeconfig_managed", | ||
"OSDK_FORCE_RUN_MODE": "local", | ||
}, | ||
"args": [ | ||
"--leader-elect=false", | ||
"--cluster-namespace=managed", | ||
"--cluster-namespace-on-hub=managed", | ||
"--log-level=3", | ||
"--compliance-api-url=http://127.0.0.1:8385" | ||
] | ||
}, | ||
// Set FDescribe or FIt on the test to debug. Then set the desired breakpoint. | ||
{ | ||
"name": "Launch Test Function (instructions in launch.json)", | ||
"type": "go", | ||
"request": "launch", | ||
"mode": "auto", | ||
"program": "${workspaceFolder}/test/e2e/e2e_suite_test.go", | ||
"args": [ | ||
"-ginkgo.debug", | ||
"-ginkgo.v" | ||
], | ||
"env": { | ||
"KUBECONFIG": "${workspaceFolder}/kubeconfig_managed_e2e" | ||
} | ||
}, | ||
// Set the correct path to the governance-policy-framework repo directory in the env section. If running | ||
// on a self-managed hub, set the `--disable-spec-sync=true` and `--cluster-namespace=managed` arguments. | ||
{ | ||
"name": "Launch Package (Framework E2E) (instructions in launch.json)", | ||
"type": "go", | ||
"request": "launch", | ||
"mode": "auto", | ||
"program": "${workspaceFolder}/main.go", | ||
"env": { | ||
"HUB_CONFIG": "${userHome}/git/governance-policy-framework/kubeconfig_hub", | ||
"MANAGED_CONFIG": "${userHome}/git/governance-policy-framework/kubeconfig_managed", | ||
"KUBECONFIG": "${userHome}/git/governance-policy-framework/kubeconfig_managed", | ||
"OSDK_FORCE_RUN_MODE": "local" | ||
}, | ||
"args": [ | ||
"--leader-elect=false", | ||
"--cluster-namespace=managed", | ||
"--log-level=3" | ||
// "--disable-spec-sync=true", | ||
// "--cluster-namespace=local-cluster", | ||
] | ||
}, | ||
// Set the correct path to the governance-policy-addon-controller repo directory in the env section. | ||
{ | ||
"name": "Launch Package (Addon Controller) (instructions in launch.json)", | ||
"type": "go", | ||
"request": "launch", | ||
"mode": "auto", | ||
"program": "${workspaceFolder}/main.go", | ||
"env": { | ||
"HUB_CONFIG": "${userHome}/git/governance-policy-addon-controller-io/kubeconfig_cluster1_e2e.kubeconfig", | ||
"MANAGED_CONFIG": "${userHome}/git/governance-policy-addon-controller-io/kubeconfig_cluster2_e2e.kubeconfig", | ||
"OSDK_FORCE_RUN_MODE": "local" | ||
}, | ||
"args": [ | ||
"--leader-elect=false", | ||
"--cluster-namespace=cluster1", | ||
"--log-level=3" | ||
] | ||
} | ||
] | ||
} |