From f4faa3567a433c3ab2a1cb2bc044f4b8919f30af Mon Sep 17 00:00:00 2001 From: Anurag Rajawat Date: Sun, 3 Dec 2023 19:30:57 +0530 Subject: [PATCH] fix: golangci-lint violations Signed-off-by: Anurag Rajawat --- controllers/policy/network_policy.go | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/controllers/policy/network_policy.go b/controllers/policy/network_policy.go index 7cf06683..897bab7a 100644 --- a/controllers/policy/network_policy.go +++ b/controllers/policy/network_policy.go @@ -84,21 +84,6 @@ func (npc *NetworkPolicyController) DeletePolicy(ctx context.Context, intent *in } // Additional helper functions for policy creation and deletion. -func createCiliumNetworkPolicy(ctx context.Context, intent *intentv1.SecurityIntent) *ciliumv2.CiliumNetworkPolicy { - return utils.BuildCiliumNetworkPolicySpec(ctx, intent).(*ciliumv2.CiliumNetworkPolicy) -} - -func createKubeArmorNetworkPolicy(ctx context.Context, intent *intentv1.SecurityIntent) *kubearmorpolicyv1.KubeArmorPolicy { - return utils.BuildKubeArmorPolicySpec(ctx, intent, "policy").(*kubearmorpolicyv1.KubeArmorPolicy) -} - -func applyCiliumNetworkPolicy(ctx context.Context, c client.Client, policy *ciliumv2.CiliumNetworkPolicy) { - utils.ApplyOrUpdatePolicy(ctx, c, policy, policy.Name) -} - -func applyKubeArmorNetworkPolicy(ctx context.Context, c client.Client, policy *kubearmorpolicyv1.KubeArmorPolicy) { - utils.ApplyOrUpdatePolicy(ctx, c, policy, policy.Name) -} // containsProtocolResource checks for the presence of protocol resources in SecurityIntent. func containsProtocolResource(intent *intentv1.SecurityIntent) bool {