Documentation
¶
Overview ¶
Package utils implements the utils for vArmor.
Index ¶
- Constants
- func GenerateLeaseUpdatePeriod(kubeClient *kubernetes.Clientset) (time.Duration, time.Duration, time.Duration, error)
- func GenerateStatusUpdateWindow(nodeCount int) time.Duration
- func GetToken() string
- func GinLogger() gin.HandlerFunc
- func HTTPPostAndGetResponseWithRetry(address string, path string, reqBody []byte) ([]byte, error)
- func HTTPSPostWithRetryAndToken(address string, path string, reqBody []byte, inContainer bool) error
- func InNetworksArray(i varmor.NetworkContent, array []varmor.NetworkContent) bool
- func InPortRangeArray(i varmor.Port, array []varmor.Port) bool
- func InStringArray(c string, array []string) bool
- func InUint16Array(i uint16, array []uint16) bool
- func InUint32Array(i uint32, array []uint32) bool
- func InitAndStartTokenRotation(interval time.Duration, logger logr.Logger)
- func IsAppArmorGA(versionInfo *version.Info) (bool, error)
- func IsRequestSizeError(err error) bool
- func RemoveArmorProfileFinalizers(i varmorinterface.CrdV1beta1Interface, namespace, name string) error
- func TagLeaderPod(podInterface corev1.PodInterface, name string) error
- func UnTagLeaderPod(podInterface corev1.PodInterface) error
Constants ¶
const BindTokenPath = "/var/run/secrets/tokens/bound-token"
Variables ¶
This section is empty.
Functions ¶
func GenerateLeaseUpdatePeriod ¶ added in v0.9.2
func GenerateLeaseUpdatePeriod(kubeClient *kubernetes.Clientset) (time.Duration, time.Duration, time.Duration, error)
GenerateLeaseUpdatePeriod generates the lease update period based on the number of nodes in the cluster. The larger the cluster, the longer the lease update period to reduce the frequency of leader elections.
func GenerateStatusUpdateWindow ¶ added in v0.9.2
GenerateStatusUpdateWindow generates status update batch window based on number of nodes in the cluster. This is used to throttle status updates in large clusters to reduce API server load. The larger the cluster, the longer the batch window to collect more status updates before processing.
func GinLogger ¶ added in v0.5.7
func GinLogger() gin.HandlerFunc
func HTTPPostAndGetResponseWithRetry ¶ added in v0.8.1
func HTTPSPostWithRetryAndToken ¶ added in v0.8.1
func InNetworksArray ¶ added in v0.8.0
func InNetworksArray(i varmor.NetworkContent, array []varmor.NetworkContent) bool
func InPortRangeArray ¶ added in v0.8.0
func InStringArray ¶
func InUint16Array ¶ added in v0.8.0
func InUint32Array ¶
func InitAndStartTokenRotation ¶ added in v0.5.6
InitAndStartTokenRotation initializes and starts the token rotation. The token is used for authenticating with the manager.
func IsRequestSizeError ¶ added in v0.7.0
func RemoveArmorProfileFinalizers ¶ added in v0.6.0
func RemoveArmorProfileFinalizers(i varmorinterface.CrdV1beta1Interface, namespace, name string) error
func TagLeaderPod ¶
func TagLeaderPod(podInterface corev1.PodInterface, name string) error
func UnTagLeaderPod ¶
func UnTagLeaderPod(podInterface corev1.PodInterface) error
Types ¶
This section is empty.