• Bridget McErlean's avatar
    Use controller-runtime client to get restic secrets (#3320) · 9dbd238c
    Bridget McErlean authored
    
    
    * Use kubebuilder client for fetching restic secrets
    
    Instead of using a SecretInformer for fetching secrets for restic, use
    the cached client provided by the controller-runtime manager.
    
    In order to use this client, the scheme for Secrets must be added to the
    scheme used by the manager so this is added when creating the manager in
    both the velero and restic servers.
    
    This change also refactors some of the tests to add a shared utility for
    creating a fake controller-runtime client which is now used among all
    tests which use that client. This has been added to ensure that all
    tests use the same client with the same scheme.
    Signed-off-by: default avatarBridget McErlean <bmcerlean@vmware.com>
    
    * Add builder for SecretKeySelector
    Signed-off-by: default avatarBridget McErlean <bmcerlean@vmware.com>
    9dbd238c