-
Notifications
You must be signed in to change notification settings - Fork 14
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
refactor: separate deployer into serval api and implement query and scale #165
Conversation
…cale Signed-off-by: sh2 <shawnhxh@outlook.com>
Signed-off-by: sh2 <shawnhxh@outlook.com>
Signed-off-by: sh2 <shawnhxh@outlook.com>
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## develop #165 +/- ##
===========================================
- Coverage 35.80% 34.29% -1.51%
===========================================
Files 12 16 +4
Lines 1430 1522 +92
===========================================
+ Hits 512 522 +10
- Misses 814 893 +79
- Partials 104 107 +3
☔ View full report in Codecov by Sentry. |
Signed-off-by: sh2 <shawnhxh@outlook.com>
What a big PR #_#, let me slow down and have a look. |
I have another abstraction design as the following structs that can be more clean: type Cluster struct { ... }
type ClusterOperation interface {
Create(ctx context.Context, name string, options *CreateOptions) error
Get(ctx context.Context, name string, options *GetOptions) (*Cluster, error)
List(ctx context.Context, options *ListOptions) ([]*Cluster, error)
Update(ctx context.Context, options *UpdateOptions)
Connect(ctx context.Context, options *ConnectOptions)
} We can implement the K8s and bare-metal clusteroption and provide the factory method. For K8s mode, the creation of an etcd cluster and operator can be hidden in For this PR, IMHO:
|
Signed-off-by: sh2 <shawnhxh@outlook.com>
great idea, made some changes, PTAL @zyy17 |
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.
LGTM
related to #160
in the following PR, the
pkg/cmd
,pkg/deployer
,pkg/connector
shall be removed or rewrote.