v1beta1

package
v1.4.7 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2024 License: Apache-2.0 Imports: 12 Imported by: 11

Documentation

Overview

Package v1beta1 contains API Schema definitions for the embeddedcluster v1beta1 API group. +kubebuilder:object:generate=true +groupName=embeddedcluster.replicated.com

Index

Constants

View Source
const (
	InstallationStateWaiting                string = "Waiting"
	InstallationStateCopyingArtifacts       string = "CopyingArtifacts"
	InstallationStateEnqueued               string = "Enqueued"
	InstallationStateInstalling             string = "Installing"
	InstallationStateInstalled              string = "Installed"
	InstallationStateKubernetesInstalled    string = "KubernetesInstalled"
	InstallationStateAddonsInstalling       string = "AddonsInstalling"
	InstallationStateHelmChartUpdateFailure string = "HelmChartUpdateFailure"
	InstallationStateObsolete               string = "Obsolete"
	InstallationStateFailed                 string = "Failed"
	InstallationStateUnknown                string = "Unknown"
	InstallationStatePendingChartCreation   string = "PendingChartCreation"
)

What follows is a list of all valid states for an Installation object.

View Source
const ConfigSecretEntryName = "config.yaml"

ConfigSecretEntryName holds the entry name we are looking for in the secret that holds the embedded cluster configuration.

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "embeddedcluster.replicated.com", 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

func ConvertTo added in v1.4.3

Types

type ArtifactsLocation

type ArtifactsLocation struct {
	Images                  string            `json:"images"`
	HelmCharts              string            `json:"helmCharts"`
	EmbeddedClusterBinary   string            `json:"embeddedClusterBinary"`
	EmbeddedClusterMetadata string            `json:"embeddedClusterMetadata"`
	AdditionalArtifacts     map[string]string `json:"additionalArtifacts,omitempty"`
}

ArtifactsLocation defines a location from where we can download an airgap bundle. It contains individual URLs for each component of the bundle. These URLs are expected to point to a registry running inside the cluster, authentication for the registry is read from the cluster at execution time so they do not need to be provided here.

func (*ArtifactsLocation) DeepCopy

func (in *ArtifactsLocation) DeepCopy() *ArtifactsLocation

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

func (*ArtifactsLocation) DeepCopyInto

func (in *ArtifactsLocation) DeepCopyInto(out *ArtifactsLocation)

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

type BuiltInExtension added in v1.1.5

type BuiltInExtension struct {
	// The name of the helm chart to override values of, for instance `openebs`.
	Name string `json:"name"`
	// YAML-formatted helm values that will override those provided to the
	// chart by Embedded Cluster. Properties are overridden individually -
	// setting a new value for `images.tag` here will not prevent Embedded
	// Cluster from setting `images.pullPolicy = IfNotPresent`, for example.
	Values string `json:"values"`
}

BuiltInExtension holds the override for a built-in extension (add-on).

func (*BuiltInExtension) DeepCopy added in v1.1.5

func (in *BuiltInExtension) DeepCopy() *BuiltInExtension

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

func (*BuiltInExtension) DeepCopyInto added in v1.1.5

func (in *BuiltInExtension) DeepCopyInto(out *BuiltInExtension)

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

type Chart added in v1.4.3

type Chart struct {
	Name      string `json:"name,omitempty"`
	ChartName string `json:"chartname,omitempty"`
	Version   string `json:"version,omitempty"`
	// +kubebuilder:validation:Optional
	Values   string `json:"values,omitempty"`
	TargetNS string `json:"namespace,omitempty"`
	// Timeout specifies the timeout for how long to wait for the chart installation to finish.
	// +kubebuilder:validation:Optional
	Timeout time.Duration `json:"timeout,omitempty"`
	// +kubebuilder:validation:Optional
	Order int `json:"order,omitempty"`
}

Chart single helm addon

func (*Chart) DeepCopy added in v1.4.3

func (in *Chart) DeepCopy() *Chart

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

func (*Chart) DeepCopyInto added in v1.4.3

func (in *Chart) DeepCopyInto(out *Chart)

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

type Config

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

	Spec   ConfigSpec   `json:"spec,omitempty"`
	Status ConfigStatus `json:"status,omitempty"`
}

Config is the Schema for the configs API

func (*Config) DeepCopy

func (in *Config) DeepCopy() *Config

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

func (*Config) DeepCopyInto

func (in *Config) DeepCopyInto(out *Config)

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

func (*Config) DeepCopyObject

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

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

type ConfigList

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

ConfigList contains a list of Config

func (*ConfigList) DeepCopy

