diff --git a/pkg/crossplane/service_mariadb_database.go b/pkg/crossplane/service_mariadb_database.go index a507f30..3924266 100644 --- a/pkg/crossplane/service_mariadb_database.go +++ b/pkg/crossplane/service_mariadb_database.go @@ -79,6 +79,7 @@ func (msb MariadbDatabaseServiceBinder) Bind(ctx context.Context, bindingID stri bindingID, msb.instance.ID(), parentRef, + cmp, ) if err != nil { return nil, err @@ -225,15 +226,18 @@ func (msb MariadbDatabaseServiceBinder) ValidateProvisionParams(ctx context.Cont return paramsMap, nil } -func (msb MariadbDatabaseServiceBinder) createBinding(ctx context.Context, bindingID, instanceID, parentReference string) (string, error) { +func (msb MariadbDatabaseServiceBinder) createBinding(ctx context.Context, bindingID, instanceID, parentReference string, c *composite.Unstructured) (string, error) { pw, err := password.Generate() if err != nil { return "", err } labels := map[string]string{ - InstanceIDLabel: instanceID, - ParentIDLabel: parentReference, + InstanceIDLabel: instanceID, + ParentIDLabel: parentReference, + OwnerApiVersionLabel: c.GetLabels()[OwnerApiVersionLabel], + OwnerGroupLabel: c.GetLabels()[OwnerGroupLabel], + OwnerKindLabel: c.GetLabels()[OwnerKindLabel], } secret := &corev1.Secret{