You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I followed the abovementioned doc but the step in Run Capsule is wrong.
If I issued make run, I'd hit the first error:
$ make run
...
go run ./main.go
# command-line-arguments
./main.go:61:55: undefined: GitTag
./main.go:61:63: undefined: GitCommit
./main.go:61:74: undefined: GitDirty
./main.go:62:46: undefined: GitRepo
./main.go:63:46: undefined: BuildTime
This is because the GitTag is defined in version.go file, so the fix is very straightforward:
run: generate manifests
go run ./main.go ./version.go
The I tried it again, I'd hit second error:
$ make run
...
{"level":"error","ts":"2021-09-23T16:36:00.297+0800","logger":"setup","msg":"unable to start manager","error":"unable to determinate the Namespace Capsule is running on","stacktrace":"main.main\n\t/Users/brightzheng/development/go/k8s-ecosystem/capsule/main.go:100\nruntime.main\n\t/usr/local/Cellar/go/1.17.1/libexec/src/runtime/proc.go:255"}
This is also obvious, the main.go is expecting a system env:
ifnamespace=os.Getenv("NAMESPACE"); len(namespace) ==0 {
setupLog.Error(fmt.Errorf("unable to determinate the Namespace Capsule is running on"), "unable to start manager")
os.Exit(1)
}
So the fix is also very obvious:
$ export NAMESPACE=capsule-system
$ make run
PS: I'm using k3d-powered k3s cluster as this is lighter way than kind.
Expected behavior
The doc should work expected to easily setup the dev env.
Additional context
Capsule version: master
Kubernetes version: v1.21.x
The text was updated successfully, but these errors were encountered:
Bug description
While setting up the dev env for Capsule, I encountered some issues by following the doc here:
https://github.com/clastix/capsule/blob/master/docs/operator/contributing.md
How to reproduce
I followed the abovementioned doc but the step in
Run Capsule
is wrong.If I issued
make run
, I'd hit the first error:This is because the
GitTag
is defined inversion.go
file, so the fix is very straightforward:The I tried it again, I'd hit second error:
This is also obvious, the
main.go
is expecting a system env:So the fix is also very obvious:
$ export NAMESPACE=capsule-system $ make run
Expected behavior
The doc should work expected to easily setup the dev env.
Additional context
The text was updated successfully, but these errors were encountered: