-
Notifications
You must be signed in to change notification settings - Fork 56
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 go build tags no_openziti to reduce image/executable build size #789
Labels
enhancement
New feature or request
Comments
4 tasks
judehung
added a commit
to judehung/go-mod-bootstrap
that referenced
this issue
Nov 8, 2024
closes edgexfoundry#789 The usage of OpenZiti packages to support zero trust feature significantly increases the build size. For example, core-metadata increases from 14MB to 21MB, core-command increases from 9.8MB to 17MB, device-virtual increases from 18MB to 31MB, and app-service-configurable increases from 22Mb to 34MB. As many edge user scenarios require to deploy EdgeX services on resource-constrained devices without security, allowing that the services can be built without OpenZiti packages and ZeroTrust features can be helpful to user cases which don't need zero trust feature. This commit refactors the codes importing openziti packages with //go:build !no_openziti directive and creates para codes that don't use openziti packages with //go:build no_openziti directive, so users can simply build services by specifying no_openziti tag. Also remove vestigal zc variables and ZitiContext struct per discussion with https://github.com/dovholuknf in edgexfoundry#659 (comment) Signed-off-by: Jude Hung <jude@iotechsys.com>
5 tasks
judehung
added a commit
to judehung/go-mod-bootstrap
that referenced
this issue
Nov 9, 2024
closes edgexfoundry#789 The usage of OpenZiti packages to support zero trust feature significantly increases the build size. For example, core-metadata increases from 14MB to 21MB, core-command increases from 9.8MB to 17MB, device-virtual increases from 18MB to 31MB, and app-service-configurable increases from 22Mb to 34MB. As many edge user scenarios require to deploy EdgeX services on resource-constrained devices without security, allowing that the services can be built without OpenZiti packages and ZeroTrust features can be helpful to user cases which don't need zero trust feature. This commit refactors the codes importing openziti packages with //go:build !no_openziti directive and creates para codes that don't use openziti packages with //go:build no_openziti directive, so users can simply build services by specifying no_openziti tag. Also remove vestigal zc variables and ZitiContext struct per discussion with https://github.com/dovholuknf in edgexfoundry#659 (comment) Signed-off-by: Jude Hung <jude@iotechsys.com>
cloudxxx8
pushed a commit
that referenced
this issue
Nov 19, 2024
* feat: Add new go build tag no_openziti to reduce build size closes #789 The usage of OpenZiti packages to support zero trust feature significantly increases the build size. For example, core-metadata increases from 14MB to 21MB, core-command increases from 9.8MB to 17MB, device-virtual increases from 18MB to 31MB, and app-service-configurable increases from 22Mb to 34MB. As many edge user scenarios require to deploy EdgeX services on resource-constrained devices without security, allowing that the services can be built without OpenZiti packages and ZeroTrust features can be helpful to user cases which don't need zero trust feature. This commit refactors the codes importing openziti packages with //go:build !no_openziti directive and creates para codes that don't use openziti packages with //go:build no_openziti directive, so users can simply build services by specifying no_openziti tag. Also remove vestigal zc variables and ZitiContext struct per discussion with https://github.com/dovholuknf in #659 (comment) Signed-off-by: Jude Hung <jude@iotechsys.com> * feat: rename the zerotrust_no_ziti.go to no_ziti.go Signed-off-by: Jude Hung <jude@iotechsys.com> --------- Signed-off-by: Jude Hung <jude@iotechsys.com>
github-project-automation
bot
moved this from QA/Code Review
to Odessa Done
in Technical WG
Nov 19, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
🚀 Feature Request
Relevant Package [REQUIRED]
This feature request is for all services using go-mod-bootstrap.Description [REQUIRED]
The usage of OpenZiti packages to support zero trust feature significantly increases the binary build size. For example, core-metadata increases from 14MB to 21MB, core-command increases from 9.8MB to 17MB, device-virtual increases from 18MB to 31MB, and app-service-configurable increases from 22Mb to 34MB. As many edge user scenarios require to deploy EdgeX services on resource-constrained devices, allowing that the services can be built without OpenZiti packages and ZeroTrust features can be helpful to user cases which don't need zero trust feature.Describe the solution you'd like
Add go build tags no_openziti for excluding the openziti libs from build. This requires some code refactoring to separate the OpenZiti library invocation and a dummy implementation if desired.Describe alternatives you've considered
NoneThe text was updated successfully, but these errors were encountered: