Kubebuilder: Designing an API

Posted by Sungguk's lab on April 24, 2021

Recently I started a project using kubebuilder.

Designing an API document is a MUST READ before staring writing code.

Link: https://book.kubebuilder.io/cronjob-tutorial/api-design.html

  • Use camelCase for json serialized field.

For example, ```go

type FooSpec type { CamelCaseVariable int json:camelCaseVariable }

  • For numbers, use int32 or int64. For decimals, use resource.Quantity