pod

package
v1.5.5 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AdmissionWebhookAnnotationStatusKey = "kubeslice.io/status"
	PodInjectLabelKey                   = "kubeslice.io/pod-type"
)

Variables

This section is empty.

Functions

func MutateDaemonSet

func MutateDaemonSet(ds *appsv1.DaemonSet, sliceName string) *appsv1.DaemonSet

func MutateDeployment

func MutateDeployment(deploy *appsv1.Deployment, sliceName string) *appsv1.Deployment

func MutatePod

func MutatePod(pod *corev1.Pod, sliceName string) *corev1.Pod

func MutateStatefulset

func MutateStatefulset(ss *appsv1.StatefulSet, sliceName string) *appsv1.StatefulSet

func NewWebhookClient

func NewWebhookClient() *webhookClient

Types

type SliceInfoProvider

type SliceInfoProvider interface {
	SliceAppNamespaceConfigured(ctx context.Context, slice string, namespace string) (bool, error)
	GetNamespaceLabels(ctx context.Context, client client.Client, namespace string) (map[string]string, error)
	GetSliceOverlayNetworkType(ctx context.Context, client client.Client, sliceName string) (v1alpha1.NetworkType, error)
}

type WebhookServer

type WebhookServer struct {
	Client          client.Client
	Decoder         *admission.Decoder
	SliceInfoClient SliceInfoProvider
}

func (*WebhookServer) Handle

func (*WebhookServer) MutationRequired

func (wh *WebhookServer) MutationRequired(metadata metav1.ObjectMeta, ctx context.Context, kind string) (bool, string)

Jump to

Keyboard shortcuts

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