Make ResourceList follow k8s api conventions

Make optional fields as pointers.
Add omitempty for optional fields.
This commit is contained in:
Mengqi Yu
2021-11-08 21:35:49 -08:00
parent 37ab5579f0
commit 374d790a21
4 changed files with 35 additions and 25 deletions

View File

@@ -322,11 +322,11 @@ func ExampleBuild_validate() {
validationResults = append(validationResults, &framework.Result{
Severity: framework.Error,
Message: "field is required",
ResourceRef: yaml.ResourceIdentifier{
ResourceRef: &yaml.ResourceIdentifier{
TypeMeta: meta.TypeMeta,
NameMeta: meta.ObjectMeta.NameMeta,
},
Field: framework.Field{
Field: &framework.Field{
Path: "spec.replicas",
ProposedValue: "1",
},