utils

package
v0.8.2 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2025 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Overview

Package utils implements the utils for vArmor.

Index

Constants

View Source
const BindTokenPath = "/var/run/secrets/tokens/bound-token"

Variables

This section is empty.

Functions

func GetToken added in v0.5.6

func GetToken() string

func GinLogger added in v0.5.7

func GinLogger() gin.HandlerFunc

func HTTPPostAndGetResponseWithRetry added in v0.8.1

func HTTPPostAndGetResponseWithRetry(address string, path string, reqBody []byte) ([]byte, error)

func HTTPSPostWithRetryAndToken added in v0.8.1

func HTTPSPostWithRetryAndToken(address string, path string, reqBody []byte, inContainer bool) error

func InNetworksArray added in v0.8.0

func InNetworksArray(i varmor.NetworkContent, array []varmor.NetworkContent) bool

func InPortRangeArray added in v0.8.0

func InPortRangeArray(i varmor.Port, array []varmor.Port) bool

func InStringArray

func InStringArray(c string, array []string) bool

func InUint16Array added in v0.8.0

func InUint16Array(i uint16, array []uint16) bool

func InUint32Array

func InUint32Array(i uint32, array []uint32) bool

func InitAndStartTokenRotation added in v0.5.6

func InitAndStartTokenRotation(interval time.Duration, logger logr.Logger)

InitAndStartTokenRotation initializes and starts the token rotation. The token is used for authenticating with the manager.

func IsAppArmorGA added in v0.6.0

func IsAppArmorGA(versionInfo *version.Info) (bool, error)

func IsRequestSizeError added in v0.7.0

func IsRequestSizeError(err error) bool

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.

Jump to

Keyboard shortcuts

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