(cluster *apiv1.Cluster)
| 515 | } |
| 516 | |
| 517 | func managedRolesSecrets(cluster *apiv1.Cluster) []string { |
| 518 | if cluster.Spec.Managed == nil { |
| 519 | return nil |
| 520 | } |
| 521 | managedRoles := cluster.Spec.Managed.Roles |
| 522 | if len(managedRoles) == 0 { |
| 523 | return nil |
| 524 | } |
| 525 | secretNames := make([]string, 0, len(managedRoles)) |
| 526 | for _, role := range managedRoles { |
| 527 | if role.DisablePassword || role.PasswordSecret == nil { |
| 528 | continue |
| 529 | } |
| 530 | secretName := role.PasswordSecret.Name |
| 531 | if secretName != "" { |
| 532 | secretNames = append(secretNames, secretName) |
| 533 | } |
| 534 | } |
| 535 | |
| 536 | return secretNames |
| 537 | } |
| 538 | |
| 539 | func customResourceRolesSecrets(roles []apiv1.DatabaseRole) []string { |
| 540 | result := make([]string, 0, len(roles)) |
no outgoing calls
no test coverage detected