Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Prasad Ghangal <prasad.ghangal@gmail.com>
  • Loading branch information
akankshakumari393 and PrasadG193 authored Jun 22, 2021
1 parent 9370325 commit ec74f30
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ type App interface {
Object() crv1alpha1.ObjectReference
// Uninstall deletes an app and all it's components from a Namespace.
Uninstall(context.Context) error
// Get ClusterLevelResources for the app
// GetClusterScopedResources returns the list of cluster scoped k8s resources created during app Install
GetClusterScopedResources(context.Context) []crv1alpha1.ObjectReference
}

Expand Down
5 changes: 5 additions & 0 deletions pkg/app/kafka.go
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ func (kc *KafkaCluster) Install(ctx context.Context, namespace string) error {

func (kc *KafkaCluster) GetClusterScopedResources(ctx context.Context) []crv1alpha1.ObjectReference {
return []crv1alpha1.ObjectReference{
// ClusterRoles
{
APIVersion: "v1",
Group: "rbac.authorization.k8s.io",
Expand Down Expand Up @@ -201,6 +202,8 @@ func (kc *KafkaCluster) GetClusterScopedResources(ctx context.Context) []crv1alp
Name: "strimzi-kafka-broker",
Resource: "clusterroles",
},

// ClusterRoleBindings
{
APIVersion: "v1",
Group: "rbac.authorization.k8s.io",
Expand All @@ -219,6 +222,8 @@ func (kc *KafkaCluster) GetClusterScopedResources(ctx context.Context) []crv1alp
Name: "strimzi-cluster-operator-kafka-client-delegation",
Resource: "clusterrolebindings",
},

// CRDs
{
APIVersion: "v1",
Group: "apiextensions.k8s.io",
Expand Down

0 comments on commit ec74f30

Please sign in to comment.