kubernetes

package
v0.0.0-...-f79711b Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	AnnotationTemplate = "ckotzbauer.sbom-operator.io/%s"

	JobName = "sbom-operator-job"
)

Functions

func ApplyProxyRegistry

func ApplyProxyRegistry(img *oci.RegistryImage, log bool, registryProxyMap map[string]string) error

Types

type KubeClient

type KubeClient struct {
	Client *libk8s.KubeClient
	// contains filtered or unexported fields
}

func NewClient

func NewClient(ignoreAnnotations bool, fallbackPullSecretName string) *KubeClient

func (*KubeClient) CreateConfigMap

func (client *KubeClient) CreateConfigMap(namespace, name, imageId string, data []byte) error

func (*KubeClient) CreateJob

func (client *KubeClient) CreateJob(namespace, suffix, image, pullSecrets string, timeout int64, envs map[string]string) (*batchv1.Job, error)

func (*KubeClient) CreateJobSecret

func (client *KubeClient) CreateJobSecret(namespace, suffix string, data []byte) error

func (*KubeClient) DeleteConfigMap

func (client *KubeClient) DeleteConfigMap(cm corev1.ConfigMap) error

func (*KubeClient) HasAnnotation

func (client *KubeClient) HasAnnotation(annotations map[string]string, container *libk8s.ContainerInfo) bool

func (*KubeClient) InjectPullSecrets

func (client *KubeClient) InjectPullSecrets(pod libk8s.PodInfo)

func (*KubeClient) ListConfigMaps

func (client *KubeClient) ListConfigMaps() ([]corev1.ConfigMap, error)

func (*KubeClient) LoadImageInfos

func (client *KubeClient) LoadImageInfos(namespaces []corev1.Namespace, podLabelSelector string) ([]libk8s.PodInfo, []*oci.RegistryImage)

func (*KubeClient) StartPodInformer

func (client *KubeClient) StartPodInformer(podLabelSelector string, handler cache.ResourceEventHandlerFuncs) (cache.SharedIndexInformer, error)

func (*KubeClient) UpdatePodAnnotation

func (client *KubeClient) UpdatePodAnnotation(pod libk8s.PodInfo)

Jump to

Keyboard shortcuts

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