3 ms·
The schema is defined as a Protocol Buffer (https://developers.google.com/protocol-buffers/ https://developers.google.com/protocol-buffers/) package. This lets
by jmillikin 8y ago
The schema is defined as a Protocol Buffer (https://developers.google.com/protocol-buffers/ https://developers.google.com/protocol-buffers/) package. This lets us construct values protobuf-based APIs without having to manually copy over the schema.
For example, if you had this schema:
package my.example.schema;
message Person {
string name = 1;
int32 id = 2;
string email = 3;
}
Then you could build a value using Skycfg like this:
pb = proto.package("my.example.schema")
msg = pb.Person(
id = 1234,
name = "Jane Doe",
email = "jdoe@example.com",
)
print(msg)
For Kubernetes, we're using the schema at https://github.com/kubernetes/api https://github.com/kubernetes/api and for Envoy we use https://github.com/envoyproxy/data-plane-api/tree/master/envoy https://github.com/envoyproxy/data-plane-api/tree/master/env...