v1alpha1

package
v0.0.0-...-6ef67e0 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2024 License: Apache-2.0 Imports: 6 Imported by: 4

Documentation

Overview

Package v1alpha1 contains API Schema definitions for the hiveinternal v1alpha1 API group +k8s:openapi-gen=true +k8s:deepcopy-gen=package,register +k8s:conversion-gen=github.com/openshift/hive/apis/hiveinternal +k8s:defaulter-gen=TypeMeta +groupName=hiveinternal.openshift.io

Package v1alpha1 contains API Schema definitions for the hiveinternal v1alpha1 API group +k8s:openapi-gen=true +k8s:deepcopy-gen=package,register +k8s:conversion-gen=github.com/openshift/hive/apis/hiveinternal +k8s:defaulter-gen=TypeMeta +groupName=hiveinternal.openshift.io

Index

Constants

View Source
const (
	// FinalizerCachePurge is used on ClusterDeployments to ensure we remove cluster sync related
	// entries from a cache before cleaning up the CD object.
	FinalizerCachePurge string = "hive.openshift.io/clustersync-cache"
)

Variables

View Source
var (
	// HiveInternalAPIGroup is the group that all hiveinternal objects belong to in the API server.
	HiveInternalAPIGroup = "hiveinternal.openshift.io"

	// HiveInternalAPIVersion is the api version that all hiveinternal objects are currently at.
	HiveInternalAPIVersion = "v1alpha1"

	// SchemeGroupVersion is group version used to register these objects
	SchemeGroupVersion = schema.GroupVersion{Group: HiveInternalAPIGroup, Version: HiveInternalAPIVersion}

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

	// AddToScheme is a shortcut for SchemeBuilder.AddToScheme
	AddToScheme = SchemeBuilder.AddToScheme
)

Functions

func Resource

func Resource(resource string) schema.GroupResource

Resource takes an unqualified resource and returns a Group qualified GroupResource

Types

type ClusterSync

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

	Spec   ClusterSyncSpec   `json:"spec,omitempty"`
	Status ClusterSyncStatus `json:"status,omitempty"`
}

ClusterSync is the status of all of the SelectorSyncSets and SyncSets that apply to a ClusterDeployment. +k8s:openapi-gen=true +kubebuilder:subresource:status +kubebuilder:resource:path=clustersyncs,shortName=csync,scope=Namespaced +kubebuilder:printcolumn:name="Status",type=string,JSONPath=`.status.conditions[0].reason` +kubebuilder:printcolumn:name="Message",type=string,priority=1,JSONPath=`.status.conditions[?(@.type=="Failed")].message`

func (*ClusterSync) DeepCopy

func (in *ClusterSync) DeepCopy() *ClusterSync

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

func (*ClusterSync) DeepCopyInto

func (in *ClusterSync) DeepCopyInto(out *ClusterSync)

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

func (*ClusterSync) DeepCopyObject

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

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

type ClusterSyncCondition

type ClusterSyncCondition struct {
	// Type is the type of the condition.
	Type ClusterSyncConditionType `json:"type"`
	// Status is the status of the condition.
	Status corev1.ConditionStatus `json:"status"`
	// LastProbeTime is the last time we probed the condition.
	// +optional
	LastProbeTime metav1.Time `json:"lastProbeTime,omitempty"`
	// LastTransitionTime is the last time the condition transitioned from one status to another.
	// +optional
	LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty"`
	// Reason is a unique, one-word, CamelCase reason for the condition's last transition.
	// +optional
	Reason string `json:"reason,omitempty"`
	// Message is a human-readable message indicating details about the last transition.
	// +optional
	Message string `json:"message,omitempty"`
}

ClusterSyncCondition contains details for the current condition of a ClusterSync

func (ClusterSyncCondition) ConditionType

func (c ClusterSyncCondition) ConditionType() hivev1.ConditionType

ConditionType satisfies the generics.Condition interface

func (*ClusterSyncCondition) DeepCopy

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

func (*ClusterSyncCondition) DeepCopyInto

func (in *ClusterSyncCondition) DeepCopyInto(out *ClusterSyncCondition)

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

type ClusterSyncConditionType

type ClusterSyncConditionType string

ClusterSyncConditionType is a valid value for ClusterSyncCondition.Type

const (
	// ClusterSyncFailed is the type of condition used to indicate whether there are SyncSets or SelectorSyncSets which
	// have not been applied due to an error.
	ClusterSyncFailed ClusterSyncConditionType = "Failed"
)

func (ClusterSyncConditionType) String

func (t ClusterSyncConditionType) String() string

String satisfies the generics.ConditionType interface

type ClusterSyncLease

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

	Spec ClusterSyncLeaseSpec `json:"spec,omitempty"`
}

ClusterSyncLease is a record of the last time that SyncSets and SelectorSyncSets were applied to a cluster. +k8s:openapi-gen=true +kubebuilder:resource:path=clustersyncleases,shortName=csl,scope=Namespaced

