types

package
v0.0.0-...-5b81301 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2024 License: GPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cluster

type Cluster struct {
	Name         string       `yaml:"name"`
	Controlplane Controlplane `yaml:"controlplane"`
	Compute      Compute      `yaml:"compute"`
	Vip          Vip          `yaml:"vip"`
}

Cluster represents a Kubernetes cluster configuration

type Compute

type Compute struct {
	Num                  int    `yaml:"num"`
	Core                 int    `yaml:"core"`
	Memory               int    `yaml:"memory"`
	BaseVmid             int    `yaml:"base_vmid"`
	AddressSansLastOctet string `yaml:"address_sans_last_octet"`
	LastOctet            int    `yaml:"last_octet"`
	GatewayLastOctet     int    `yaml:"gateway_last_octet"`
	Domain               string `yaml:"domain"`
	Nameserver           string `yaml:"nameserver"`
}

type Config

type Config struct {
	Clusters []Cluster `yaml:"clusters"`
}

Config represents the structure of the configuration file

type Controlplane

type Controlplane struct {
	Cluster              bool `yaml:"cluster"`
	Num                  int
	Core                 int    `yaml:"core"`
	Memory               int    `yaml:"memory"`
	BaseVmid             int    `yaml:"base_vmid"`
	AddressSansLastOctet string `yaml:"address_sans_last_octet"`
	LastOctet            int    `yaml:"last_octet"`
	GatewayLastOctet     int    `yaml:"gateway_last_octet"`
	Domain               string `yaml:"domain"`
	Nameserver           string `yaml:"nameserver"`
}

type InternalData

type InternalData struct {
	Clusters []InternalDataCluster
}

InternalData represents the internal data generated by the configuration generation process

type InternalDataCluster

type InternalDataCluster struct {
	Name    string
	Masters []InternalDataNode
	Workers []InternalDataNode
	Vip     bool
	Ha      bool
	HaIp    string
	HaFqdn  string
	SrvHa   bool
	SrvHaIp string

	AnsibleMasterGroup string
	AnsibleWorkerGroup string
}

InternalDataCluster represents the data of a single cluster in the InternalData

type InternalDataNode

type InternalDataNode struct {
	Host       string
	Domain     string
	IP         string
	Gateway    string
	Nameserver string

	Core   int
	Memory int

	TerraformResourceName string

	ProxmoxVMID          int
	ProxmoxVmName        string
	ProxmoxVmDescription string
	ProxmoxVmTags        []string
}

InternalDataNode represents the data of a generic node within a cluster

type IpRange

type IpRange struct {
	Start net.IP
	End   net.IP
}

IpRange rappresenta un intervallo di indirizzi IP.

type Vip

type Vip struct {
	Controlplane     bool   `yaml:"controlplane"`
	ControlplaneIp   string `yaml:"controlplane_ip"`
	ControlplaneFqdn string `yaml:"controlplane_fqdn"`
	Services         bool   `yaml:"services"`
}

Jump to

Keyboard shortcuts

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