overridemanager

package
v1.13.3 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2023 License: Apache-2.0 Imports: 15 Imported by: 8

Documentation

Overview

CHANGELOG KubeEdge Authors: - This File is drived from github.com/karmada-io/karmada/pkg/util/overridemanager/imageoverride.go - refactor imageOverrider as a struct that implements the Overrider interface

Index

Constants

View Source
const (
	// DeploymentKind indicates the target resource is a deployment
	DeploymentKind = "Deployment"
	// JobKind indicates the target resource is a job
	JobKind = "Job"
	// PodKind indicates the target resource is a pod
	PodKind = "Pod"
	// ReplicaSetKind indicates the target resource is a replicaset
	ReplicaSetKind = "ReplicaSet"
	// StatefulSetKind indicates the target resource is a statefulset
	StatefulSetKind = "StatefulSet"
	// DaemonSetKind indicates the target resource is a daemonset
	DaemonSetKind = "DaemonSet"
)

Variables

This section is empty.

Functions

func ConvertToDaemonSet

func ConvertToDaemonSet(obj *unstructured.Unstructured) (*appsv1.DaemonSet, error)

ConvertToDaemonSet converts a DaemonSet object from unstructured to typed.

func ConvertToDeployment

func ConvertToDeployment(obj *unstructured.Unstructured) (*appsv1.Deployment, error)

ConvertToDeployment converts a Deployment object from unstructured to typed.

func ConvertToJob

func ConvertToJob(obj *unstructured.Unstructured) (*batchv1.Job, error)

ConvertToJob converts a Job object from unstructured to typed.

func ConvertToPod

func ConvertToPod(obj *unstructured.Unstructured) (*corev1.Pod, error)

ConvertToPod converts a Pod object from unstructured to typed.

func ConvertToReplicaSet

func ConvertToReplicaSet(obj *unstructured.Unstructured) (*appsv1.ReplicaSet, error)

ConvertToReplicaSet converts a ReplicaSet object from unstructured to typed.

func ConvertToStatefulSet

func ConvertToStatefulSet(obj *unstructured.Unstructured) (*appsv1.StatefulSet, error)

ConvertToStatefulSet converts a StatefulSet object from unstructured to typed.

Types

type ImageOverrider

type ImageOverrider struct{}

func (*ImageOverrider) ApplyOverrides

func (o *ImageOverrider) ApplyOverrides(rawObj *unstructured.Unstructured, overriders OverriderInfo) error

type NameOverrider

type NameOverrider struct{}

func (*NameOverrider) ApplyOverrides

func (o *NameOverrider) ApplyOverrides(rawObj *unstructured.Unstructured, overriders OverriderInfo) error

type NodeSelectorOverrider

type NodeSelectorOverrider struct{}

func (*NodeSelectorOverrider) ApplyOverrides

func (o *NodeSelectorOverrider) ApplyOverrides(rawObj *unstructured.Unstructured, overriders OverriderInfo) error

type OverrideManager

type OverrideManager struct {
	Overriders []Overrider
}

func (*OverrideManager) ApplyOverrides

func (o *OverrideManager) ApplyOverrides(rawObjs *unstructured.Unstructured, overrideInfo OverriderInfo) error

type Overrider

type Overrider interface {
	ApplyOverrides(rawObjs *unstructured.Unstructured, overrideInfo OverriderInfo) error
}

OverrideManager manages override operation

type OverriderInfo

type OverriderInfo struct {
	TargetNodeGroup string
	Overriders      *appsv1alpha1.Overriders
}

type ReplicasOverrider

type ReplicasOverrider struct{}

func (*ReplicasOverrider) ApplyOverrides

func (o *ReplicasOverrider) ApplyOverrides(rawObj *unstructured.Unstructured, overriders OverriderInfo) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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