Skip to content

Commit

Permalink
Add a launch.json for local development
Browse files Browse the repository at this point in the history
Relates:
https://issues.redhat.com/browse/ACM-10885

Signed-off-by: mprahl <mprahl@users.noreply.github.com>
  • Loading branch information
mprahl authored and openshift-merge-bot[bot] committed Apr 15, 2024
1 parent e71a482 commit 72f27a1
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ Session.vim
tags
### VisualStudioCode ###
.vscode/*
!.vscode/launch.json
.history
# End of https://www.gitignore.io/api/go,vim,emacs,visualstudiocode
cmd/manager/__debug_bin
Expand Down
48 changes: 48 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
{
"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",
"args": ["controller", "--leader-elect=false", "--log-level=3", "--v=5", "--enable-operator-policy=true"],
"env": {
"WATCH_NAMESPACE": "managed",
"KUBECONFIG": "${workspaceFolder}/kubeconfig_managed",
}
},
// 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.
{
"name": "Launch Package (Framework E2E) (instructions in launch.json)",
"type": "go",
"request": "launch",
"mode": "auto",
"program": "${workspaceFolder}/main.go",
"args": ["controller", "--leader-elect=false", "--log-level=3", "--v=5", "--enable-operator-policy=true"],
"env": {
"WATCH_NAMESPACE": "managed",
"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",
}
}
]
}

0 comments on commit 72f27a1

Please sign in to comment.