v1beta1

package
v0.0.0-...-5914884 Latest Latest
Warning

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

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

Documentation

Overview

+kubebuilder:object:generate=true

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

Index

Constants

This section is empty.

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "cluster.open-cluster-management.io", 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 ClusterCurator

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

	Spec      ClusterCuratorSpec   `json:"spec,omitempty"`
	Status    ClusterCuratorStatus `json:"status,omitempty"`
	Operation *Operation           `json:"operation,omitempty"`
}

ClusterCurator is the custom resource for the clustercurators API. This kind allows you to run Ansible prehook and posthook jobs before provisioning Hive or HyperShift and importing a cluster. Additionally, cluster upgrade and destroy operations are supported as well.

func (*ClusterCurator) DeepCopy

func (in *ClusterCurator) DeepCopy() *ClusterCurator

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

func (*ClusterCurator) DeepCopyInto

func (in *ClusterCurator) DeepCopyInto(out *ClusterCurator)

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

func (*ClusterCurator) DeepCopyObject

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

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

type ClusterCuratorList

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

ClusterCuratorList contains a list of ClusterCurator

func (*ClusterCuratorList) DeepCopy

func (in *ClusterCuratorList) DeepCopy() *ClusterCuratorList

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

func (*ClusterCuratorList) DeepCopyInto

func (in *ClusterCuratorList) DeepCopyInto(out *ClusterCuratorList)

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

func (*ClusterCuratorList) DeepCopyObject

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

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

type ClusterCuratorSpec

type ClusterCuratorSpec struct {

	// This is the desired curation that will occur
	// +kubebuilder:validation:Enum={install,scale,upgrade,destroy,delete-cluster-namespace}
	DesiredCuration string `json:"desiredCuration,omitempty"`

	// Points to the Cloud Provider or Ansible Provider secret, format: namespace/secretName
	ProviderCredentialPath string `json:"providerCredentialPath,omitempty"`

	// During an install curation run these Pre/Post hooks
	Install Hooks `json:"install,omitempty"`

	// During an scale curation run these Pre/Post hooks
	Scale Hooks `json:"scale,omitempty"`

	// During an destroy curation run these **Pre hook ONLY**
	Destroy Hooks `json:"destroy,omitempty"`

	// During an upgrade curation run these
	Upgrade UpgradeHooks `json:"upgrade,omitempty"`

	// Kubernetes job resource created for curation of a cluster
	CuratingJob string `json:"curatorJob,omitempty"`

	// Inventory values are supplied for use with the pre/post jobs.
	Inventory string `json:"inventory,omitempty"`
}

ClusterCuratorSpec defines the desired state of ClusterCurator

func (*ClusterCuratorSpec) DeepCopy

func (in *ClusterCuratorSpec) DeepCopy() *ClusterCuratorSpec

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

func (*ClusterCuratorSpec) DeepCopyInto

func (in *ClusterCuratorSpec) DeepCopyInto(out *ClusterCuratorSpec)

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

type ClusterCuratorStatus

type ClusterCuratorStatus struct {
	// Track the conditions for each step in the desired curation that is being
	// executed as a job
	Conditions []metav1.Condition `json:"conditions,omitempty"`
}

ClusterCuratorStatus defines the observed state of ClusterCurator work

func (*ClusterCuratorStatus) DeepCopy

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

func (*ClusterCuratorStatus) DeepCopyInto

func (in *ClusterCuratorStatus) DeepCopyInto(out *ClusterCuratorStatus)

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

type Hook

type Hook struct {
	// Name of the Ansible Template to run in Tower as a job
	// +kubebuilder:validation:Required
	Name string `json:"name"`

	// Type of the Hook. For Job type, Ansible job template will be used.
	// For Workflow type, Ansible workflow template will be used.
	// If omitted, default to Job type.
	// +optional
	// +kubebuilder:default=Job
	Type HookType `json:"type,omitempty"`

	// Ansible job extra_vars is passed to the Ansible job at execution time
	// and is a known Ansible entity.
	// +kubebuilder:pruning:PreserveUnknownFields
	ExtraVars *runtime.RawExtension `json:"extra_vars,omitempty"`

	// A comma-separated list of tags to specify which sets
	// of ansible tasks in a job should be run.
	// +optional
	JobTags string `json:"job_tags,omitempty"`

	// A comma-separated list of tags to specify which sets
	// of ansible tasks in a job should not be run.
	// +optional
	SkipTags string `json:"skip_tags,omitempty"`
}