func (in *ConfigList) DeepCopy() *ConfigList

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

func (*ConfigList) DeepCopyInto

func (in *ConfigList) DeepCopyInto(out *ConfigList)

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

func (*ConfigList) DeepCopyObject

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

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

type ConfigSecret added in v1.1.9

type ConfigSecret struct {
	Name      string `json:"name"`
	Namespace string `json:"namespace"`
}

ConfigSecret holds a reference to secret containing the embedded cluster config. The config found on this secret overrides the configuration found in the InstallationSpec.

func (*ConfigSecret) DeepCopy added in v1.1.9

func (in *ConfigSecret) DeepCopy() *ConfigSecret

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

func (*ConfigSecret) DeepCopyInto added in v1.1.9

func (in *ConfigSecret) DeepCopyInto(out *ConfigSecret)

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

type ConfigSpec

type ConfigSpec struct {
	Version              string               `json:"version,omitempty"`
	Roles                Roles                `json:"roles,omitempty"`
	UnsupportedOverrides UnsupportedOverrides `json:"unsupportedOverrides,omitempty"`
	Extensions           Extensions           `json:"extensions,omitempty"`
}

ConfigSpec defines the desired state of Config

func (*ConfigSpec) ApplyEndUserAddOnOverrides added in v1.1.6

func (c *ConfigSpec) ApplyEndUserAddOnOverrides(name, cfg string) (string, error)

ApplyEndUserAddOnOverrides applies the end-user provided addon config on top of the provided addon configuration (cfg).

func (*ConfigSpec) DeepCopy

func (in *ConfigSpec) DeepCopy() *ConfigSpec

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

func (*ConfigSpec) DeepCopyInto

func (in *ConfigSpec) DeepCopyInto(out *ConfigSpec)

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

func (ConfigSpec) OverrideForBuiltIn added in v1.1.6

func (c ConfigSpec) OverrideForBuiltIn(bi string) string

OverrideForBuiltIn returns the override for the built-in extension with the given name. If no override is found an empty string is returned.

type ConfigStatus

type ConfigStatus struct {
}

ConfigStatus defines the observed state of Config

func (*ConfigStatus) DeepCopy

func (in *ConfigStatus) DeepCopy() *ConfigStatus

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

func (*ConfigStatus) DeepCopyInto

func (in *ConfigStatus) DeepCopyInto(out *ConfigStatus)

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

type Extensions

type Extensions struct {
	Helm *Helm `json:"helm,omitempty"`
}

func (*Extensions) DeepCopy

func (in *Extensions) DeepCopy() *Extensions

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

func (*Extensions) DeepCopyInto

func (in *Extensions) DeepCopyInto(out *Extensions)

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

type Helm added in v1.4.3

type Helm struct {
	// +kubebuilder:validation:Optional
	ConcurrencyLevel int `json:"concurrencyLevel"`
	// +kubebuilder:validation:Optional
	Repositories []Repository `json:"repositories"`
	// +kubebuilder:validation:Optional
	Charts []Chart `json:"charts"`
}

Helm contains helm extension settings

func ConvertFrom added in v1.4.3

func ConvertFrom(e k0sv1beta1.HelmExtensions, t *Helm) (*Helm, error)

func (*Helm) DeepCopy added in v1.4.3

func (in *Helm) DeepCopy() *Helm

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

func (*Helm) DeepCopyInto added in v1.4.3

func (in *Helm) DeepCopyInto(out *Helm)

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

type Installation

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

	Spec   InstallationSpec   `json:"spec,omitempty"`
	Status InstallationStatus `json:"status,omitempty"`
}

Installation is the Schema for the installations API

func (*Installation) DeepCopy

func (in *Installation) DeepCopy() *Installation

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

func (*Installation) DeepCopyInto

func (in *Installation) DeepCopyInto(out *Installation)

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

func (*Installation) DeepCopyObject

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

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

type InstallationList

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

InstallationList contains a list of Installation

func (*InstallationList) DeepCopy

func (in *InstallationList) DeepCopy() *InstallationList

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

func (*InstallationList) DeepCopyInto

func (in *InstallationList) DeepCopyInto(out *InstallationList)

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

func (*InstallationList) DeepCopyObject

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

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

type InstallationSpec

type InstallationSpec struct {
	// ClusterID holds the cluster, generated during the installation.
	ClusterID string `json:"clusterID,omitempty"`
	// MetricsBaseURL holds the base URL for the metrics server.
	MetricsBaseURL string `json:"metricsBaseURL,omitempty"`
	// HighAvailability indicates if the installation is high availability.
	HighAvailability bool `json:"highAvailability,omitempty"`
	// AirGap indicates if the installation is airgapped.
	AirGap bool `json:"airGap,omitempty"`
	// Artifacts holds the location of the airgap bundle.
	Artifacts *ArtifactsLocation `json:"artifacts,omitempty"`
	// Proxy holds the proxy configuration.
	Proxy *ProxySpec `json:"proxy,omitempty"`
	// Network holds the network configuration.
	Network *NetworkSpec `json:"network,omitempty"`
	// Config holds the configuration used at installation time.
	Config *ConfigSpec `json:"config,omitempty"`
	// EndUserK0sConfigOverrides holds the end user k0s config overrides
	// used at installation time.
	EndUserK0sConfigOverrides string `json:"endUserK0sConfigOverrides,omitempty"`
	// BinaryName holds the name of the binary used to install the cluster.
	// this will follow the pattern 'appslug-channelslug'
	BinaryName string `json:"binaryName,omitempty"`
	// LicenseInfo holds information about the license used to install the cluster.
	LicenseInfo *LicenseInfo `json:"licenseInfo,omitempty"`
	// ConfigSecret holds a secret name and namespace. If this is set it means that
	// the Config for this Installation object must be read from there. This option
	// supersedes (overrides) the Config field.
	ConfigSecret *ConfigSecret `json:"configSecret,omitempty"`
}

InstallationSpec defines the desired state of Installation.

func (*InstallationSpec) DeepCopy

func (in *InstallationSpec) DeepCopy() *InstallationSpec

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

func (*InstallationSpec) DeepCopyInto

func (in *InstallationSpec) DeepCopyInto(out *InstallationSpec)

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

func (*InstallationSpec) ParseConfigSpecFromSecret added in v1.1.9

func (i *InstallationSpec) ParseConfigSpecFromSecret(secret corev1.Secret) error

ParseConfigSpecFromSecret reads the embedded cluster configuration from a secret. This function overrides the Config field in the InstallationSpec but does not save it to the cluster.

type InstallationStatus

type InstallationStatus struct {
	// NodesStatus is a list of nodes and their status.
	NodesStatus []NodeStatus `json:"nodesStatus,omitempty"`
	// State holds the current state of the installation.
	State string `json:"state,omitempty"`
	// Reason holds the reason for the current state.
	Reason string `json:"reason,omitempty"`
	// PendingCharts holds the list of charts that are being created or updated.
	PendingCharts []string `json:"pendingCharts,omitempty"`

	// Conditions is an array of current observed installation conditions.
	// +listType=map
	// +listMapKey=type
	// +patchStrategy=merge
	// +patchMergeKey=type
	// +optional
	Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,1,rep,name=conditions"`
}

InstallationStatus defines the observed state of Installation

func (*InstallationStatus) DeepCopy

func (in *InstallationStatus) DeepCopy() *InstallationStatus

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

func (*InstallationStatus) DeepCopyInto

func (in *InstallationStatus) DeepCopyInto(out *InstallationStatus)

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

func (*InstallationStatus) GetKubernetesInstalled

func (s *InstallationStatus) GetKubernetesInstalled() bool

func (*InstallationStatus) SetCondition added in v1.3.3

func (s *InstallationStatus) SetCondition(condition metav1.Condition) bool

SetState sets the installation state and reason.

func (*InstallationStatus) SetState

func (s *InstallationStatus) SetState(state string, reason string, pendingCharts []string)

SetState sets the installation state and reason.

type LicenseInfo added in v1.1.3

type LicenseInfo struct {
	IsDisasterRecoverySupported bool `json:"isDisasterRecoverySupported,omitempty"`
}

LicenseInfo holds information about the license used to install the cluster.

func (*LicenseInfo) DeepCopy added in v1.1.5

func (in *LicenseInfo) DeepCopy() *LicenseInfo

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

func (*LicenseInfo) DeepCopyInto added in v1.1.5

func (in *LicenseInfo) DeepCopyInto(out *LicenseInfo)

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

type NetworkSpec added in v1.3.11

type NetworkSpec struct {
	PodCIDR       string `json:"podCIDR,omitempty"`
	ServiceCIDR   string `json:"serviceCIDR,omitempty"`
	NodePortRange string `json:"nodePortRange,omitempty"`
}

NetworkSpec holds the network configuration.

func (*NetworkSpec) DeepCopy added in v1.3.11

func (in *NetworkSpec) DeepCopy() *NetworkSpec

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

func (*NetworkSpec) DeepCopyInto added in v1.3.11

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

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

type NodeCount

type NodeCount struct {
	// Values holds a list of allowed node counts.
	Values []int `json:"values,omitempty"`
	// NodeRange contains a min and max or only one of them (conflicts
	// with Values).
	Range *NodeRange `json:"range,omitempty"`
}

NodeCount holds a series of rules for a given node role.

func (*NodeCount) DeepCopy

func (in *NodeCount) DeepCopy() *NodeCount

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

func (*NodeCount) DeepCopyInto

func (in *NodeCount) DeepCopyInto(out *NodeCount)

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

type NodeRange

type NodeRange struct {
	// Min is the minimum number of nodes.
	Min *int `json:"min,omitempty"`
	// Max is the maximum number of nodes.
	Max *int `json:"max,omitempty"`
}

NodeRange contains a min and max or only one of them.

func (*NodeRange) DeepCopy

func (in *NodeRange) DeepCopy() *NodeRange

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

func (*NodeRange) DeepCopyInto

func (in *NodeRange) DeepCopyInto(out *NodeRange)

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

type NodeRole

type NodeRole struct {
	Name        string            `json:"name,omitempty"`
	Description string            `json:"description,omitempty"`
	NodeCount   *NodeCount        `json:"nodeCount,omitempty"`
	Labels      map[string]string `json:"labels,omitempty"`
}

NodeRole is the role of a node in the cluster.

func (*NodeRole) DeepCopy

func (in *NodeRole) DeepCopy() *NodeRole

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

func (*NodeRole) DeepCopyInto

func (in *NodeRole) DeepCopyInto(out *NodeRole)

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

type NodeStatus

type NodeStatus struct {
	Name string `json:"name"`
	Hash string `json:"hash"`
}

NodeStatus is used to keep track of the status of a cluster node, we only hold its name and a hash of the node's status. Whenever the node status change we will be able to capture it and update the hash.

func (*NodeStatus) DeepCopy

func (in *NodeStatus) DeepCopy() *NodeStatus

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

func (*NodeStatus) DeepCopyInto

func (in *NodeStatus) DeepCopyInto(out *NodeStatus)

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

type ProxySpec added in v1.3.9

type ProxySpec struct {
	HTTPProxy  string `json:"httpProxy,omitempty"`
	HTTPSProxy string `json:"httpsProxy,omitempty"`
	NoProxy    string `json:"noProxy,omitempty"`
}

ProxySpec holds the proxy configuration.

func (*ProxySpec) DeepCopy added in v1.3.9

func (in *ProxySpec) DeepCopy() *ProxySpec

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

func (*ProxySpec) DeepCopyInto added in v1.3.9

func (in *ProxySpec) DeepCopyInto(out *ProxySpec)

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

type Repository added in v1.4.4

type Repository struct {
	Name     string `json:"name,omitempty"`
	URL      string `json:"url,omitempty"`
	CAFile   string `json:"caFile,omitempty"`
	CertFile string `json:"certFile,omitempty"`
	Insecure bool   `json:"insecure,omitempty"`
	KeyFile  string `json:"keyfile,omitempty"`
	Username string `json:"username,omitempty"`
	Password string `json:"password,omitempty"`
}

func (*Repository) DeepCopy added in v1.4.4

func (in *Repository) DeepCopy() *Repository

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

func (*Repository) DeepCopyInto added in v1.4.4

func (in *Repository) DeepCopyInto(out *Repository)

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

type Roles

type Roles struct {
	Controller NodeRole   `json:"controller,omitempty"`
	Custom     []NodeRole `json:"custom,omitempty"`
}

Roles is the various roles in the cluster.

func (*Roles) DeepCopy

func (in *Roles) DeepCopy() *Roles

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

func (*Roles) DeepCopyInto

func (in *Roles) DeepCopyInto(out *Roles)

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

type UnsupportedOverrides

type UnsupportedOverrides struct {
	// K0s holds the overrides used to configure k0s. These overrides
	// are merged on top of the default k0s configuration. As the data
	// layout inside this configuration is very dynamic we have chosen
	// to use a string here.
	K0s string `json:"k0s,omitempty"`
	// BuiltInExtensions holds overrides for the default add-ons we ship
	// with Embedded Cluster.
	BuiltInExtensions []BuiltInExtension `json:"builtInExtensions,omitempty"`
}

UnsupportedOverrides holds the config overrides used to configure the cluster.

func (*UnsupportedOverrides) DeepCopy

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

func (*UnsupportedOverrides) DeepCopyInto

func (in *UnsupportedOverrides) DeepCopyInto(out *UnsupportedOverrides)

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