-
Notifications
You must be signed in to change notification settings - Fork 53
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
How to work with k8s CRDs #70
Comments
I haven’t tested it yet but If CRD provides openapi definitions you can
generate proto representations using google gnostic tool -
https://github.com/googleapis/gnostic-go-generator/blob/master/README.md
After that it should work the same way.
…On Sat, Jan 4, 2020 at 5:34 PM Leopold Schabel ***@***.***> wrote:
What's the right approach dealing with k8s CRDs in skycfg? Those are
becoming increasingly common. cuelang solves this by having an intermediary
typing language that can consume both Go structs and protobufs, such that
it can validate either.
As far as I can tell, CRDs are only specified as jsonapi schemas and no
protobuf schemas are generated.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#70?email_source=notifications&email_token=AAF3KADN6URXUW5NFQSJ47TQ4CM7ZA5CNFSM4KCWKZDKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4IEAPXRA>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAF3KAEPB7V6QK5HB4K4YKTQ4CM7ZANCNFSM4KCWKZDA>
.
|
How would one use On https://skycfg.fun, this does not work:
|
You can’t. Main needs to return proto wrapped into skyProtoMessage (there’s
a helper for that).
…On Sat, Jan 4, 2020 at 7:27 PM Leopold Schabel ***@***.***> wrote:
How would one use struct objects for untyped objects?
On https://skycfg.fun, this does not work:
def main(ctx):
return [struct()]
`main' returned something that's not a protobuf (a struct)
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#70?email_source=notifications&email_token=AAF3KAACBD4R6CGBARTUFADQ4C2FZA5CNFSM4KCWKZDKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEIC3FEQ#issuecomment-570798738>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAF3KACKSLUWRNMYZ3BAQVLQ4C2FZANCNFSM4KCWKZDA>
.
|
Do you know what Protobuf type Kubernetes is expecting to receive for a CRD? If it's something like |
It appears that the k8s protobuf API does not support CRDs at all |
Correct, you have render them as json. Maybe that’ll change when go proto
v2 is out
…On Mon, Jan 6, 2020 at 4:28 PM Leopold Schabel ***@***.***> wrote:
It appears that the k8s protobuf API does not support CRDs at all
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#70?email_source=notifications&email_token=AAF3KAF5HYLJN7GF3ORMCG3Q4MWYBA5CNFSM4KCWKZDKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEIFOALQ#issuecomment-571138094>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAF3KACWOPQBB4WCJV7IBBDQ4MWYBANCNFSM4KCWKZDA>
.
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What's the right approach dealing with k8s CRDs in skycfg? Those are becoming increasingly common. cuelang solves this by having an intermediary typing language that can consume both Go structs and protobufs, such that it can validate either.
As far as I can tell, CRDs are only specified as jsonapi schemas and no protobuf schemas are generated.
The text was updated successfully, but these errors were encountered: