Merge pull request #49321 from dgoodwin/export-wiring
Automatic merge from submit-queue (batch tested with PRs 49615, 49321, 49982, 49788, 50355) Fix unused Secret export logic. **What this PR does / why we need it**: The strategy used for the secret store defined custom export logic, and had accompanying unit tests. However the secret storage did not actually wire this up by setting an ExportStrategy and thus the code was never used in the real world. This change fixes the missing assignment and adds testing at a higher level to ensure any uses of the generic registry.Store that we expect to have an ExportStrategy do, and no others. Several other strategies in the RBAC package also appeared to have unwired Export logic, however their implementations were all empty leading me to believe that these are not considered exportable. The empty methods have now been removed. **Which issue this PR fixes**: fixes #49042 **Release note**: ```release-note ```
This commit is contained in:
@@ -42,6 +42,7 @@ func NewREST(optsGetter generic.RESTOptionsGetter) *REST {
|
||||
CreateStrategy: secret.Strategy,
|
||||
UpdateStrategy: secret.Strategy,
|
||||
DeleteStrategy: secret.Strategy,
|
||||
ExportStrategy: secret.Strategy,
|
||||
}
|
||||
options := &generic.StoreOptions{RESTOptions: optsGetter, AttrFunc: secret.GetAttrs}
|
||||
if err := store.CompleteWithOptions(options); err != nil {
|
||||
|
Reference in New Issue
Block a user