types

package
v1.0.18 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DigToString

func DigToString(m dig.Mapping, keys ...string) string

func ParseCoreComponentManifests

func ParseCoreComponentManifests(data []byte) (v1.HelmChart, error)

Types

type Addon

type Addon struct {
	Name      string        `yaml:"name" json:"name"`
	Kind      string        `yaml:"kind" json:"kind"`
	Enabled   bool          `yaml:"enabled" json:"enabled"`
	DryRun    bool          `yaml:"dryRun" json:"dryRun"`
	Namespace string        `yaml:"namespace,omitempty" json:"namespace,omitempty"`
	Chart     *ChartInfo    `yaml:"chart,omitempty" json:"chart,omitempty"`
	Manifest  *ManifestInfo `yaml:"manifest,omitempty" json:"manifest,omitempty"`
}

Addon defines the desired state of an Addon

func (*Addon) Validate

func (a *Addon) Validate() error

Validate checks the Addon structure and its children

type Blueprint

type Blueprint struct {
	APIVersion string        `yaml:"apiVersion" json:"apiVersion"`
	Kind       string        `yaml:"kind" json:"kind"`
	Metadata   Metadata      `yaml:"metadata" json:"metadata"`
	Spec       BlueprintSpec `yaml:"spec" json:"spec"`
}

func ConvertToClusterWithK0s

func ConvertToClusterWithK0s(k0s K0sCluster, components Components) Blueprint

func ConvertToClusterWithKind

func ConvertToClusterWithKind(name string, components Components) Blueprint

func ParseBoundlessCluster

func ParseBoundlessCluster(data []byte) (Blueprint, error)

func (*Blueprint) Validate

func (b *Blueprint) Validate() error

Validate checks the Blueprint structure and its children

type BlueprintSpec

type BlueprintSpec struct {
	Version    string      `yaml:"version" json:"version"`
	Kubernetes *Kubernetes `yaml:"kubernetes,omitempty" json:"kubernetes,omitempty"`
	Components Components  `yaml:"components" json:"components"`
	Resources  *Resources  `yaml:"resources,omitempty" json:"resources,omitempty"`
}

func (*BlueprintSpec) Validate

func (bs *BlueprintSpec) Validate() error

Validate checks the BlueprintSpec structure and its children

type CertManagement

type CertManagement struct {
	v1alpha1.CertManagement `json:",inline"`
}

CertManagement defines the desired state of cert-manager resources

func (*CertManagement) Validate

func (c *CertManagement) Validate() error

Validate checks the CertManagement structure and its children

type ChartInfo

type ChartInfo struct {
	Name    string                        `yaml:"name" json:"name"`
	Repo    string                        `yaml:"repo" json:"repo"`
	Version string                        `yaml:"version" json:"version"`
	Set     map[string]intstr.IntOrString `yaml:"set,omitempty" json:"set,omitempty"`
	Values  *apiextensionsv1.JSON         `yaml:"values,omitempty" json:"values,omitempty"`
}

ChartInfo defines the desired state of chart

func (*ChartInfo) Validate

func (ci *ChartInfo) Validate() error

Validate checks the ChartInfo structure and its children

type Components

type Components struct {
	Addons []Addon `yaml:"addons,omitempty" json:"addons,omitempty"`
}

func (*Components) Validate

func (c *Components) Validate() error

Validate checks the Components structure and its children

type CoreComponent

type CoreComponent struct {
	Enabled  bool        `yaml:"enabled" json:"enabled"`
	Provider string      `yaml:"provider" json:"provider"`
	Config   dig.Mapping `yaml:"config,omitempty" json:"config,omitempty"`
}

type Host

type Host struct {
	SSH          *SSHHost   `yaml:"ssh,omitempty" json:"ssh,omitempty"`
	LocalHost    *LocalHost `yaml:"localhost,omitempty" json:"localHost,omitempty"`
	Role         string     `yaml:"role" json:"role"`
	InstallFlags []string   `yaml:"installFlags,omitempty" json:"installFlags,omitempty"`
}

func (*Host) Validate

func (h *Host) Validate() error

Validate checks the Host structure and its children

type Infra

type Infra struct {
	Hosts []Host `yaml:"hosts" json:"hosts"`
}

func (*Infra) Validate

func (i *Infra) Validate() error

Validate checks the Infra structure and its children

type K0s

type K0s struct {
	Version       string      `yaml:"version" json:"version"`
	DynamicConfig bool        `yaml:"dynamicConfig" json:"dynamicConfig"`
	Config        dig.Mapping `yaml:"config,omitempty" json:"config"`
}

type K0sCluster

type K0sCluster struct {
	APIVersion string         `yaml:"apiVersion" json:"apiVersion"`
	Kind       string         `yaml:"kind" json:"kind"`
	Metadata   Metadata       `yaml:"metadata" json:"metadata"`
	Spec       K0sClusterSpec `yaml:"spec" json:"spec"`
}

func ConvertToK0s

func ConvertToK0s(cluster *Blueprint) K0sCluster

func ParseK0sCluster

func ParseK0sCluster(data []byte) (K0sCluster, error)

type K0sClusterSpec

type K0sClusterSpec struct {
	Hosts []Host `yaml:"hosts" json:"hosts"`
	K0S   K0s    `yaml:"k0s" json:"k0s"`
}

type Kubernetes

type Kubernetes struct {
	Provider   string      `yaml:"provider" json:"provider"`
	Version    string      `yaml:"version,omitempty" json:"version,omitempty"`
	Config     dig.Mapping `yaml:"config,omitempty" json:"config,omitempty"`
	Infra      *Infra      `yaml:"infra,omitempty" json:"infra,omitempty"`
	KubeConfig string      `yaml:"kubeconfig,omitempty" json:"kubeConfig,omitempty"`
}

func (*Kubernetes) Validate

func (k *Kubernetes) Validate() error

Validate checks the Kubernetes structure and its children

type LocalHost

type LocalHost struct {
	Enabled bool `yaml:"enabled"`
}

func (*LocalHost) Validate

func (l *LocalHost) Validate() error

Validate checks the LocalHost structure and its children

type ManifestInfo

type ManifestInfo struct {
	URL           string           `yaml:"url" json:"url"`
	FailurePolicy string           `yaml:"failurePolicy,omitempty" json:"failurePolicy,omitempty"`
	Timeout       string           `yaml:"timeout,omitempty" json:"timeout,omitempty"`
	Values        *v1alpha1.Values `yaml:"values,omitempty" json:"values,omitempty"`
}

ManifestInfo defines the desired state of manifest

func (*ManifestInfo) Validate

func (mi *ManifestInfo) Validate() error

Validate checks the ManifestInfo structure and its children

type Metadata

type Metadata struct {
	Name string `yaml:"name" json:"name"`
}

func (*Metadata) Validate

func (m *Metadata) Validate() error

Validate checks the Metadata structure and its children

type Resources

type Resources struct {
	CertManagement CertManagement `yaml:"certManagement,omitempty" json:"certManagement,omitempty"`
}

Resources defines the desired state of k8s resources managed by BOP

func (*Resources) Validate

func (r *Resources) Validate() error

Validate checks the Resources structure and its children

type SSHHost

type SSHHost struct {
	Address string `yaml:"address" json:"address"`
	KeyPath string `yaml:"keyPath" json:"keyPath"`
	Port    int    `yaml:"port" json:"port"`
	User    string `yaml:"user" json:"user"`
}

func (*SSHHost) Validate

func (sh *SSHHost) Validate() error

Validate checks the SSHHost structure and its children

Jump to

Keyboard shortcuts

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