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
- func ConvertToDaemonSet(obj *unstructured.Unstructured) (*appsv1.DaemonSet, error)
- func ConvertToDeployment(obj *unstructured.Unstructured) (*appsv1.Deployment, error)
- func ConvertToJob(obj *unstructured.Unstructured) (*batchv1.Job, error)
- func ConvertToPod(obj *unstructured.Unstructured) (*corev1.Pod, error)
- func ConvertToReplicaSet(obj *unstructured.Unstructured) (*appsv1.ReplicaSet, error)
- func ConvertToStatefulSet(obj *unstructured.Unstructured) (*appsv1.StatefulSet, error)
- type ImageOverrider
- type NameOverrider
- type NodeSelectorOverrider
- type OverrideManager
- type Overrider
- type OverriderInfo
- type ReplicasOverrider
Constants ¶
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