Add PolicyTypes to NetworkPolicy Spec

Signed-off-by: Christopher M. Luciano <cmluciano@us.ibm.com>
This commit is contained in:
Christopher M. Luciano
2017-08-29 12:26:56 -04:00
parent b03302f905
commit 90b139897e
13 changed files with 669 additions and 7 deletions

View File

@@ -36,5 +36,13 @@ var Funcs = func(codecs runtimeserializer.CodecFactory) []interface{} {
}
}
},
func(np *networking.NetworkPolicy, c fuzz.Continue) {
c.FuzzNoCustom(np) // fuzz self without calling this function again
// TODO: Implement a fuzzer to generate valid keys, values and operators for
// selector requirements.
if len(np.Spec.PolicyTypes) == 0 {
np.Spec.PolicyTypes = []networking.PolicyType{networking.PolicyTypeIngress}
}
},
}
}