Skip to content

Commit

Permalink
fix: use a different name for ClusterAdmissionpolicyGroup unique name…
Browse files Browse the repository at this point in the history
… to avoid conflicts in the PolicyServer ConfigMap

Signed-off-by: Fabrizio Sestito <[email protected]>
  • Loading branch information
fabriziosestito committed Sep 18, 2024
1 parent 5c7cf92 commit 0a76443
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion api/policies/v1/admissionpolicygroup_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ func (r *AdmissionPolicyGroup) GetPolicyServer() string {
}

func (r *AdmissionPolicyGroup) GetUniqueName() string {
return "namespacedpolicygroup-" + r.Namespace + "-" + r.Name
return "namespaced-group-" + r.Namespace + "-" + r.Name

Check warning on line 176 in api/policies/v1/admissionpolicygroup_types.go

View check run for this annotation

Codecov / codecov/patch

api/policies/v1/admissionpolicygroup_types.go#L176

Added line #L176 was not covered by tests
}

func (r *AdmissionPolicyGroup) GetContextAwareResources() []ContextAwareResource {
Expand Down
2 changes: 1 addition & 1 deletion api/policies/v1/clusteradmissionpolicygroup_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ func (r *ClusterAdmissionPolicyGroup) GetPolicyServer() string {
}

func (r *ClusterAdmissionPolicyGroup) GetUniqueName() string {
return "clusterwide-" + r.Name
return "clusterwide-group-" + r.Name

Check warning on line 212 in api/policies/v1/clusteradmissionpolicygroup_types.go

View check run for this annotation

Codecov / codecov/patch

api/policies/v1/clusteradmissionpolicygroup_types.go#L212

Added line #L212 was not covered by tests
}

func (r *ClusterAdmissionPolicyGroup) GetContextAwareResources() []ContextAwareResource {
Expand Down

0 comments on commit 0a76443

Please sign in to comment.