v1

package
v0.0.0-...-9ccf847 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

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

Index

Constants

View Source
const (
	// AutoDetectLabels is used to specify automatic detection.
	AutoDetectLabels = "auto-detect"

	// ClusterMonitoringLabel is the label indicating cluster monitoring.
	ClusterMonitoringLabel = "openshift.io/cluster-monitoring"

	// CreatedViaAnnotation is the annotation indicating the creation method.
	CreatedViaAnnotation = "open-cluster-management/created-via"

	// ImportStrategyAnnotation is the annotation indicating the import strategy.
	ImportStrategyAnnotation = "discovery.open-cluster-management.io/import-strategy"

	// ImportCleanUpFinalizer is a cleanup finalizer associated with resources created by the discovery operator.
	ImportCleanUpFinalizer = "discovery.open-cluster-management.io/import-cleanup"
)

Constants for labels and annotations used in discovery and management operations.

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "discovery.open-cluster-management.io", Version: "v1"}

	// 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
)
View Source
var (
	Client cl.Client
)

log is for logging in this package.

Functions

func ValidatingWebhook

func ValidatingWebhook(namespace string) *admissionregistration.ValidatingWebhookConfiguration

ValidatingWebhook returns the ValidatingWebhookConfiguration used for the discoveredcluster linked to a service in the provided namespace

Types

type DiscoveredCluster

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

	Spec   DiscoveredClusterSpec   `json:"spec,omitempty"`
	Status DiscoveredClusterStatus `json:"status,omitempty"`
}

DiscoveredCluster is the Schema for the discoveredclusters API

func (*DiscoveredCluster) DeepCopy

func (in *DiscoveredCluster) DeepCopy() *DiscoveredCluster

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

func (*DiscoveredCluster) DeepCopyInto

func (in *DiscoveredCluster) DeepCopyInto(out *DiscoveredCluster)

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

func (*DiscoveredCluster) DeepCopyObject

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

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

func (*DiscoveredCluster) Default

func (r *DiscoveredCluster) Default()

Default implements webhook.Defaulter so a webhook will be registered for the type

func (DiscoveredCluster) Equal

Equal reports whether the spec of a is equal to b.

func (*DiscoveredCluster) SetupWebhookWithManager

func (r *DiscoveredCluster) SetupWebhookWithManager(mgr ctrl.Manager) error

func (*DiscoveredCluster) ValidateCreate

func (r *DiscoveredCluster) ValidateCreate() (admission.Warnings, error)

ValidateCreate implements webhook.Validator so a webhook will be registered for the type

func (*DiscoveredCluster) ValidateDelete

func (r *DiscoveredCluster) ValidateDelete() (admission.Warnings, error)

ValidateDelete implements webhook.Validator so a webhook will be registered for the type

func (*DiscoveredCluster) ValidateUpdate

func (r *DiscoveredCluster) ValidateUpdate(old runtime.Object) (admission.Warnings, error)

ValidateUpdate implements webhook.Validator so a webhook will be registered for the type

type DiscoveredClusterList

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

DiscoveredClusterList contains a list of DiscoveredCluster

func (*DiscoveredClusterList) DeepCopy

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

func (*DiscoveredClusterList) DeepCopyInto

func (in *DiscoveredClusterList) DeepCopyInto(out *DiscoveredClusterList)

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

func (*DiscoveredClusterList) DeepCopyObject

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

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

type DiscoveredClusterSpec

type DiscoveredClusterSpec struct {
	ActivityTimestamp      *metav1.Time           `json:"activityTimestamp,omitempty" yaml:"activityTimestamp,omitempty"`
	APIURL                 string                 `json:"apiUrl" yaml:"apiUrl"`
	CloudProvider          string                 `json:"cloudProvider,omitempty" yaml:"cloudProvider,omitempty"`
	Console                string                 `json:"console,omitempty" yaml:"console,omitempty"`
	CreationTimestamp      *metav1.Time           `json:"creationTimestamp,omitempty" yaml:"creationTimestamp,omitempty"`
	Credential             corev1.ObjectReference `json:"credential,omitempty" yaml:"credential,omitempty"`
	DisplayName            string                 `json:"displayName" yaml:"displayName"`
	ImportAsManagedCluster bool                   `json:"importAsManagedCluster,omitempty" yaml:"importAsManagedCluster,omitempty"`
	IsManagedCluster       bool                   `json:"isManagedCluster" yaml:"isManagedCluster"`
	Name                   string                 `json:"name" yaml:"name"`
	OCPClusterID           string                 `json:"ocpClusterId,omitempty" yaml:"ocpClusterId,omitempty"`
	OpenshiftVersion       string                 `json:"openshiftVersion,omitempty" yaml:"openshiftVersion,omitempty"`
	Owner                  string                 `json:"owner,omitempty" yaml:"owner,omitempty"`
	RHOCMClusterID         string                 `json:"rhocmClusterId,omitempty" yaml:"rhocmClusterId,omitempty"`
	Region                 string                 `json:"region,omitempty" yaml:"region,omitempty"`
	Status                 string                 `json:"status,omitempty" yaml:"status,omitempty"`
	Type                   string                 `json:"type" yaml:"type"`
}

DiscoveredClusterSpec defines the desired state of DiscoveredCluster

func (*DiscoveredClusterSpec) DeepCopy

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

func (*DiscoveredClusterSpec) DeepCopyInto

func (in *DiscoveredClusterSpec) DeepCopyInto(out *DiscoveredClusterSpec)

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

type DiscoveredClusterStatus

type DiscoveredClusterStatus struct {
}

DiscoveredClusterStatus defines the observed state of DiscoveredCluster

func (*DiscoveredClusterStatus) DeepCopy

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

func (*DiscoveredClusterStatus) DeepCopyInto

func (in *DiscoveredClusterStatus) DeepCopyInto(out *DiscoveredClusterStatus)

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

type DiscoveryConfig

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

	Spec   DiscoveryConfigSpec   `json:"spec,omitempty"`
	Status DiscoveryConfigStatus `json:"status,omitempty"`
}

DiscoveryConfig is the Schema for the discoveryconfigs API

func (*DiscoveryConfig) DeepCopy

func (in *DiscoveryConfig) DeepCopy() *DiscoveryConfig

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

func (*DiscoveryConfig) DeepCopyInto

func (in *DiscoveryConfig) DeepCopyInto(out *DiscoveryConfig)

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

func (*DiscoveryConfig) DeepCopyObject

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

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

type DiscoveryConfigList

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

DiscoveryConfigList contains a list of DiscoveryConfig

func (*DiscoveryConfigList) DeepCopy

func (in *DiscoveryConfigList) DeepCopy() *DiscoveryConfigList

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

func (*DiscoveryConfigList) DeepCopyInto

func (in *DiscoveryConfigList) DeepCopyInto(out *DiscoveryConfigList)

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

func (*DiscoveryConfigList) DeepCopyObject

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

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

type DiscoveryConfigSpec

type DiscoveryConfigSpec struct {
	// Credential is the secret containing credentials to connect to the OCM api on behalf of a user
	// +required
	Credential string `json:"credential"`

	// Sets restrictions on what kind of clusters to discover
	// +optional
	Filters Filter `json:"filters,omitempty"`
}

DiscoveryConfigSpec defines the desired state of DiscoveryConfig

func (*DiscoveryConfigSpec) DeepCopy

func (in *DiscoveryConfigSpec) DeepCopy() *DiscoveryConfigSpec

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

func (*DiscoveryConfigSpec) DeepCopyInto

func (in *DiscoveryConfigSpec) DeepCopyInto(out *DiscoveryConfigSpec)

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

type DiscoveryConfigStatus

type DiscoveryConfigStatus struct {
}

DiscoveryConfigStatus defines the observed state of DiscoveryConfig

func (*DiscoveryConfigStatus) DeepCopy

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

func (*DiscoveryConfigStatus) DeepCopyInto

func (in *DiscoveryConfigStatus) DeepCopyInto(out *DiscoveryConfigStatus)

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

type Filter

type Filter struct {
	// LastActive is the last active in days of clusters to discover, determined by activity timestamp
	// +optional
	LastActive int `json:"lastActive,omitempty"`

	// OpenShiftVersions is the list of release versions of OpenShift of the form "<Major>.<Minor>"
	// +optional
	OpenShiftVersions []Semver `json:"openShiftVersions,omitempty"`
}

Filter ...

func (*Filter) DeepCopy

func (in *Filter) DeepCopy() *Filter

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

func (*Filter) DeepCopyInto

func (in *Filter) DeepCopyInto(out *Filter)

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

type Semver

type Semver string

Semver represents a partial semver string with the major and minor version in the form "<Major>.<Minor>". For example: "4.5" +kubebuilder:validation:Pattern="^(?:0|[1-9]\\d*)\\.(?:0|[1-9]\\d*)$"

Jump to

Keyboard shortcuts

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