Skip to content

Commit

Permalink
[CODE REVIEW] Watch linseed policy for multi-tenant
Browse files Browse the repository at this point in the history
  • Loading branch information
asincu committed Dec 15, 2023
1 parent 56356fa commit 28b7d75
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions pkg/controller/logstorage/esmetrics/esmetrics_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import (

v3 "github.com/tigera/api/pkg/apis/projectcalico/v3"
"github.com/tigera/operator/pkg/render/common/networkpolicy"
"github.com/tigera/operator/pkg/render/logstorage/linseed"
"k8s.io/apimachinery/pkg/types"
"k8s.io/client-go/kubernetes"

Expand Down Expand Up @@ -122,7 +121,7 @@ func Add(mgr manager.Manager, opts options.AddOptions) error {

go utils.WaitToAddTierWatch(networkpolicy.TigeraComponentTierName, c, k8sClient, log, r.tierWatchReady)
go utils.WaitToAddNetworkPolicyWatches(c, k8sClient, log, []types.NamespacedName{
{Name: linseed.PolicyName, Namespace: render.ElasticsearchNamespace},
{Name: esmetrics.ElasticsearchMetricsPolicyName, Namespace: render.ElasticsearchNamespace},
})

return nil
Expand Down
2 changes: 1 addition & 1 deletion pkg/controller/logstorage/linseed/linseed_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ func Add(mgr manager.Manager, opts options.AddOptions) error {

go utils.WaitToAddTierWatch(networkpolicy.TigeraComponentTierName, c, k8sClient, log, r.tierWatchReady)
go utils.WaitToAddNetworkPolicyWatches(c, k8sClient, log, []types.NamespacedName{
{Name: linseed.PolicyName, Namespace: render.ElasticsearchNamespace},
{Name: linseed.PolicyName, Namespace: helper.InstallNamespace()},
})
go utils.WaitToAddResourceWatch(c, k8sClient, log, r.dpiAPIReady, []client.Object{&v3.DeepPacketInspection{TypeMeta: metav1.TypeMeta{Kind: v3.KindDeepPacketInspection}}})

Expand Down

0 comments on commit 28b7d75

Please sign in to comment.