func (*Hook) DeepCopy

func (in *Hook) DeepCopy() *Hook

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

func (*Hook) DeepCopyInto

func (in *Hook) DeepCopyInto(out *Hook)

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

type HookType

type HookType string

HookType indicates the type for the Hook. It can be 'Job' or 'Workflow' +kubebuilder:validation:Enum=Job;Workflow

const (
	// HookTypeJob, the Hook is an Ansible Job template
	HookTypeJob HookType = "Job"

	// HookTypeWorkflow, the Hook is an Ansible Workflow template
	HookTypeWorkflow HookType = "Workflow"
)

type Hooks

type Hooks struct {

	// TowerAuthSecret is ansible secret used in template to run in tower
	// +kubebuilder:validation:Required
	TowerAuthSecret string `json:"towerAuthSecret,omitempty"`

	// Jobs to run before the cluster deployment
	Prehook []Hook `json:"prehook,omitempty"`

	// Jobs to run after the cluster import
	Posthook []Hook `json:"posthook,omitempty"`

	// When provided, this is a Job specification and overrides the default flow
	// +kubebuilder:pruning:PreserveUnknownFields
	OverrideJob *runtime.RawExtension `json:"overrideJob,omitempty"`

	// JobMonitorTimeout defines the timeout for finding a job, the unit of this is minute.
	// If job is found, the curator controller waits until the job becomes active.
	// By default, it is 5 minutes
	// If its value is less than or equal to zero, the default value will be used.
	// +optional
	// +kubebuilder:default=5
	JobMonitorTimeout int `json:"jobMonitorTimeout,omitempty"`
}

func (*Hooks) DeepCopy

func (in *Hooks) DeepCopy() *Hooks

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

func (*Hooks) DeepCopyInto

func (in *Hooks) DeepCopyInto(out *Hooks)

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

type Operation

type Operation struct {
	// Option for retrying a failed posthook job
	// +kubebuilder:validation:Enum={installPosthook,upgradePosthook}
	RetryPosthook string `json:"retryPosthook,omitempty"`
}

Operation contains information about a requested or running operation

func (*Operation) DeepCopy

func (in *Operation) DeepCopy() *Operation

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

func (*Operation) DeepCopyInto

func (in *Operation) DeepCopyInto(out *Operation)

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

type UpgradeHooks

type UpgradeHooks struct {

	// TowerAuthSecret is ansible secret used in template to run in tower
	// +kubebuilder:validation:Required
	TowerAuthSecret string `json:"towerAuthSecret,omitempty"`

	// DesiredUpdate indicates the desired value of
	// the cluster version. Setting this value will trigger an upgrade (if
	// the current version does not match the desired version).
	// +optional
	DesiredUpdate string `json:"desiredUpdate,omitempty"`

	// Channel is an identifier for explicitly requesting that a non-default
	// set of updates be applied to this cluster. The default channel will be
	// contain stable updates that are appropriate for production clusters.
	// +optional
	Channel string `json:"channel,omitempty"`

	// Upstream may be used to specify the preferred update server. By default
	// it will use the appropriate update server for the cluster and region.
	// +optional
	Upstream string `json:"upstream,omitempty"`

	// Jobs to run before the cluster upgrade
	Prehook []Hook `json:"prehook,omitempty"`

	// Jobs to run after the cluster upgrade
	Posthook []Hook `json:"posthook,omitempty"`

	// When provided, this is a Job specification and overrides the default flow
	// +kubebuilder:pruning:PreserveUnknownFields
	OverrideJob *runtime.RawExtension `json:"overrideJob,omitempty"`

	// MonitorTimeout defines the monitor process timeout, the unit of this is minute.
	// By default, it is 120 minutes
	// If its value is less than or equal to zero, the default value will be used.
	// +optional
	// +kubebuilder:default=120
	MonitorTimeout int `json:"monitorTimeout,omitempty"`
}

func (*UpgradeHooks) DeepCopy

func (in *UpgradeHooks) DeepCopy() *UpgradeHooks

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

func (*UpgradeHooks) DeepCopyInto

func (in *UpgradeHooks) DeepCopyInto(out *UpgradeHooks)

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