Skip to content

Commit 72f27a1

Browse files
mprahlopenshift-merge-bot[bot]
authored andcommitted
Add a launch.json for local development
Relates: https://issues.redhat.com/browse/ACM-10885 Signed-off-by: mprahl <[email protected]>
1 parent e71a482 commit 72f27a1

File tree

2 files changed

+49
-0
lines changed

2 files changed

+49
-0
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ Session.vim
7474
tags
7575
### VisualStudioCode ###
7676
.vscode/*
77+
!.vscode/launch.json
7778
.history
7879
# End of https://www.gitignore.io/api/go,vim,emacs,visualstudiocode
7980
cmd/manager/__debug_bin

.vscode/launch.json

+48
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
{
2+
"version": "0.2.0",
3+
"configurations": [
4+
// Run `make kind-bootstrap-cluster-dev` before launching this.
5+
{
6+
"name": "Launch Package",
7+
"type": "go",
8+
"request": "launch",
9+
"mode": "auto",
10+
"program": "${workspaceFolder}/main.go",
11+
"args": ["controller", "--leader-elect=false", "--log-level=3", "--v=5", "--enable-operator-policy=true"],
12+
"env": {
13+
"WATCH_NAMESPACE": "managed",
14+
"KUBECONFIG": "${workspaceFolder}/kubeconfig_managed",
15+
}
16+
},
17+
// Set FDescribe or FIt on the test to debug. Then set the desired breakpoint.
18+
{
19+
"name": "Launch Test Function (instructions in launch.json)",
20+
"type": "go",
21+
"request": "launch",
22+
"mode": "auto",
23+
"program": "${workspaceFolder}/test/e2e/e2e_suite_test.go",
24+
"args": [
25+
"-ginkgo.debug",
26+
"-ginkgo.v",
27+
],
28+
"env": {
29+
"KUBECONFIG": "${workspaceFolder}/kubeconfig_managed_e2e",
30+
}
31+
},
32+
// Set the correct path to the governance-policy-framework repo directory in the env section.
33+
{
34+
"name": "Launch Package (Framework E2E) (instructions in launch.json)",
35+
"type": "go",
36+
"request": "launch",
37+
"mode": "auto",
38+
"program": "${workspaceFolder}/main.go",
39+
"args": ["controller", "--leader-elect=false", "--log-level=3", "--v=5", "--enable-operator-policy=true"],
40+
"env": {
41+
"WATCH_NAMESPACE": "managed",
42+
"HUB_CONFIG": "${userHome}/git/governance-policy-framework/kubeconfig_hub",
43+
"MANAGED_CONFIG": "${userHome}/git/governance-policy-framework/kubeconfig_managed",
44+
"KUBECONFIG": "${userHome}/git/governance-policy-framework/kubeconfig_managed",
45+
}
46+
}
47+
]
48+
}

0 commit comments

Comments
 (0)