mirror of
https://github.com/cloudnative-pg/plugin-barman-cloud.git
synced 2026-07-09 11:12:21 +02:00
Merge bdf568f48f into 4bbaf18cd3
This commit is contained in:
commit
1b0b626ede
@ -124,6 +124,10 @@ func ObjectStoreNamesFromRole(role *rbacv1.Role) []string {
|
||||
func BuildRoleBinding(
|
||||
cluster *cnpgv1.Cluster,
|
||||
) *rbacv1.RoleBinding {
|
||||
clusterServiceAccountName := cluster.Name
|
||||
if cluster.Spec.ServiceAccountName != "" {
|
||||
clusterServiceAccountName = cluster.Spec.ServiceAccountName
|
||||
}
|
||||
return &rbacv1.RoleBinding{
|
||||
ObjectMeta: metav1.ObjectMeta{
|
||||
Namespace: cluster.Namespace,
|
||||
@ -134,7 +138,7 @@ func BuildRoleBinding(
|
||||
{
|
||||
Kind: "ServiceAccount",
|
||||
APIGroup: "",
|
||||
Name: cluster.Name,
|
||||
Name: clusterServiceAccountName,
|
||||
Namespace: cluster.Namespace,
|
||||
},
|
||||
},
|
||||
|
||||
Loading…
Reference in New Issue
Block a user