2022-07-05 05:41:31 -04:00
|
|
|
syntax = "proto3";
|
|
|
|
|
|
|
|
package join;
|
|
|
|
|
2022-09-22 02:48:30 -04:00
|
|
|
option go_package = "github.com/edgelesssys/constellation/v2/joinservice/joinproto";
|
2022-07-05 05:41:31 -04:00
|
|
|
|
|
|
|
service API {
|
2023-01-19 09:57:50 -05:00
|
|
|
// IssueJoinTicket issues a join ticket for a new node.
|
2022-07-05 05:41:31 -04:00
|
|
|
rpc IssueJoinTicket(IssueJoinTicketRequest) returns (IssueJoinTicketResponse);
|
2023-01-19 09:57:50 -05:00
|
|
|
// IssueRejoinTicket issues a join ticket for a node that has previously joined the cluster.
|
2022-07-26 04:58:39 -04:00
|
|
|
rpc IssueRejoinTicket(IssueRejoinTicketRequest) returns (IssueRejoinTicketResponse);
|
2022-07-05 05:41:31 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
message IssueJoinTicketRequest {
|
2023-01-19 09:57:50 -05:00
|
|
|
// disk_uuid is the UUID of a node's state disk.
|
2022-07-05 05:41:31 -04:00
|
|
|
string disk_uuid = 1;
|
2023-01-19 09:57:50 -05:00
|
|
|
// certificate_request is a certificate request for the node's kubelet certificate.
|
2022-07-15 03:33:11 -04:00
|
|
|
bytes certificate_request = 2;
|
2023-01-19 09:57:50 -05:00
|
|
|
// is_control_plane indicates whether the node is a control-plane node.
|
2022-07-05 05:41:31 -04:00
|
|
|
bool is_control_plane = 3;
|
|
|
|
}
|
|
|
|
|
|
|
|
message IssueJoinTicketResponse {
|
2023-01-19 09:57:50 -05:00
|
|
|
// state_disk_key is the key used to encrypt the state disk.
|
2022-07-05 05:41:31 -04:00
|
|
|
bytes state_disk_key = 1;
|
2023-01-19 09:57:50 -05:00
|
|
|
// measurement_salt is a salt used to derive the node's ClusterID.
|
|
|
|
// This value is persisted on the state disk.
|
2022-07-26 04:58:39 -04:00
|
|
|
bytes measurement_salt = 2;
|
2023-01-19 09:57:50 -05:00
|
|
|
// measurement_secret is a secret used to derive the node's ClusterID.
|
|
|
|
// This value is NOT persisted on the state disk.
|
2022-07-26 04:58:39 -04:00
|
|
|
bytes measurement_secret = 3;
|
2023-01-19 09:57:50 -05:00
|
|
|
// kubelet_cert is the certificate to be used by the kubelet.
|
2022-07-15 03:33:11 -04:00
|
|
|
bytes kubelet_cert = 4;
|
2023-01-19 09:57:50 -05:00
|
|
|
// api_server_endpoint is the endpoint of Constellation's API server.
|
2022-07-15 03:33:11 -04:00
|
|
|
string api_server_endpoint = 5;
|
2023-01-19 09:57:50 -05:00
|
|
|
// token is the Kubernetes Join Token to be used by the node to join the cluster.
|
2022-07-15 03:33:11 -04:00
|
|
|
string token = 6;
|
2023-01-19 09:57:50 -05:00
|
|
|
// discovery_token_ca_cert_hash is a hash of the root certificate authority presented by the Kubernetes control-plane.
|
2022-07-15 03:33:11 -04:00
|
|
|
string discovery_token_ca_cert_hash = 7;
|
2023-01-19 09:57:50 -05:00
|
|
|
// control_plane_files is a list of control-plane certificates and keys.
|
2022-07-15 03:33:11 -04:00
|
|
|
repeated control_plane_cert_or_key control_plane_files = 8;
|
2023-01-19 09:57:50 -05:00
|
|
|
// kubernetes_version is the Kubernetes version to install on the node.
|
2022-07-18 06:28:02 -04:00
|
|
|
string kubernetes_version = 9;
|
2023-01-19 09:57:50 -05:00
|
|
|
// kubernetes_components is a list of components to install on the node.
|
2022-11-23 04:29:36 -05:00
|
|
|
repeated KubernetesComponent kubernetes_components = 10;
|
2022-07-11 07:29:22 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
message control_plane_cert_or_key {
|
2023-01-19 09:57:50 -05:00
|
|
|
// name of the certificate or key.
|
2022-07-11 07:29:22 -04:00
|
|
|
string name = 1;
|
2023-01-19 09:57:50 -05:00
|
|
|
// data of the certificate or key.
|
2022-07-11 07:29:22 -04:00
|
|
|
bytes data = 2;
|
2022-07-05 05:41:31 -04:00
|
|
|
}
|
2022-07-26 04:58:39 -04:00
|
|
|
|
|
|
|
message IssueRejoinTicketRequest {
|
2023-01-19 09:57:50 -05:00
|
|
|
// disk_uuid is the UUID of a node's state disk.
|
2022-07-26 04:58:39 -04:00
|
|
|
string disk_uuid = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message IssueRejoinTicketResponse {
|
2023-01-19 09:57:50 -05:00
|
|
|
// state_disk_key is the key to decrypt the state disk.
|
2022-07-26 04:58:39 -04:00
|
|
|
bytes state_disk_key = 1;
|
2023-01-19 09:57:50 -05:00
|
|
|
// measurement_secret is a secret used to derive the node's ClusterID.
|
|
|
|
// This value is NOT persisted on the state disk.
|
2022-07-26 04:58:39 -04:00
|
|
|
bytes measurement_secret = 2;
|
|
|
|
}
|
2022-11-23 04:29:36 -05:00
|
|
|
|
|
|
|
// Discuss if we want to import the init proto instead of duplicating it
|
|
|
|
message KubernetesComponent {
|
2023-01-19 09:57:50 -05:00
|
|
|
// url to download the component from.
|
2022-11-23 04:29:36 -05:00
|
|
|
string url = 1;
|
2023-01-19 09:57:50 -05:00
|
|
|
// hash of the component.
|
2022-11-23 04:29:36 -05:00
|
|
|
string hash = 2;
|
2023-01-19 09:57:50 -05:00
|
|
|
// install_path is the path to install the component to.
|
2022-11-23 04:29:36 -05:00
|
|
|
string install_path = 3;
|
2023-01-19 09:57:50 -05:00
|
|
|
// extract indicates whether the component is an archive and needs to be extracted.
|
2022-11-23 04:29:36 -05:00
|
|
|
bool extract = 4;
|
|
|
|
}
|