func (*ClusterSyncLease) DeepCopy

func (in *ClusterSyncLease) DeepCopy() *ClusterSyncLease

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

func (*ClusterSyncLease) DeepCopyInto

func (in *ClusterSyncLease) DeepCopyInto(out *ClusterSyncLease)

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

func (*ClusterSyncLease) DeepCopyObject

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

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

type ClusterSyncLeaseList

type ClusterSyncLeaseList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []ClusterSyncLease `json:"items"`
}

ClusterSyncLeaseList contains a list of ClusterSyncLeases.

func (*ClusterSyncLeaseList) DeepCopy

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

func (*ClusterSyncLeaseList) DeepCopyInto

func (in *ClusterSyncLeaseList) DeepCopyInto(out *ClusterSyncLeaseList)

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

func (*ClusterSyncLeaseList) DeepCopyObject

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

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

type ClusterSyncLeaseSpec

type ClusterSyncLeaseSpec struct {
	// RenewTime is the time when SyncSets and SelectorSyncSets were last applied to the cluster.
	RenewTime metav1.MicroTime `json:"renewTime"`
}

ClusterSyncLeaseSpec is the specification of a ClusterSyncLease.

func (*ClusterSyncLeaseSpec) DeepCopy

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

func (*ClusterSyncLeaseSpec) DeepCopyInto

func (in *ClusterSyncLeaseSpec) DeepCopyInto(out *ClusterSyncLeaseSpec)

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

type ClusterSyncList

type ClusterSyncList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []ClusterSync `json:"items"`
}

ClusterSyncList contains a list of ClusterSync

func (*ClusterSyncList) DeepCopy

func (in *ClusterSyncList) DeepCopy() *ClusterSyncList

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

func (*ClusterSyncList) DeepCopyInto

func (in *ClusterSyncList) DeepCopyInto(out *ClusterSyncList)

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

func (*ClusterSyncList) DeepCopyObject

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

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

type ClusterSyncSpec

type ClusterSyncSpec struct{}

ClusterSyncSpec defines the desired state of ClusterSync

func (*ClusterSyncSpec) DeepCopy

func (in *ClusterSyncSpec) DeepCopy() *ClusterSyncSpec

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

func (*ClusterSyncSpec) DeepCopyInto

func (in *ClusterSyncSpec) DeepCopyInto(out *ClusterSyncSpec)

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

type ClusterSyncStatus

type ClusterSyncStatus struct {
	// SyncSets is the sync status of all of the SyncSets for the cluster.
	// +optional
	SyncSets []SyncStatus `json:"syncSets,omitempty"`

	// SelectorSyncSets is the sync status of all of the SelectorSyncSets for the cluster.
	// +optional
	SelectorSyncSets []SyncStatus `json:"selectorSyncSets,omitempty"`

	// Conditions is a list of conditions associated with syncing to the cluster.
	// +optional
	Conditions []ClusterSyncCondition `json:"conditions,omitempty"`

	// FirstSuccessTime is the time we first successfully applied all (selector)syncsets to a cluster.
	// +optional
	FirstSuccessTime *metav1.Time `json:"firstSuccessTime,omitempty"`

	// ControlledByReplica indicates which replica of the hive-clustersync StatefulSet is responsible
	// for (the CD related to) this clustersync. Note that this value indicates the replica that most
	// recently handled the ClusterSync. If the hive-clustersync statefulset is scaled up or down, the
	// controlling replica can change, potentially causing logs to be spread across multiple pods.
	ControlledByReplica *int64 `json:"controlledByReplica,omitempty"`
}

ClusterSyncStatus defines the observed state of ClusterSync

func (*ClusterSyncStatus) DeepCopy

func (in *ClusterSyncStatus) DeepCopy() *ClusterSyncStatus

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

func (*ClusterSyncStatus) DeepCopyInto

func (in *ClusterSyncStatus) DeepCopyInto(out *ClusterSyncStatus)

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

type FakeClusterInstall

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

	Spec   FakeClusterInstallSpec   `json:"spec"`
	Status FakeClusterInstallStatus `json:"status,omitempty"`
}

FakeClusterInstall represents a fake request to provision an agent based cluster.

+k8s:openapi-gen=true +kubebuilder:subresource:status

func (*FakeClusterInstall) DeepCopy

func (in *FakeClusterInstall) DeepCopy() *FakeClusterInstall

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

func (*FakeClusterInstall) DeepCopyInto

func (in *FakeClusterInstall) DeepCopyInto(out *FakeClusterInstall)

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

func (*FakeClusterInstall) DeepCopyObject

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

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

type FakeClusterInstallList

type FakeClusterInstallList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []FakeClusterInstall `json:"items"`
}

FakeClusterInstallList contains a list of FakeClusterInstall

