-
Notifications
You must be signed in to change notification settings - Fork 202
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
Consider using go embed to keep object definitions in YAMLs rather than in Go code #394
Comments
Nice new feature. Looks cleaner than go-bindata |
@rojkov I gave it a try using tips from this blog post
|
Updated the title: Go embed likely better option than go-bindata. |
Moving the Go code to YAML files may enable us to add the funlen check to |
@bart0sh one problem to solve first is how to make |
In PMEM-CSI, we treat our |
@mythi thanks. that's even better as yamls do not always cooperate with that simple wildcard pattern. will do. |
Currently in the operator we construct DaemonSet objects directly as a Go structure:
This way we end up with very long though simple functions and this prevents us from enabling some linter checks like
funlen
.Evaluate moving object definitions to YAML files and generating Go files with go-bindata the way it's done in OpenShift operators: https://github.com/openshift/cluster-ingress-operator/tree/master/pkg/manifests.
Try to annotate the generated go-bindata files with buildtags so that linter checks don't go crazy: e.g. generate debug and release versions of the Go files and enable linter checks only for the debug version.
The text was updated successfully, but these errors were encountered: