talos
254 строки · 6.9 Кб
1syntax = "proto3";
2
3package talos.resource.definitions.k8s;
4
5option go_package = "github.com/siderolabs/talos/pkg/machinery/api/resource/definitions/k8s";
6
7import "common/common.proto";
8import "google/protobuf/struct.proto";
9import "resource/definitions/proto/proto.proto";
10
11// APIServerConfigSpec is configuration for kube-apiserver.
12message APIServerConfigSpec {
13string image = 1;
14string cloud_provider = 2;
15string control_plane_endpoint = 3;
16repeated string etcd_servers = 4;
17int64 local_port = 5;
18repeated string service_cid_rs = 6;
19map<string, string> extra_args = 7;
20repeated ExtraVolume extra_volumes = 8;
21map<string, string> environment_variables = 9;
22bool pod_security_policy_enabled = 10;
23string advertised_address = 11;
24Resources resources = 12;
25}
26
27// AdmissionControlConfigSpec is configuration for kube-apiserver.
28message AdmissionControlConfigSpec {
29repeated AdmissionPluginSpec config = 1;
30}
31
32// AdmissionPluginSpec is a single admission plugin configuration Admission Control plugins.
33message AdmissionPluginSpec {
34string name = 1;
35google.protobuf.Struct configuration = 2;
36}
37
38// AuditPolicyConfigSpec is audit policy configuration for kube-apiserver.
39message AuditPolicyConfigSpec {
40google.protobuf.Struct config = 1;
41}
42
43// BootstrapManifestsConfigSpec is configuration for bootstrap manifests.
44message BootstrapManifestsConfigSpec {
45string server = 1;
46string cluster_domain = 2;
47repeated string pod_cid_rs = 3;
48bool proxy_enabled = 4;
49string proxy_image = 5;
50repeated string proxy_args = 6;
51bool core_dns_enabled = 7;
52string core_dns_image = 8;
53string dns_service_ip = 9;
54string dns_service_i_pv6 = 10;
55bool flannel_enabled = 11;
56string flannel_image = 12;
57string flannel_cni_image = 13;
58bool pod_security_policy_enabled = 14;
59bool talos_api_service_enabled = 15;
60repeated string flannel_extra_args = 16;
61string flannel_kube_service_host = 17;
62string flannel_kube_service_port = 18;
63string service_host_dns_address = 19;
64}
65
66// ConfigStatusSpec describes status of rendered secrets.
67message ConfigStatusSpec {
68bool ready = 1;
69string version = 2;
70}
71
72// ControllerManagerConfigSpec is configuration for kube-controller-manager.
73message ControllerManagerConfigSpec {
74bool enabled = 1;
75string image = 2;
76string cloud_provider = 3;
77repeated string pod_cid_rs = 4;
78repeated string service_cid_rs = 5;
79map<string, string> extra_args = 6;
80repeated ExtraVolume extra_volumes = 7;
81map<string, string> environment_variables = 8;
82Resources resources = 9;
83}
84
85// EndpointSpec describes status of rendered secrets.
86message EndpointSpec {
87repeated common.NetIP addresses = 1;
88}
89
90// ExtraManifest defines a single extra manifest to download.
91message ExtraManifest {
92string name = 1;
93string url = 2;
94string priority = 3;
95map<string, string> extra_headers = 4;
96string inline_manifest = 5;
97}
98
99// ExtraManifestsConfigSpec is configuration for extra bootstrap manifests.
100message ExtraManifestsConfigSpec {
101repeated ExtraManifest extra_manifests = 1;
102}
103
104// ExtraVolume is a configuration of extra volume.
105message ExtraVolume {
106string name = 1;
107string host_path = 2;
108string mount_path = 3;
109bool read_only = 4;
110}
111
112// KubePrismConfigSpec describes KubePrismConfig data.
113message KubePrismConfigSpec {
114string host = 1;
115int64 port = 2;
116repeated KubePrismEndpoint endpoints = 3;
117}
118
119// KubePrismEndpoint holds data for control plane endpoint.
120message KubePrismEndpoint {
121string host = 1;
122uint32 port = 2;
123}
124
125// KubePrismEndpointsSpec describes KubePrismEndpoints configuration.
126message KubePrismEndpointsSpec {
127repeated KubePrismEndpoint endpoints = 1;
128}
129
130// KubePrismStatusesSpec describes KubePrismStatuses data.
131message KubePrismStatusesSpec {
132string host = 1;
133bool healthy = 2;
134}
135
136// KubeletConfigSpec holds the source of kubelet configuration.
137message KubeletConfigSpec {
138string image = 1;
139repeated string cluster_dns = 2;
140string cluster_domain = 3;
141map<string, string> extra_args = 4;
142repeated talos.resource.definitions.proto.Mount extra_mounts = 5;
143google.protobuf.Struct extra_config = 6;
144bool cloud_provider_external = 7;
145bool default_runtime_seccomp_enabled = 8;
146bool skip_node_registration = 9;
147string static_pod_list_url = 10;
148bool disable_manifests_directory = 11;
149bool enable_fs_quota_monitoring = 12;
150google.protobuf.Struct credential_provider_config = 13;
151}
152
153// KubeletSpecSpec holds the source of kubelet configuration.
154message KubeletSpecSpec {
155string image = 1;
156repeated string args = 2;
157repeated talos.resource.definitions.proto.Mount extra_mounts = 3;
158string expected_nodename = 4;
159google.protobuf.Struct config = 5;
160google.protobuf.Struct credential_provider_config = 6;
161}
162
163// ManifestSpec holds the Kubernetes resources spec.
164message ManifestSpec {
165repeated SingleManifest items = 1;
166}
167
168// ManifestStatusSpec describes manifest application status.
169message ManifestStatusSpec {
170repeated string manifests_applied = 1;
171}
172
173// NodeIPConfigSpec holds the Node IP specification.
174message NodeIPConfigSpec {
175repeated string valid_subnets = 1;
176repeated string exclude_subnets = 2;
177}
178
179// NodeIPSpec holds the Node IP specification.
180message NodeIPSpec {
181repeated common.NetIP addresses = 1;
182}
183
184// NodeLabelSpecSpec represents a label that's attached to a Talos node.
185message NodeLabelSpecSpec {
186string key = 1;
187string value = 2;
188}
189
190// NodeStatusSpec describes Kubernetes NodeStatus.
191message NodeStatusSpec {
192string nodename = 1;
193bool node_ready = 2;
194bool unschedulable = 3;
195map<string, string> labels = 4;
196map<string, string> annotations = 5;
197}
198
199// NodeTaintSpecSpec represents a label that's attached to a Talos node.
200message NodeTaintSpecSpec {
201string key = 1;
202string effect = 2;
203string value = 3;
204}
205
206// NodenameSpec describes Kubernetes nodename.
207message NodenameSpec {
208string nodename = 1;
209string hostname_version = 2;
210bool skip_node_registration = 3;
211}
212
213// Resources is a configuration of cpu and memory resources.
214message Resources {
215map<string, string> requests = 1;
216map<string, string> limits = 2;
217}
218
219// SchedulerConfigSpec is configuration for kube-scheduler.
220message SchedulerConfigSpec {
221bool enabled = 1;
222string image = 2;
223map<string, string> extra_args = 3;
224repeated ExtraVolume extra_volumes = 4;
225map<string, string> environment_variables = 5;
226Resources resources = 6;
227google.protobuf.Struct config = 7;
228}
229
230// SecretsStatusSpec describes status of rendered secrets.
231message SecretsStatusSpec {
232bool ready = 1;
233string version = 2;
234}
235
236// SingleManifest is a single manifest.
237message SingleManifest {
238google.protobuf.Struct object = 1;
239}
240
241// StaticPodServerStatusSpec describes static pod spec, it contains marshaled *v1.Pod spec.
242message StaticPodServerStatusSpec {
243string url = 1;
244}
245
246// StaticPodSpec describes static pod spec, it contains marshaled *v1.Pod spec.
247message StaticPodSpec {
248google.protobuf.Struct pod = 1;
249}
250
251// StaticPodStatusSpec describes kubelet static pod status.
252message StaticPodStatusSpec {
253google.protobuf.Struct pod_status = 1;
254}
255
256