Convert Secret registry to use update/create strategy, allow filtering by Type

This commit is contained in:
Jordan Liggitt
2015-04-27 23:50:56 -04:00
parent c2a78483b4
commit ac67fff1cf
14 changed files with 391 additions and 524 deletions

View File

@@ -2807,4 +2807,17 @@ func init() {
// If one of the conversion functions is malformed, detect it immediately.
panic(err)
}
err = newer.Scheme.AddFieldLabelConversionFunc("v1beta3", "Secret",
func(label, value string) (string, string, error) {
switch label {
case "type":
return label, value, nil
default:
return "", "", fmt.Errorf("field label not supported: %s", label)
}
})
if err != nil {
// If one of the conversion functions is malformed, detect it immediately.
panic(err)
}
}