-
Notifications
You must be signed in to change notification settings - Fork 129
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
feat: deploy konnect via main deck command #645
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #645 +/- ##
==========================================
- Coverage 45.61% 44.57% -1.05%
==========================================
Files 74 74
Lines 8536 8738 +202
==========================================
+ Hits 3894 3895 +1
- Misses 4283 4482 +199
- Partials 359 361 +2 ☔ View full report in Codecov by Sentry. |
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.
Looks good. Please merge after the changes.
utils/analytics.go
Outdated
if mode == konnectMode { | ||
result["mode"] = mode | ||
} | ||
if kongVersion != "" || mode != konnectMode { |
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.
if kongVersion != "" || mode != konnectMode { | |
if kongVersion != "" && mode != konnectMode { |
-----END CERTIFICATE----- | ||
cert_digest: b865971cecadd7bac9487901c9269c1fa903b3a3b521a927c5e2513f692ac61e | ||
cert_digest: 34e0f1f3d83faefcc8514b6295bc822eab1110dc120140ddf342c017baee8c0f |
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.
Unrelated change, please send another PR.
konnect/login_service.go
Outdated
} | ||
req, err := s.client.NewRequest(http.MethodPost, authEndpointV2, nil, body) | ||
if err != nil { | ||
return AuthResponse{}, err |
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.
return AuthResponse{}, err | |
return AuthResponse{}, fmt.Errorf("build http request: %v", err) |
konnect/login_service.go
Outdated
var authResponse AuthResponse | ||
resp, err := s.client.Do(ctx, req, &authResponse) | ||
if err != nil { | ||
return AuthResponse{}, err |
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.
return AuthResponse{}, err | |
return AuthResponse{}, fmt.Errorf("authenticate http request: %v", err) |
if err != nil { | ||
return AuthResponse{}, err | ||
} | ||
url, _ := url.Parse(s.client.baseURL) |
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.
Please handle error.
konnect/login_service.go
Outdated
|
||
info, err := s.UserInfo(ctx) | ||
if err != nil { | ||
return AuthResponse{}, err |
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.
return AuthResponse{}, err | |
return AuthResponse{}, fmt.Errorf("fetch user-info: %v", err) |
@@ -78,6 +78,9 @@ func Get(ctx context.Context, fileContent *Content, opt RenderConfig, dumpConfig | |||
builder.client = wsClient | |||
builder.ctx = ctx | |||
builder.skipCACerts = dumpConfig.SkipCACerts | |||
if dumpConfig.KonnectRuntimeGroup != "" { | |||
builder.disableDynamicDefaults = true |
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.
Add a comment explaining why
cmd/ping.go
Outdated
return fmt.Errorf("reading Kong version: %w", err) | ||
} | ||
fmt.Println("Successfully connected to Kong!") | ||
fmt.Println("Kong version: ", version) |
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.
Can you break into two functions? pingKonnect and pingKong?
Please avoid long functions.
No description provided.