v1alpha1

package
v0.0.0-...-b786eef Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2023 License: Apache-2.0 Imports: 4 Imported by: 9

Documentation

Overview

Package v1alpha1 contains API schema definitions for the Multi-Cluster Services v1alpha1 API group. +kubebuilder:object:generate=true +groupName=multicluster.x-k8s.io

Index

Constants

View Source
const AppliedWorkKind = "AppliedWork"
View Source
const GroupName = "multicluster.x-k8s.io"

GroupName specifies the group name used to register the objects.

View Source
const WorkKind = "Work"
View Source
const WorkResource = "works"

Variables

View Source
var (
	// localSchemeBuilder and AddToScheme will stay in k8s.io/kubernetes.
	SchemeBuilder runtime.SchemeBuilder

	// Depreciated: use Install instead
	AddToScheme = localSchemeBuilder.AddToScheme
	Install     = localSchemeBuilder.AddToScheme
)
View Source
var GroupVersion = v1.GroupVersion{Group: GroupName, Version: "v1alpha1"}

GroupVersion specifies the group and the version used to register the objects.

View Source
var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha1"}

SchemeGroupVersion is group version used to register these objects Deprecated: use GroupVersion instead.

Functions

func Resource

func Resource(resource string) schema.GroupResource

Resource takes an unqualified resource and returns a Group qualified GroupResource

Types

type AppliedResourceMeta

type AppliedResourceMeta struct {
	ResourceIdentifier `json:",inline"`

	// UID is set on successful deletion of the Kubernetes resource by controller. The
	// resource might be still visible on the managed cluster after this field is set.
	// It is not directly settable by a client.
	// +optional
	UID types.UID `json:"uid,omitempty"`
}

AppliedResourceMeta represents the group, version, resource, name and namespace of a resource. Since these resources have been created, they must have valid group, version, resource, namespace, and name.

func (*AppliedResourceMeta) DeepCopy

func (in *AppliedResourceMeta) DeepCopy() *AppliedResourceMeta

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

func (*AppliedResourceMeta) DeepCopyInto

func (in *AppliedResourceMeta) DeepCopyInto(out *AppliedResourceMeta)

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

type AppliedWork

type AppliedWork struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	// Spec represents the desired configuration of AppliedWork.
	// +kubebuilder:validation:Required
	// +required
	Spec AppliedWorkSpec `json:"spec"`

	// Status represents the current status of AppliedWork.
	// +optional
	Status AppliedtWorkStatus `json:"status,omitempty"`
}

AppliedWork represents an applied work on managed cluster that is placed on a managed cluster. An appliedwork links to a work on a hub recording resources deployed in the managed cluster. When the agent is removed from managed cluster, cluster-admin on managed cluster can delete appliedwork to remove resources deployed by the agent. The name of the appliedwork must be the same as {work name} The namespace of the appliedwork should be the same as the resource applied on the managed cluster.

func (*AppliedWork) DeepCopy

func (in *AppliedWork) DeepCopy() *AppliedWork

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

func (*AppliedWork) DeepCopyInto

func (in *AppliedWork) DeepCopyInto(out *AppliedWork)

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

func (*AppliedWork) DeepCopyObject

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

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

type AppliedWorkList

type AppliedWorkList struct {
	metav1.TypeMeta `json:",inline"`
	// Standard list metadata.
	// +optional
	metav1.ListMeta `json:"metadata,omitempty"`
	// List of works.
	// +listType=set
	Items []AppliedWork `json:"items"`
}

AppliedWorkList contains a list of AppliedWork

func (*AppliedWorkList) DeepCopy

func (in *AppliedWorkList) DeepCopy() *AppliedWorkList

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

func (*AppliedWorkList) DeepCopyInto

func (in *AppliedWorkList) DeepCopyInto(out *AppliedWorkList)

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

func (*AppliedWorkList) DeepCopyObject

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

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

type AppliedWorkSpec

type AppliedWorkSpec struct {
	// WorkName represents the name of the related work on the hub.
	// +kubebuilder:validation:Required
	// +required
	WorkName string `json:"workName"`

	// WorkNamespace represents the namespace of the related work on the hub.
	// +kubebuilder:validation:Required
	// +required
	WorkNamespace string `json:"workNamespace"`
}

AppliedWorkSpec represents the desired configuration of AppliedWork

func (*AppliedWorkSpec) DeepCopy

func (in *AppliedWorkSpec) DeepCopy() *AppliedWorkSpec

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

func (*AppliedWorkSpec) DeepCopyInto

func (in *AppliedWorkSpec) DeepCopyInto(out *AppliedWorkSpec)

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

type AppliedtWorkStatus

type AppliedtWorkStatus struct {
	// AppliedResources represents a list of resources defined within the Work that are applied.
	// Only resources with valid GroupVersionResource, namespace, and name are suitable.
	// An item in this slice is deleted when there is no mapped manifest in Work.Spec or by finalizer.
	// The resource relating to the item will also be removed from managed cluster.
	// The deleted resource may still be present until the finalizers for that resource are finished.
	// However, the resource will not be undeleted, so it can be removed from this list and eventual consistency is preserved.
	// +optional
	AppliedResources []AppliedResourceMeta `json:"appliedResources,omitempty"`
}

AppliedtWorkStatus represents the current status of AppliedWork

func (*AppliedtWorkStatus) DeepCopy

func (in *AppliedtWorkStatus) DeepCopy() *AppliedtWorkStatus

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

func (*AppliedtWorkStatus) DeepCopyInto

func (in *AppliedtWorkStatus) DeepCopyInto(out *AppliedtWorkStatus)

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

type Manifest

type Manifest struct {
	// +kubebuilder:validation:EmbeddedResource
	// +kubebuilder:pruning:PreserveUnknownFields
	runtime.RawExtension `json:",inline"`
}

Manifest represents a resource to be deployed on spoke cluster

func (*Manifest) DeepCopy

func (in *Manifest) DeepCopy() *Manifest

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

func (*Manifest) DeepCopyInto

func (in *Manifest) DeepCopyInto(out *Manifest)

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

type ManifestCondition

type ManifestCondition struct {
	// resourceId represents a identity of a resource linking to manifests in spec.
	// +required
	Identifier ResourceIdentifier `json:"identifier,omitempty"`

	// Conditions represents the conditions of this resource on spoke cluster
	// +required
	Conditions []metav1.Condition `json:"conditions"`
}

ManifestCondition represents the conditions of the resources deployed on spoke cluster

func (*ManifestCondition) DeepCopy

func (in *ManifestCondition) DeepCopy() *ManifestCondition

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

func (*ManifestCondition) DeepCopyInto

func (in *ManifestCondition) DeepCopyInto(out *ManifestCondition)

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

type ResourceIdentifier

type ResourceIdentifier struct {
	// Ordinal represents an index in manifests list, so the condition can still be linked
	// to a manifest even thougth manifest cannot be parsed successfully.
	Ordinal int `json:"ordinal"`

	// Group is the group of the resource.
	Group string `json:"group,omitempty"`

	// Version is the version of the resource.
	Version string `json:"version,omitempty"`

	// Kind is the kind of the resource.
	Kind string `json:"kind,omitempty"`

	// Resource is the resource type of the resource
	Resource string `json:"resource,omitempty"`

	// Namespace is the namespace of the resource, the resource is cluster scoped if the value
	// is empty
	Namespace string `json:"namespace,omitempty"`

	// Name is the name of the resource
	Name string `json:"name,omitempty"`
}

ResourceIdentifier provides the identifiers needed to interact with any arbitrary object.

func (*ResourceIdentifier) DeepCopy

func (in *ResourceIdentifier) DeepCopy() *ResourceIdentifier

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

func (*ResourceIdentifier) DeepCopyInto

func (in *ResourceIdentifier) DeepCopyInto(out *ResourceIdentifier)

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

type Work

type Work struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	// spec defines the workload of a work.
	// +optional
	Spec WorkSpec `json:"spec,omitempty"`
	// status defines the status of each applied manifest on the spoke cluster.
	Status WorkStatus `json:"status,omitempty"`
}

Work is the Schema for the works API

func (*Work) DeepCopy

func (in *Work) DeepCopy() *Work

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

func (*Work) DeepCopyInto

func (in *Work) DeepCopyInto(out *Work)

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

func (*Work) DeepCopyObject

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

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

type WorkList

type WorkList struct {
	metav1.TypeMeta `json:",inline"`
	// Standard list metadata.
	// +optional
	metav1.ListMeta `json:"metadata,omitempty"`
	// List of works.
	// +listType=set
	Items []Work `json:"items"`
}

WorkList contains a list of Work

func (*WorkList) DeepCopy

func (in *WorkList) DeepCopy() *WorkList

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

func (*WorkList) DeepCopyInto

func (in *WorkList) DeepCopyInto(out *WorkList)

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

func (*WorkList) DeepCopyObject

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

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

type WorkSpec

type WorkSpec struct {
	// Workload represents the manifest workload to be deployed on spoke cluster
	Workload WorkloadTemplate `json:"workload,omitempty"`
}

WorkSpec defines the desired state of Work

func (*WorkSpec) DeepCopy

func (in *WorkSpec) DeepCopy() *WorkSpec

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

func (*WorkSpec) DeepCopyInto

func (in *WorkSpec) DeepCopyInto(out *WorkSpec)

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

type WorkStatus

type WorkStatus struct {
	// Conditions contains the different condition statuses for this work.
	// Valid condition types are:
	// 1. Applied represents workload in Work is applied successfully on the spoke cluster.
	// 2. Progressing represents workload in Work in the trasitioning from one state to another the on the spoke cluster.
	// 3. Available represents workload in Work exists on the spoke cluster.
	// 4. Degraded represents the current state of workload does not match the desired
	// state for a certain period.
	Conditions []metav1.Condition `json:"conditions"`

	// ManifestConditions represents the conditions of each resource in work deployed on
	// spoke cluster.
	// +optional
	ManifestConditions []ManifestCondition `json:"manifestConditions,omitempty"`
}

WorkStatus defines the observed state of Work

func (*WorkStatus) DeepCopy

func (in *WorkStatus) DeepCopy() *WorkStatus

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

func (*WorkStatus) DeepCopyInto

func (in *WorkStatus) DeepCopyInto(out *WorkStatus)

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

type WorkloadTemplate

type WorkloadTemplate struct {
	// Manifests represents a list of kuberenetes resources to be deployed on the spoke cluster.
	// +optional
	Manifests []Manifest `json:"manifests,omitempty"`
}

WorkloadTemplate represents the manifest workload to be deployed on spoke cluster

func (*WorkloadTemplate) DeepCopy

func (in *WorkloadTemplate) DeepCopy() *WorkloadTemplate

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

func (*WorkloadTemplate) DeepCopyInto

func (in *WorkloadTemplate) DeepCopyInto(out *WorkloadTemplate)

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

Jump to

Keyboard shortcuts

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