v1beta1

package
v1.0.0-2021-10-...-4d4b63e Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package v1beta1 contains API Schema definitions for the action v1beta1 API group +kubebuilder:object:generate=true +groupName=action.open-cluster-management.io

Index

Constants

View Source
const (
	ReasonCreateResourceFailed string = "CreateResourceFailed"
	ReasonUpdateResourceFailed string = "UpdateResourceFailed"
	ReasonDeleteResourceFailed string = "DeleteResourceFailed"
	ReasonActionTypeInvalid    string = "ActionTypeInvalid"
)
View Source
const (
	// UserIdentityAnnotation is identity annotation
	UserIdentityAnnotation = "acm.io/user-identity"

	// UserGroupAnnotation is user group annotation
	UserGroupAnnotation = "acm.io/user-group"
)
View Source
const (
	// ConditionActionCompleted means the work is completed.
	ConditionActionCompleted string = "Completed"
)

These are valid conditions of a cluster.

Variables

View Source
var (
	GroupName = "action.open-cluster-management.io"

	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1beta1"}

	// SchemeBuilder is used to add go types to the GroupVersionKind scheme
	SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion}

	// AddToScheme adds the types in this group-version to the given scheme.
	AddToScheme = SchemeBuilder.AddToScheme
)

Functions

This section is empty.

Types

type ActionSpec

type ActionSpec struct {
	// ActionType is the type of the action
	ActionType ActionType `json:"actionType,omitempty"`

	// KubeWorkSpec is the action payload to process
	KubeWork *KubeWorkSpec `json:"kube,omitempty"`
}

ActionSpec defines the action to be processed on a cluster

func (*ActionSpec) DeepCopy

func (in *ActionSpec) DeepCopy() *ActionSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ActionSpec.

func (*ActionSpec) DeepCopyInto

func (in *ActionSpec) DeepCopyInto(out *ActionSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ActionStatus

type ActionStatus struct {
	// Conditions represents the conditions of this resource on managed cluster
	// +optional
	Conditions []metav1.Condition `json:"conditions,omitempty"`

	// Result references the related result of the action
	// +nullable
	// +optional
	// +kubebuilder:validation:EmbeddedResource
	// +kubebuilder:pruning:PreserveUnknownFields
	Result runtime.RawExtension `json:"result,omitempty"`
}

ActionStatus returns the current status of the action

func (*ActionStatus) DeepCopy

func (in *ActionStatus) DeepCopy() *ActionStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ActionStatus.

func (*ActionStatus) DeepCopyInto

func (in *ActionStatus) DeepCopyInto(out *ActionStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ActionType

type ActionType string

ActionType defines the type of the action

const (
	// CreateActionType defines create action
	CreateActionType ActionType = "Create"
	// DeleteActionType defines selete action
	DeleteActionType ActionType = "Delete"
	// UpdateActionType defines update action
	UpdateActionType ActionType = "Update"
)

type KubeWorkSpec

type KubeWorkSpec struct {
	// Resource of the object
	Resource string `json:"resource,omitempty"`

	// Name of the object
	Name string `json:"name,omitempty"`

	// Namespace of the object
	Namespace string `json:"namespace,omitempty"`

	// ObjectTemplate is the template of the object
	// +kubebuilder:validation:EmbeddedResource
	// +kubebuilder:pruning:PreserveUnknownFields
	ObjectTemplate runtime.RawExtension `json:"template,omitempty"`
}

KubeWorkSpec is the kubernetes work details

func (*KubeWorkSpec) DeepCopy

func (in *KubeWorkSpec) DeepCopy() *KubeWorkSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KubeWorkSpec.

func (*KubeWorkSpec) DeepCopyInto

func (in *KubeWorkSpec) DeepCopyInto(out *KubeWorkSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ManagedClusterAction

type ManagedClusterAction struct {
	metav1.TypeMeta `json:",inline"`
	// Standard object's metadata.
	// More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
	// +optional
	metav1.ObjectMeta `json:"metadata,omitempty"`

	// Spec defines the desired behavior of the action.
	// +optional
	Spec ActionSpec `json:"spec,omitempty"`
	// Status describes the desired status of the action
	// +optional
	Status ActionStatus `json:"status,omitempty"`
}

ManagedClusterAction is the action that will be done on a cluster

func (*ManagedClusterAction) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ManagedClusterAction.

func (*ManagedClusterAction) DeepCopyInto

func (in *ManagedClusterAction) DeepCopyInto(out *ManagedClusterAction)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ManagedClusterAction) DeepCopyObject

func (in *ManagedClusterAction) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type ManagedClusterActionList

type ManagedClusterActionList struct {
	metav1.TypeMeta `json:",inline"`
	// Standard list metadata.
	// More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
	// +optional
	metav1.ListMeta `json:"metadata,omitempty"`

	// List of ManagedClusterAction objects.
	Items []ManagedClusterAction `json:"items"`
}

ManagedClusterActionList is a list of all the ManagedClusterActions

func (*ManagedClusterActionList) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ManagedClusterActionList.

func (*ManagedClusterActionList) DeepCopyInto

func (in *ManagedClusterActionList) DeepCopyInto(out *ManagedClusterActionList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ManagedClusterActionList) DeepCopyObject

func (in *ManagedClusterActionList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

Jump to

Keyboard shortcuts

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