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

Generate Structs for Flags or Output machine-reable description for flags #3924

Closed
kakkoyun opened this issue Mar 12, 2021 · 9 comments
Closed

Comments

@kakkoyun
Copy link
Member

kakkoyun commented Mar 12, 2021

To be able to conveniently generate type-safe configurations for Thanos. This could be utilized by the configuration projects (e.g kube-thanos or similar projects). We would like to have structs that define flags and configuration for Thanos.

Flags could be generated from those structs or structs can be generated from existing flags.
Any change should be seamless to users, we shouldn't change any behaviour.

Any ideas? WDYT?

@thanos-io/thanos-maintainers

related: thanos-io/kube-thanos#184

@brancz
Copy link
Member

brancz commented Mar 12, 2021

Self-describing-binaries is kind of how I see this. I like this idea a lot. I personally think just a json blob that describes the subcommands and flags of those is a really fantastic start. Little can do a lot here I believe.

@kakkoyun
Copy link
Member Author

@brancz Great idea! Having a subcommand to output this would be an amazing convenience. I wonder if something similar already exists?

@roidelapluie
Copy link

Something like /~https://github.com/alecthomas/kong might help you.

@roidelapluie
Copy link

There is also /~https://github.com/bwplotka/flagarize

@kakkoyun
Copy link
Member Author

@bwplotka's gonna kill me how I've forgotten about flagarize 🙈

@kakkoyun kakkoyun changed the title Generate Structs for Flags Generate Structs for Flags or Output machine-reable description for flags Mar 12, 2021
@bwplotka
Copy link
Member

Nah, fllagarize is dead 🙃

I would vote for /~https://github.com/openproto/protoconfig as this was created exactly for this purpose.

@bwplotka
Copy link
Member

I just had chat with @smintz, co-creator of similar project /~https://github.com/protoconf/protoconf, I think we plan to join forces into going for proto based configuration (alongside flags ofc)

@stale
Copy link

stale bot commented Jun 2, 2021

Hello 👋 Looks like there was no activity on this issue for the last two months.
Do you mind updating us on the status? Is this still reproducible or needed? If yes, just comment on this PR or push a commit. Thanks! 🤗
If there will be no activity in the next two weeks, this issue will be closed (we can always reopen an issue if we need!). Alternatively, use remind command if you wish to be reminded at some point in future.

@stale stale bot added the stale label Jun 2, 2021
@stale
Copy link

stale bot commented Jun 16, 2021

Closing for now as promised, let us know if you need this to be reopened! 🤗

@stale stale bot closed this as completed Jun 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants