argoproj-labs / argo-rollouts-manager

Kubernetes Operator for Argo Rollouts controller.
https://argo-rollouts-manager.readthedocs.io/en/latest/
Apache License 2.0
100 stars 329 forks source link

Proposal to restructure the controllers package #3

Closed jaideepr97 closed 5 months ago

jaideepr97 commented 1 year ago

I think it would be beneficial to consider a segmented package structure for the existing controllers package, in a way that would make the code more organized and abstracted by generally defined verticals. This could also help us define meaningful interfaces for subpackages and allow for greater maintainability of the code base going forwards

An initial idea for what the new package structure could look like:

└── Controllers/
    ├── Rollouts/
    │   ├── argorollouts_controller.go
    │   └── status.go
    ├── Workloads/
    │   ├── deployments.go
    │   ├── secrets.go
    │   ├── config.go
    │   ├── ...
    │   └── utils.go
    ├── Networking/
    │   ├── service.go
    │   ├── ingress.go
    │   ├── route.go
    │   ├── ...
    │   └── utils.go
    ├── RBAC/
    │   ├── role.go
    │   ├── rolebinding.go
    │   ├── serviceaccount.go
    │   ├── ...
    │   └── utils.go
    ├── Common/
    │   └── default.go
    ├── Testing/
    │   └── testing.go
    └── Utility/
        └── utils.go

As a part of this I would propose to include the following changes: