v1alpha1

package
v0.9.12 Latest Latest
Warning

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

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

Documentation

Overview

Package v1alpha1 contains API Schema definitions for the gitops v1 API group +kubebuilder:object:generate=true +groupName=gitops.kanod.io

Index

Constants

This section is empty.

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "gitops.kanod.io", Version: "v1alpha1"}

	// 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 ClusterDef

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

	Spec   ClusterDefSpec   `json:"spec,omitempty"`
	Status ClusterDefStatus `json:"status,omitempty"`
}

func (*ClusterDef) DeepCopy

func (in *ClusterDef) DeepCopy() *ClusterDef

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

func (*ClusterDef) DeepCopyInto

func (in *ClusterDef) DeepCopyInto(out *ClusterDef)

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

func (*ClusterDef) DeepCopyObject

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

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

func (*ClusterDef) Default added in v0.8.0

func (r *ClusterDef) Default()

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

func (*ClusterDef) SetupWebhookWithManager added in v0.8.0

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

func (*ClusterDef) ValidateCreate added in v0.8.0

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

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

func (*ClusterDef) ValidateDelete added in v0.8.0

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

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

func (*ClusterDef) ValidateUpdate added in v0.8.0

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

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

type ClusterDefList

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

ClusterDefList contains a list of ClusterDef +kubebuilder:object:root=true

func (*ClusterDefList) DeepCopy

func (in *ClusterDefList) DeepCopy() *ClusterDefList

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

func (*ClusterDefList) DeepCopyInto

func (in *ClusterDefList) DeepCopyInto(out *ClusterDefList)

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

func (*ClusterDefList) DeepCopyObject

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

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

type ClusterDefSpec

type ClusterDefSpec struct {

	// Source is the location of the cluster definition.
	Source GitLocation `json:"source"`
	// CredentialName is the user credentials for accessing git repository
	// It must be in a secret in the same namespace
	CredentialName string `json:"credentialName"`
	// ConfigurationName is the configuration supplied by the infrastructure
	// administrator to render the specification of the cluster definition
	// It is a configmap in the same namespace
	ConfigurationName string `json:"configurationName"`
	// CidataName is the name of the configmap that customize the cluster
	// cloud-init datas. This has precedence over all other sources of
	// cloud-init data.
	CidataName string `json:"cidataName,omitempty"`
	// PivotInfo contains information needed for the pivoting of the
	// management functions from the management cluster to the workload cluster.
	PivotInfo PivotInformation `json:"pivotInfo,omitempty"`
	// MultiTenant is a boolean that indicates if the cluster namespace
	// is managed in multitenant mode.
	// If MultiTenant = false : the target cluster namespace
	// is the same as the clusterdef resource.
	// If MultiTenant = true : the target cluster namespace
	// is the concatenation of name/namespace.
	// of the clusterdef resource
	MultiTenant bool `json:"multiTenant,omitempty"`
	// PoolUserList contains information to access the brokerdef for a pool user
	PoolUserList map[string]PoolUserSpec `json:"poolUserList,omitempty"`
	// NetworkList contains information to access the brokernet for a network definition
	NetworkList map[string]NetworkSpec `json:"networkList,omitempty"`
	// CreateArgoCDSecret indicates if the argoCD secret associated with the target cluster should be created
	CreateArgocdClusterSecret bool `json:"createArgocdClusterSecret,omitempty"`
}

ClusterDefSpec defines the desired state of ClusterDef

func (*ClusterDefSpec) DeepCopy

func (in *ClusterDefSpec) DeepCopy() *ClusterDefSpec

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

func (*ClusterDefSpec) DeepCopyInto

func (in *ClusterDefSpec) DeepCopyInto(out *ClusterDefSpec)

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

type ClusterDefState

type ClusterDefState string

ClusterDefState describes the possible phase of the cluster definition +kubebuilder:validation:Enum=ApplicationCreated;ApplicationSynced;ClusterProvisionned;Ready;Running;Failed

const (
	// ApplicationCreated means the resources have been created
	ApplicationCreated ClusterDefState = "ApplicationCreated"
	// ApplicationSynced means the application is synced
	ApplicationSynced ClusterDefState = "ApplicationSynced"
	// ClusterProvisionned means that it is possible to connect to the cluster
	ClusterProvisionned ClusterDefState = "ClusterProvisionned"
	// Ready means that control plane node is ready to receive requests.
	Ready ClusterDefState = "Ready"
	// Running means that all nodes of the cluster are running.
	Running ClusterDefState = "Running"
	// Failed means that the application failed to deploy
	Failed ClusterDefState = "Failed"
)

type ClusterDefStatus

type ClusterDefStatus struct {
	// Status of pivot
	// +optional
	PivotStatus PivotState `json:"pivotstatus"`
	// Status of deployment
	// +optional
	Phase ClusterDefState `json:"phase"`
	// ControlPlaneVersion is the version supported by control plane
	// +optional
	ControlPlaneVersion string `json:"controlPlaneVersion"`
	// +optional
	// MachineVersions is a sorted array of different versions of the kubelet
	// deployed on machines
	MachineVersions []string `json:"machineVersions"`
}

ClusterDefStatus defines the observed state of ClusterDef

func (*ClusterDefStatus) DeepCopy

func (in *ClusterDefStatus) DeepCopy() *ClusterDefStatus

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

func (*ClusterDefStatus) DeepCopyInto

func (in *ClusterDefStatus) DeepCopyInto(out *ClusterDefStatus)

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

type GitLocation

type GitLocation struct {
	// Repository is the URL of the project hosting the files
	Repository string `json:"repository"`
	// Branch is the git branch followed by ClusterDef
	Branch string `json:"branch,omitempty"`
	// Path is the subpath of the folder hosting the configuration file.
	Path string `json:"path,omitempty"`
}

GitLocation defines a complete path to a version of a folder on a git repository

func (*GitLocation) DeepCopy

func (in *GitLocation) DeepCopy() *GitLocation

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

func (*GitLocation) DeepCopyInto

func (in *GitLocation) DeepCopyInto(out *GitLocation)

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

type NetworkSpec added in v0.8.8

type NetworkSpec struct {
	// NetworkdefName is the name of the network definition
	NetworkdefName string `json:"networkdefName"`
	// Address is the address of the brokernet
	Address string `json:"address"`
	// BrokerConfig is the name of the configmap containing the brokernet CA
	BrokerConfig string `json:"brokerConfig"`
	// BrokerCredentials is the name of the secret containing
	// the credentials for the brokernet
	BrokerCredentials string `json:"brokerCredentials"`
}

NetworkSpec contains information for interacting with a network definition

func (*NetworkSpec) DeepCopy added in v0.8.8

func (in *NetworkSpec) DeepCopy() *NetworkSpec

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

func (*NetworkSpec) DeepCopyInto added in v0.8.8

func (in *NetworkSpec) DeepCopyInto(out *NetworkSpec)

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

type PivotInformation added in v0.8.0

type PivotInformation struct {
	// Pivot indicates if the cluster pivoting process should be launched
	Pivot bool `json:"pivot"`
	// BareMetalPoolList contains the list of BareMetalPool
	// custom resources to be moved on the target cluster
	BareMetalPoolList []string `json:"bareMetalPoolList,omitempty"`
	// NetworkList contains the list of Network custom resources
	// to be moved on the target cluster
	NetworkList []string `json:"networkList,omitempty"`
	// Kanod operator custom resource name
	KanodName string `json:"kanodName"`
	// namespace of the Kanod operator custom resource
	KanodNamespace string `json:"kanodNamespace"`
	// interface used by ironic
	IronicItf string `json:"ironicItf"`
	// ByoHostPoolUsed indicates id byohostpool is used
	ByoHostPoolUsed bool `json:"byoHostPoolUsed,omitempty"`
	// DhcpConfigList contains the list of DhcpConfig custom resources
	DhcpConfigList []string `json:"dhcpConfigList,omitempty"`
	// IppoolList contains the list of Ippool custom resources
	IppoolList []string `json:"ippoolList,omitempty"`
}

Pivot defines informations nedded for pivoting

func (*PivotInformation) DeepCopy added in v0.8.0

func (in *PivotInformation) DeepCopy() *PivotInformation

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

func (*PivotInformation) DeepCopyInto added in v0.8.0

func (in *PivotInformation) DeepCopyInto(out *PivotInformation)

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

type PivotState added in v0.8.0

type PivotState string

PivotState describes the possible phase of the cluster pivoting process +kubebuilder:validation:Enum=NotPivoted;TargetClusterInfoStored;KanodOperatorInstalled;KanodOperatorReady;KanodResourcesMoved;StackDeployed;ArgoAppDeleted;ResourcesLabeled;BareMetalPoolPaused;ByoHostPoolPaused;ByoHostPausedAnConfigured;NetworkPaused;ResourcesPivoted;ResourcesUnlabeled;BmpResourcesPivoted;ByoHostPoolResourcesPivoted;NetworkResourcesPivoted;BareMetalPoolUnPaused;ByoHostUnPaused;ByoHostPoolUnPaused;NetworkUnPaused;IronicOnLocalClusterScaledToZero;IronicOnLocalClusterUndeployed;IronicOnLocalClusterScaledToOne;IronicOnLocalClusterRedeployed;ClusterPivoted

const (
	// NotPivoted
	NotPivoted PivotState = "NotPivoted"
	// TargetClusterInfoStored
	TargetClusterInfoStored PivotState = "TargetClusterInfoStored"
	// KanodOperatorInstalled
	KanodOperatorInstalled PivotState = "KanodOperatorInstalled"
	// KanodOperatorReady
	KanodOperatorReady PivotState = "KanodOperatorReady"
	// KanodResourcesMoved
	KanodResourcesMoved PivotState = "KanodResourcesMoved"
	// StackDeployed
	StackDeployed PivotState = "StackDeployed"
	// ArgoAppDeleted
	ArgoAppDeleted PivotState = "ArgoAppDeleted"
	// ResourcesLabeled
	ResourcesLabeled PivotState = "ResourcesLabeled"
	// BareMetalPoolPaused
	BareMetalPoolPaused PivotState = "BareMetalPoolPaused"
	// ByoHostPoolPaused
	ByoHostPoolPaused PivotState = "ByoHostPoolPaused"
	// ByoHostPausedAnConfigured
	ByoHostPausedAnConfigured PivotState = "ByoHostPausedAnConfigured"
	// NetworkPaused
	NetworkPaused PivotState = "NetworkPaused"
	// ResourcesPivoted
	ResourcesPivoted PivotState = "ResourcesPivoted"
	// ResourcesUnlabeled
	ResourcesUnlabeled PivotState = "ResourcesUnlabeled"
	// BmpResourcesPivoted
	BmpResourcesPivoted PivotState = "BmpResourcesPivoted"
	// ByoHostPoolResourcesPivoted
	ByoHostPoolResourcesPivoted PivotState = "ByoHostPoolResourcesPivoted"
	// NetworkResourcesPivoted
	NetworkResourcesPivoted PivotState = "NetworkResourcesPivoted"
	// BareMetalPoolUnPaused
	BareMetalPoolUnPaused PivotState = "BareMetalPoolUnPaused"
	// ByoHostUnPaused
	ByoHostUnPaused PivotState = "ByoHostUnPaused"
	// ByoHostPoolUnPaused
	ByoHostPoolUnPaused PivotState = "ByoHostPoolUnPaused"
	// NetworkUnPaused
	NetworkUnPaused PivotState = "NetworkUnPaused"
	// IronicOnLocalClusterScaledToZero
	IronicOnLocalClusterScaledToZero PivotState = "IronicOnLocalClusterScaledToZero"
	// IronicOnLocalClusterUndeployed
	IronicOnLocalClusterUndeployed PivotState = "IronicOnLocalClusterUndeployed"
	// IronicOnLocalClusterScaledToOne
	IronicOnLocalClusterScaledToOne PivotState = "IronicOnLocalClusterScaledToOne"
	// IronicOnLocalClusterRedeployed
	IronicOnLocalClusterRedeployed PivotState = "IronicOnLocalClusterRedeployed"
	// ClusterPivoted
	ClusterPivoted PivotState = "ClusterPivoted"
)

type PoolUserSpec added in v0.8.8

type PoolUserSpec struct {
	// Username of the pool user
	Username string `json:"username"`
	// Address is the address of the broker
	Address string `json:"address"`
	// BrokerConfig is the name of the configmap containing the broker CA
	BrokerConfig string `json:"brokerConfig"`
	// BrokerCredentials is the name of the secret containing
	// the credentials for the broker
	BrokerCredentials string `json:"brokerCredentials"`
}

PoolUser contains information for interacting with a poolUser

func (*PoolUserSpec) DeepCopy added in v0.8.8

func (in *PoolUserSpec) DeepCopy() *PoolUserSpec

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

func (*PoolUserSpec) DeepCopyInto added in v0.8.8

func (in *PoolUserSpec) DeepCopyInto(out *PoolUserSpec)

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