-
Notifications
You must be signed in to change notification settings - Fork 290
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
Conversation
fd9b252
to
5c5697c
Compare
Codecov Report
📣 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
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
internal/cmd/egctl/testdata/out/from-gateway-api-to-xds.json.out
Outdated
Show resolved
Hide resolved
} | ||
case "cluster": | ||
for _, config := range globalConfigs.Configs { | ||
if config.GetTypeUrl() == "type.googleapis.com/envoy.admin.v3.ClustersConfigDump" { |
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.
any magic constants for these in go-contol-plane
?
cc3f8bd
to
0190c66
Compare
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()) |
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.
--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
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 thanks !
Resolved: #1055