1. update clientset, deepcopy using code-generator

2. add a dummy file tools.go to force "go mod vendor" to see
code-generator as dependencies
3. add a script to update CRD
4. add a README to document CRD updating steps
run go mod tidy
update README
This commit is contained in:
xiangqian
2019-12-03 01:22:21 -08:00
parent 90533183e4
commit 728e29aa7e
1128 changed files with 167705 additions and 5135 deletions

View File

@@ -258,7 +258,7 @@ func ResetObjectMetaForStatus(meta, existingMeta Object) {
// MarshalJSON implements json.Marshaler
// MarshalJSON may get called on pointers or values, so implement MarshalJSON on value.
// http://stackoverflow.com/questions/21390979/custom-marshaljson-never-gets-called-in-go
func (f Fields) MarshalJSON() ([]byte, error) {
func (f FieldsV1) MarshalJSON() ([]byte, error) {
if f.Raw == nil {
return []byte("null"), nil
}
@@ -266,7 +266,7 @@ func (f Fields) MarshalJSON() ([]byte, error) {
}
// UnmarshalJSON implements json.Unmarshaler
func (f *Fields) UnmarshalJSON(b []byte) error {
func (f *FieldsV1) UnmarshalJSON(b []byte) error {
if f == nil {
return errors.New("metav1.Fields: UnmarshalJSON on nil pointer")
}
@@ -276,5 +276,5 @@ func (f *Fields) UnmarshalJSON(b []byte) error {
return nil
}
var _ json.Marshaler = Fields{}
var _ json.Unmarshaler = &Fields{}
var _ json.Marshaler = FieldsV1{}
var _ json.Unmarshaler = &FieldsV1{}