-
Notifications
You must be signed in to change notification settings - Fork 174
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
Make Zarf a Library #934
Make Zarf a Library #934
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
small things and qs
…-package-library-wip"
Only parse through requested components if components were actually requested
Assuming tests still pass I am good with this now (there will be lots of cleanup though so I would argue we should give it a little time to soak on |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔙 ✋
This PR changes the behavior of the internal Zarf Registry to behave correctly on mulit-node clusters with storage (a change in v0.22.x made this unstable). Change list: - Use [Pod Affinity](https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#an-example-of-a-pod-that-uses-pod-affinity) to force pods onto the same node for proper upgrades/restarts - Add K8s [HPA](https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/) to increase performance of image pushes - Add [Priority Classes](https://kubernetes.io/docs/concepts/scheduling-eviction/pod-priority-preemption/#priorityclass) to the Zarf Agent and Zarf Registry deployments - Add [Pod Disruption Budget](https://kubernetes.io/docs/concepts/workloads/pods/disruptions/#pod-disruption-budgets) for the Zarf Registry - Add Zarf variables to support custom registry resources requests/limits, custom PVC size, and alternatively the use of a custom PVC - Move the Zarf Registry chart to a local chart - Fix a small issue with log files not being properly saved for K3s workflows - Fix issue from #934 with cross-platform commands - Remove makefile config overrides and replace with `zarf-config.toml` Fixes #1004 Related to #1062
This PR is a major refactor of the zarf code base primarily designed around better structure to support the current Zarf API as well as expose some key portions of Zarf as an SDK for other tools to consume. This major refactor came out of growing API needs as well as needs in #892 and the [zarf-controller](https://github.com/defenseunicorns/zarf-controller) prototype. Major changes: - Migrate all global configs used by the packager into [receiver methods](https://medium.com/globant/go-method-receiver-pointer-vs-value-ffc5ab7acdb) to avoid concurrency issues - Migrate from heavy `fatal` use to conventional error bubbling / wrapping - Expose core packager code as `github.com/defenseunicorns/zarf/src/pkg/packager` - Split the k8s package into `github.com/defenseunicorns/zarf/src/pkg/k8s` (external) and `src/internal/cluster` (internal) - Expose `message`, `pki`, and `utils` as `github.com/defenseunicorns/zarf/src/pkg/*` - Move the remaining `src/internal/*` packages (except for `agent` & `api`) into `src/internal/packager/*` - Change K8s connections to a reusable connection, except for `cluster.Tunnel` - Switch to Revive for linting - Introduce language file and establish basic patterns, related to #631 - Add SPDX headers to all files - Begin work to standardize on the [Uber Go Style Guide](https://github.com/uber-go/guide/blob/master/style.md) - Address a lot of lint issues - Return confirm yaml display to only show populated values Co-authored-by: Jon Perry <[email protected]> Co-authored-by: Wayne Starr <[email protected]>
This PR changes the behavior of the internal Zarf Registry to behave correctly on mulit-node clusters with storage (a change in v0.22.x made this unstable). Change list: - Use [Pod Affinity](https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#an-example-of-a-pod-that-uses-pod-affinity) to force pods onto the same node for proper upgrades/restarts - Add K8s [HPA](https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/) to increase performance of image pushes - Add [Priority Classes](https://kubernetes.io/docs/concepts/scheduling-eviction/pod-priority-preemption/#priorityclass) to the Zarf Agent and Zarf Registry deployments - Add [Pod Disruption Budget](https://kubernetes.io/docs/concepts/workloads/pods/disruptions/#pod-disruption-budgets) for the Zarf Registry - Add Zarf variables to support custom registry resources requests/limits, custom PVC size, and alternatively the use of a custom PVC - Move the Zarf Registry chart to a local chart - Fix a small issue with log files not being properly saved for K3s workflows - Fix issue from #934 with cross-platform commands - Remove makefile config overrides and replace with `zarf-config.toml` Fixes #1004 Related to #1062
This PR is a major refactor of the zarf code base primarily designed around better structure to support the current Zarf API as well as expose some key portions of Zarf as an SDK for other tools to consume. This major refactor came out of growing API needs as well as needs in #892 and the zarf-controller prototype.
Major changes:
fatal
use to conventional error bubbling / wrappinggithub.com/defenseunicorns/zarf/src/pkg/packager
github.com/defenseunicorns/zarf/src/pkg/k8s
(external) andsrc/internal/cluster
(internal)message
,pki
, andutils
asgithub.com/defenseunicorns/zarf/src/pkg/*
src/internal/*
packages (except foragent
&api
) intosrc/internal/packager/*
cluster.Tunnel