v1alpha1

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package v1alpha1 implements the v1alpha1 apiVersion of vab's cluster configuration

+k8s:deepcopy-gen=package

Index

Constants

View Source
const (
	// Valid value for the kind property of the configuration
	Kind = "ClustersConfiguration"
	// Valid value for the apiVersion property of the configuration
	Version = "vab.mia-platform.eu/v1alpha1"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Cluster

type Cluster struct {

	// The cluster name
	// It is required to reference the cluster directory
	Name string `yaml:"name,omitempty"`

	// Name of the context used by the cluster
	Context string `yaml:"context,omitempty"`

	// Dictionary of Modules
	// This field can be used to add a new module
	// or patch/disable a default module
	// Modules in the dictionary are referenced by "module-name/flavor-name"
	// For example: ingress/traefik, cni/cilium, etc.
	Modules map[string]Package `yaml:"modules,omitempty"`

	// Dictionary of AddOns
	// This field can be used to add a new add-on
	// or patch/disable a default add-on
	// AddOns in the dictionary are referenced by their name
	AddOns map[string]Package `yaml:"addOns,omitempty"`
}

Cluster contains the configuration of a cluster and customizations of its modules/add-ons

func (*Cluster) DeepCopy

func (in *Cluster) DeepCopy() *Cluster

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

func (*Cluster) DeepCopyInto

func (in *Cluster) DeepCopyInto(out *Cluster)

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

func (*Cluster) UnmarshalYAML

func (cluster *Cluster) UnmarshalYAML(value *yaml.Node) error

UnmarshalYAML conform to Unmarshaler interface for customize the modules and addons maps enriching the Package structs with additionals information

type ClustersConfiguration

type ClustersConfiguration struct {
	TypeMeta `yaml:",inline"`

	// The configuration name
	Name string `yaml:"name,omitempty"`

	// ConfigSpec contains the configuration of the clusters
	// It includes the modules and add-ons installed by default
	// as well as the list of cluster groups
	Spec ConfigSpec `yaml:"spec"`
}

ClustersConfiguration contains the schema for vab's configuration

func EmptyConfig

func EmptyConfig(name string) *ClustersConfiguration

EmptyConfig generates an empty ClustersConfiguration with provided name

func (*ClustersConfiguration) DeepCopy

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

func (*ClustersConfiguration) DeepCopyInto

func (in *ClustersConfiguration) DeepCopyInto(out *ClustersConfiguration)

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

type ConfigSpec

type ConfigSpec struct {

	// Dictionary of Modules
	// These modules will be installed on every cluster
	// unless otherwise specified
	// Modules in the dictionary are referenced by module-name/flavor-name
	// For example: ingress/traefik, cni/cilium, etc.
	Modules map[string]Package `yaml:"modules"`

	// Dictionary of AddOns
	// These add-ons will be installed on every cluster
	// unless otherwise specified
	// AddOns in the dictionary are referenced by their name
	AddOns map[string]Package `yaml:"addOns"`

	// Groups contains the list of cluster groups
	Groups []Group `yaml:"groups"`
}

ConfigSpec contains the configuration of the clusters

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) UnmarshalYAML

func (configSpec *ConfigSpec) UnmarshalYAML(value *yaml.Node) error

UnmarshalYAML conform to Unmarshaler interface for customize the modules and addons maps enriching the Package structs with additionals information

type Group

type Group struct {

	// The group name
	Name string `yaml:"name,omitempty"`

	// Clusters contains the list of the clusters in the group
	// This field is required to reference the clusters correctly
	// in the directory structure
	Clusters []Cluster `yaml:"clusters,omitempty"`
}

Group contains the configuration of a cluster group

func (*Group) DeepCopy

func (in *Group) DeepCopy() *Group

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

func (*Group) DeepCopyInto

func (in *Group) DeepCopyInto(out *Group)

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

type Package

type Package struct {

	// Version of the module to be installed
	Version string `yaml:"version"`

	// Flag that disables the add-on if set to true
	Disable bool `yaml:"disable"`
	// contains filtered or unexported fields
}

Module contains the module's version and priority

func NewAddon

func NewAddon(t *testing.T, name string, version string, disable bool) Package

func NewModule

func NewModule(t *testing.T, name string, version string, disable bool) Package

func (*Package) DeepCopy

func (in *Package) DeepCopy() *Package

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

func (*Package) DeepCopyInto

func (in *Package) DeepCopyInto(out *Package)

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

func (Package) GetFlavorName

func (pkg Package) GetFlavorName() string

GetFlavorName return the flavor name of the package if is a module or an empty string otherwise

func (Package) GetName

func (pkg Package) GetName() string

GetName return the canonical name of the package

func (Package) IsModule

func (pkg Package) IsModule() bool

IsModule return the value of the private property with the same name

func (Package) PackageType

func (pkg Package) PackageType() string

PackageType return the type of the package in string form

type TypeMeta

type TypeMeta struct {
	Kind       string `yaml:"kind,omitempty"`
	APIVersion string `yaml:"apiVersion,omitempty"`
}

TypeMeta partially copies apimachinery/pkg/apis/meta/v1.TypeMeta

func (*TypeMeta) DeepCopy

func (in *TypeMeta) DeepCopy() *TypeMeta

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

func (*TypeMeta) DeepCopyInto

func (in *TypeMeta) DeepCopyInto(out *TypeMeta)

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