func (*FakeClusterInstallList) DeepCopy

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

func (*FakeClusterInstallList) DeepCopyInto

func (in *FakeClusterInstallList) DeepCopyInto(out *FakeClusterInstallList)

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

func (*FakeClusterInstallList) DeepCopyObject

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

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

type FakeClusterInstallSpec

type FakeClusterInstallSpec struct {

	// ImageSetRef is a reference to a ClusterImageSet. The release image specified in the ClusterImageSet will be used
	// to install the cluster.
	ImageSetRef hivev1.ClusterImageSetReference `json:"imageSetRef"`

	// ClusterDeploymentRef is a reference to the ClusterDeployment associated with this AgentClusterInstall.
	ClusterDeploymentRef corev1.LocalObjectReference `json:"clusterDeploymentRef"`

	// ClusterMetadata contains metadata information about the installed cluster. It should be populated once the cluster install is completed. (it can be populated sooner if desired, but Hive will not copy back to ClusterDeployment until the Installed condition goes True.
	ClusterMetadata *hivev1.ClusterMetadata `json:"clusterMetadata,omitempty"`
}

FakeClusterInstallSpec defines the desired state of the FakeClusterInstall.

func (*FakeClusterInstallSpec) DeepCopy

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

func (*FakeClusterInstallSpec) DeepCopyInto

func (in *FakeClusterInstallSpec) DeepCopyInto(out *FakeClusterInstallSpec)

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

type FakeClusterInstallStatus

type FakeClusterInstallStatus struct {
	// Conditions includes more detailed status for the cluster install.
	// +optional
	Conditions []hivev1.ClusterInstallCondition `json:"conditions,omitempty"`
}

FakeClusterInstallStatus defines the observed state of the FakeClusterInstall.

func (*FakeClusterInstallStatus) DeepCopy

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

func (*FakeClusterInstallStatus) DeepCopyInto

func (in *FakeClusterInstallStatus) DeepCopyInto(out *FakeClusterInstallStatus)

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

type SyncResourceReference

type SyncResourceReference struct {
	// APIVersion is the Group and Version of the resource.
	APIVersion string `json:"apiVersion"`

	// Kind is the Kind of the resource.
	// +optional
	Kind string `json:"kind"`

	// Name is the name of the resource.
	Name string `json:"name"`

	// Namespace is the namespace of the resource.
	// +optional
	Namespace string `json:"namespace,omitempty"`
}

SyncResourceReference is a reference to a resource that is synced to a cluster via a SyncSet or SelectorSyncSet.

func (*SyncResourceReference) DeepCopy

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

func (*SyncResourceReference) DeepCopyInto

func (in *SyncResourceReference) DeepCopyInto(out *SyncResourceReference)

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

type SyncSetResult

type SyncSetResult string

SyncSetResult is the result of a sync attempt. +kubebuilder:validation:Enum=Success;Failure

const (
	// SuccessSyncSetResult is the result when the SyncSet or SelectorSyncSet was applied successfully to the cluster.
	SuccessSyncSetResult SyncSetResult = "Success"

	// FailureSyncSetResult is the result when there was an error when attempting to apply the SyncSet or SelectorSyncSet
	// to the cluster
	FailureSyncSetResult SyncSetResult = "Failure"
)

type SyncStatus

type SyncStatus struct {
	// Name is the name of the SyncSet or SelectorSyncSet.
	Name string `json:"name"`

	// ObservedGeneration is the generation of the SyncSet or SelectorSyncSet that was last observed.
	ObservedGeneration int64 `json:"observedGeneration"`

	// ResourcesToDelete is the list of resources in the cluster that should be deleted when the SyncSet or SelectorSyncSet
	// is deleted or is no longer matched to the cluster.
	// +optional
	ResourcesToDelete []SyncResourceReference `json:"resourcesToDelete,omitempty"`

	// Result is the result of the last attempt to apply the SyncSet or SelectorSyncSet to the cluster.
	Result SyncSetResult `json:"result"`

	// FailureMessage is a message describing why the SyncSet or SelectorSyncSet could not be applied. This is only
	// set when Result is Failure.
	// +optional
	FailureMessage string `json:"failureMessage,omitempty"`

	// LastTransitionTime is the time when this status last changed.
	LastTransitionTime metav1.Time `json:"lastTransitionTime"`

	// FirstSuccessTime is the time when the SyncSet or SelectorSyncSet was first successfully applied to the cluster.
	// +optional
	FirstSuccessTime *metav1.Time `json:"firstSuccessTime,omitempty"`
}

SyncStatus is the status of applying a specific SyncSet or SelectorSyncSet to the cluster.

func (*SyncStatus) DeepCopy

func (in *SyncStatus) DeepCopy() *SyncStatus

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

func (*SyncStatus) DeepCopyInto

func (in *SyncStatus) DeepCopyInto(out *SyncStatus)

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