1
0
Fork 0
mirror of https://github.com/external-secrets/external-secrets.git synced 2024-12-14 11:57:59 +00:00

Add GetNamespacedName to GenericStore interface

This commit is contained in:
Jonatas Baldin 2021-01-07 17:36:25 +01:00
parent 8ee64d918e
commit 88f337386d

View file

@ -15,6 +15,8 @@ limitations under the License.
package v1alpha1
import (
"fmt"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
)
@ -30,6 +32,7 @@ type GenericStore interface {
runtime.Object
metav1.Object
GetProvider() *SecretStoreProvider
GetNamespacedName() string
}
// +kubebuilder:object:root:false
@ -41,6 +44,10 @@ func (c *SecretStore) GetProvider() *SecretStoreProvider {
return c.Spec.Provider
}
func (c *SecretStore) GetNamespacedName() string {
return fmt.Sprintf("%s/%s", c.Namespace, c.Name)
}
// Copy returns a DeepCopy of the Store.
func (c *SecretStore) Copy() GenericStore {
return c.DeepCopy()