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

How to work with k8s CRDs #70

Open
leoluk opened this issue Jan 4, 2020 · 6 comments
Open

How to work with k8s CRDs #70

leoluk opened this issue Jan 4, 2020 · 6 comments

Comments

@leoluk
Copy link

leoluk commented Jan 4, 2020

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.

@dilyevsky
Copy link
Contributor

dilyevsky commented Jan 4, 2020 via email

@leoluk
Copy link
Author

leoluk commented Jan 4, 2020

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)

@dilyevsky
Copy link
Contributor

dilyevsky commented Jan 4, 2020 via email

@jmillikin-stripe
Copy link
Contributor

Do you know what Protobuf type Kubernetes is expecting to receive for a CRD? If it's something like google.protobuf.Struct then you can construct those directly in Skycfg using normal idioms.

@leoluk
Copy link
Author

leoluk commented Jan 6, 2020

It appears that the k8s protobuf API does not support CRDs at all

@dilyevsky
Copy link
Contributor

dilyevsky commented Jan 6, 2020 via email

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

No branches or pull requests

3 participants