示例#1
0
func addConversionFuncs(scheme *runtime.Scheme) {
	if err := scheme.AddFieldLabelConversionFunc("v1", "Application",
		oapi.GetFieldLabelConversionFunc(api.ApplicationToSelectableFields(&api.Application{}), nil),
	); err != nil {
		panic(err)
	}
}
示例#2
0
func getAttrs(obj runtime.Object) (objLabels labels.Set, objFields fields.Set, err error) {
	app := obj.(*api.Application)
	return labels.Set(app.Labels), api.ApplicationToSelectableFields(app), nil
}