util

package
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 27, 2024 License: Apache-2.0 Imports: 8 Imported by: 8

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtractAnyNimbusPolicyName

func ExtractAnyNimbusPolicyName(policyName string) string

ExtractAnyNimbusPolicyName extracts the actual NimbusPolicy/ClusterNimbusPolicy name from a formatted policy name.

func IsOrphan

func IsOrphan(ownerRefs []metav1.OwnerReference, ownerKind ...string) bool

func UpdateCwnpStatus

func UpdateCwnpStatus(ctx context.Context, k8sClient client.Client, currPolicyFullName, cnpName string, decrement bool) error

UpdateCwnpStatus updates provided ClusterNimbusPolicy status subresource with the number and names of its descendant policies that were created. Every adapter is responsible for updating the status field of the corresponding ClusterNimbusPolicy with the number and names of successfully created policies by calling this API. This provides feedback to users about the translation and deployment of their security intent.

func UpdateNpStatus

func UpdateNpStatus(ctx context.Context, k8sClient client.Client, currPolicyFullName, npName, namespace string, decrement bool) error

UpdateNpStatus updates the provided NimbusPolicy status subresource with the number and names of its descendant policies that were created. Every adapter is responsible for updating the status field of the corresponding NimbusPolicy with the number and names of successfully created policies by calling this API. This provides feedback to users about the translation and deployment of their security intent.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL