Documentation
¶
Index ¶
- func AddDerivativePolicyIfNeeded(logger *slog.Logger, clientset client.Clientset, clusterName string, ...)
- func DeleteDerivativeFromCache(cnp *cilium_v2.CiliumNetworkPolicy)
- func UpdateCNPInformation(logger *slog.Logger, clientset client.Clientset, clusterName string)
- func UpdateDerivativePolicyIfNeeded(logger *slog.Logger, clientset client.Clientset, clusterName string, ...) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddDerivativePolicyIfNeeded ¶ added in v1.18.0
func AddDerivativePolicyIfNeeded(logger *slog.Logger, clientset client.Clientset, clusterName string, cnp *cilium_v2.CiliumNetworkPolicy, clusterScoped bool)
AddDerivativePolicyIfNeeded will create a new CNP if the given CNP has any rules that need to create a new derivative policy.
func DeleteDerivativeFromCache ¶
func DeleteDerivativeFromCache(cnp *cilium_v2.CiliumNetworkPolicy)
DeleteDerivativeFromCache deletes the given CNP from the groupsCNPCache to no continue pooling new data.
func UpdateCNPInformation ¶
UpdateCNPInformation retrieves all the CNP that has currently a derivative policy and creates the new derivatives policies with the latest information from providers. To avoid issues with rate-limiting this function will execute the addDerivative function with a max number of concurrent calls, defined on maxConcurrentUpdates.
func UpdateDerivativePolicyIfNeeded ¶ added in v1.18.0
func UpdateDerivativePolicyIfNeeded(logger *slog.Logger, clientset client.Clientset, clusterName string, newCNP *cilium_v2.CiliumNetworkPolicy, oldCNP *cilium_v2.CiliumNetworkPolicy, clusterScoped bool) bool
UpdateDerivativePolicyIfNeeded updates or creates a CNP if the given CNP has any rule that needs to create a new derivative policy(eg: ToGroups). In case that the new CNP does not have any derivative policy and the old one had one, it will delete the old policy. The function returns true if an update is required for the derivative policy and false otherwise.
Types ¶
This section is empty.