Skip to content

Commit 55c5581

Browse files
authored
deploy permissions for deploymentruntimeconfigs even when protection is disabled (#38)
1 parent fb6fbb0 commit 55c5581

File tree

1 file changed

+7
-10
lines changed

1 file changed

+7
-10
lines changed

pkg/controlplane/components/crossplane_component.go

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import (
99
helmv2 "github.com/fluxcd/helm-controller/api/v2"
1010
sourcev1 "github.com/fluxcd/source-controller/api/v1"
1111
"github.com/openmcp-project/control-plane-operator/api/v1beta1"
12-
"github.com/openmcp-project/control-plane-operator/cmd/options"
1312
"github.com/openmcp-project/control-plane-operator/pkg/juggler"
1413
"github.com/openmcp-project/control-plane-operator/pkg/juggler/fluxcd"
1514
"github.com/openmcp-project/control-plane-operator/pkg/juggler/hooks"
@@ -82,15 +81,13 @@ func (c *Crossplane) GetPolicyRules() PolicyRules {
8281
},
8382
}
8483

85-
if options.IsDeploymentRuntimeConfigProtectionEnabled() {
86-
rules.Admin = append(rules.Admin, rbacv1.PolicyRule{
87-
APIGroups: []string{"pkg.crossplane.io"},
88-
Resources: []string{
89-
"deploymentruntimeconfigs",
90-
},
91-
Verbs: VerbsModify,
92-
})
93-
}
84+
rules.Admin = append(rules.Admin, rbacv1.PolicyRule{
85+
APIGroups: []string{"pkg.crossplane.io"},
86+
Resources: []string{
87+
"deploymentruntimeconfigs",
88+
},
89+
Verbs: VerbsModify,
90+
})
9491

9592
return rules
9693
}

0 commit comments

Comments
 (0)