Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a launch.json for local development #229

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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",
}
}
]
}