Skip to content

Commit

Permalink
fix: golangci-lint violations
Browse files Browse the repository at this point in the history
Signed-off-by: Anurag Rajawat <[email protected]>
  • Loading branch information
anurag-rajawat committed Dec 3, 2023
1 parent 254e5c2 commit f4faa35
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions controllers/policy/network_policy.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit f4faa35

Please sign in to comment.