talos

Форк
0
/
result.go 
66 строк · 1.5 Кб
1
// This Source Code Form is subject to the terms of the Mozilla Public
2
// License, v. 2.0. If a copy of the MPL was not distributed with this
3
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
4

5
package provision
6

7
import (
8
	"net/netip"
9

10
	"github.com/google/uuid"
11

12
	"github.com/siderolabs/talos/pkg/machinery/config/machine"
13
)
14

15
// Cluster describes the provisioned Cluster.
16
type Cluster interface {
17
	// Provisioner returns name of the provisioner used to build the cluster.
18
	Provisioner() string
19
	// StatePath returns path to the state directory of the cluster.
20
	StatePath() (string, error)
21
	// Info returns running cluster information.
22
	Info() ClusterInfo
23
}
24

25
// ClusterInfo describes the cluster.
26
type ClusterInfo struct {
27
	ClusterName string
28

29
	Network NetworkInfo
30
	Nodes   []NodeInfo
31

32
	// ExtraNodes are not part of the cluster.
33
	ExtraNodes []NodeInfo
34

35
	// KubernetesEndpoint is the endpoint of the Kubernetes API server.
36
	KubernetesEndpoint string
37
}
38

39
// NetworkInfo describes cluster network.
40
type NetworkInfo struct {
41
	Name              string
42
	CIDRs             []netip.Prefix
43
	GatewayAddrs      []netip.Addr
44
	MTU               int
45
	NoMasqueradeCIDRs []netip.Prefix
46
}
47

48
// NodeInfo describes a node.
49
type NodeInfo struct {
50
	ID   string
51
	UUID uuid.UUID
52
	Name string
53
	Type machine.Type
54

55
	// Share of CPUs, in 1e-9 fractions
56
	NanoCPUs int64
57
	// Memory limit in bytes
58
	Memory int64
59
	// Disk (volume) size in bytes, if applicable
60
	DiskSize uint64
61

62
	IPs []netip.Addr
63

64
	APIPort      int
65
	TPM2StateDir string
66
}
67

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.