Skip to content

Commit

Permalink
Fix missing deletion protection labels for users and grants
Browse files Browse the repository at this point in the history
Signed-off-by: Nicolas Bigler <[email protected]>
  • Loading branch information
TheBigLee committed Nov 13, 2024
1 parent 3bb16ba commit 3dc19fd
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions pkg/crossplane/service_mariadb_database.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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{
Expand Down

0 comments on commit 3dc19fd

Please sign in to comment.