Skip to content

Add CiliumNetworkPolicies similar to NetworkPolicies

Zamir Martins requested to merge add_cilium_network_policy into master

What does this MR do?

Extract common code into a superclass and add the new model similarly to NetworkPolicies. Respective services and controller have also been updated as the following:

  • Non-specific NetworkPolicy code got extracted into NetworkPolicyCommon which became a superclass to both the existing NetworkPolicy and the new CiliumNetworkPolicy.

  • NetworkPoliciesController got update to handle CiliumNetworkPolicy based on is_standard parameter

  • Related services got updated to handle CiliumNetworkPolicy from both is_standard parameter and through standard? as defined in NetworkPolicyCommon.

  • Changes required in kube client are in this MR.

Breaking into smaller pieces is going to fail the specs.

Related issue: #223623 (closed)

Depends on: !37526 (merged)

Conformity

Availability and Testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team
Edited by Zamir Martins

Merge request reports