Skip to content
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: make egctl x translate output struct #1066

Merged
merged 1 commit into from
Feb 23, 2023

Conversation

Xunzhuo
Copy link
Member

@Xunzhuo Xunzhuo commented Feb 21, 2023

Resolved: #1055

@Xunzhuo Xunzhuo force-pushed the feat-x-cmd branch 4 times, most recently from fd9b252 to 5c5697c Compare February 22, 2023 08:35
@codecov-commenter
Copy link

codecov-commenter commented Feb 22, 2023

Codecov Report

Merging #1066 (cc3f8bd) into main (b97859d) will decrease coverage by 0.33%.
The diff coverage is 53.94%.

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

@@            Coverage Diff             @@
##             main    #1066      +/-   ##
==========================================
- Coverage   64.29%   63.97%   -0.33%     
==========================================
  Files          70       70              
  Lines        9032     9154     +122     
==========================================
+ Hits         5807     5856      +49     
- Misses       2829     2891      +62     
- Partials      396      407      +11     
Impacted Files Coverage Δ
internal/cmd/egctl/version.go 0.00% <0.00%> (ø)
internal/cmd/egctl/translate.go 60.36% <54.30%> (-6.62%) ⬇️
internal/provider/kubernetes/helpers.go 80.40% <0.00%> (-2.71%) ⬇️
internal/provider/kubernetes/controller.go 50.90% <0.00%> (-0.34%) ⬇️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

}
case "cluster":
for _, config := range globalConfigs.Configs {
if config.GetTypeUrl() == "type.googleapis.com/envoy.admin.v3.ClustersConfigDump" {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

any magic constants for these in go-contol-plane ?

@Xunzhuo Xunzhuo force-pushed the feat-x-cmd branch 2 times, most recently from cc3f8bd to 0190c66 Compare February 23, 2023 02:52
Signed-off-by: bitliu <bitliu@tencent.com>
@@ -55,6 +58,8 @@ func NewTranslateCommand() *cobra.Command {
}
translateCommand.PersistentFlags().StringVarP(&inType, "from", "", gatewayAPIType, getValidInputTypesStr())
translateCommand.PersistentFlags().StringVarP(&outType, "to", "", xdsType, getValidOutputTypesStr())
translateCommand.PersistentFlags().StringVarP(&output, "output", "o", yamlOutput, "One of 'yaml' or 'json'")
translateCommand.PersistentFlags().StringVarP(&resourceType, "type", "t", string(AllEnvoyConfigType), getValidResourceTypesStr())
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

--type here is tied to --to, currently it only represent xds type, it might need to be removed in the future or reframed to output types and then list out all valid types per output

Copy link
Contributor

@arkodg arkodg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM thanks !

@arkodg arkodg merged commit dbc89fd into envoyproxy:main Feb 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

make the output of egctl x translate structured
4 participants