2022-06-21 11:59:12 -04:00
|
|
|
syntax = "proto3";
|
|
|
|
|
|
|
|
package init;
|
|
|
|
|
2023-12-11 02:08:55 -05:00
|
|
|
import "internal/versions/components/components.proto";
|
|
|
|
|
2022-09-22 02:48:30 -04:00
|
|
|
option go_package = "github.com/edgelesssys/constellation/v2/bootstrapper/initproto";
|
2022-06-21 11:59:12 -04:00
|
|
|
|
|
|
|
service API {
|
2023-05-30 07:47:36 -04:00
|
|
|
rpc Init(InitRequest) returns (stream InitResponse);
|
2022-06-21 11:59:12 -04:00
|
|
|
}
|
|
|
|
|
2023-08-07 09:24:46 -04:00
|
|
|
// InitRequest is the rpc message sent to the Constellation bootstrapper to initiate the cluster bootstrapping.
|
2022-06-21 11:59:12 -04:00
|
|
|
message InitRequest {
|
2023-08-09 08:16:45 -04:00
|
|
|
reserved 4;
|
|
|
|
reserved "cloud_service_account_uri";
|
2023-08-07 09:24:46 -04:00
|
|
|
// KmsUri is an URI encoding access to the KMS service or master secret.
|
|
|
|
string kms_uri = 1;
|
|
|
|
// StorageUri is an URI encoding access to the storage service.
|
|
|
|
string storage_uri = 2;
|
|
|
|
// MeasurementSalt is a salt used to generate the clusterID for the initial bootstrapping node.
|
|
|
|
bytes measurement_salt = 3;
|
|
|
|
// KubernetesVersion is the version of Kubernetes to install.
|
|
|
|
string kubernetes_version = 5;
|
|
|
|
// ConformanceMode is a flag to indicate whether the cluster should be bootstrapped for Kubernetes conformance testing.
|
|
|
|
bool conformance_mode = 6;
|
|
|
|
// KubernetesComponents is a list of Kubernetes components to install.
|
2023-12-11 02:08:55 -05:00
|
|
|
repeated components.Component kubernetes_components = 7;
|
2023-08-07 09:24:46 -04:00
|
|
|
// InitSecret is a secret used to authenticate the initial bootstrapping node.
|
|
|
|
bytes init_secret = 8;
|
|
|
|
// ClusterName is the name of the cluster.
|
|
|
|
string cluster_name = 9;
|
|
|
|
// ApiserverCertSans is a list of Subject Alternative Names to add to the apiserver certificate.
|
|
|
|
repeated string apiserver_cert_sans = 10;
|
2023-12-01 08:39:05 -05:00
|
|
|
// ServiceCIDR is the CIDR to use for Kubernetes ClusterIPs.
|
|
|
|
string service_cidr = 11;
|
2022-06-21 11:59:12 -04:00
|
|
|
}
|
|
|
|
|
2023-08-07 09:24:46 -04:00
|
|
|
// InitResponse is the rpc message sent by the Constellation bootstrapper in response to the InitRequest.
|
2022-06-21 11:59:12 -04:00
|
|
|
message InitResponse {
|
2023-05-30 07:47:36 -04:00
|
|
|
oneof kind {
|
|
|
|
InitSuccessResponse init_success = 1;
|
|
|
|
InitFailureResponse init_failure = 2;
|
|
|
|
LogResponseType log = 3;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-08-07 09:24:46 -04:00
|
|
|
// InitSuccessResponse is the rpc message sent by the Constellation bootstrapper in response to the InitRequest when the bootstrapping was successful.
|
2023-05-30 07:47:36 -04:00
|
|
|
message InitSuccessResponse {
|
2023-08-07 09:24:46 -04:00
|
|
|
// Kubeconfig is the kubeconfig for the bootstrapped cluster.
|
2022-11-24 04:57:58 -05:00
|
|
|
bytes kubeconfig = 1;
|
2023-08-07 09:24:46 -04:00
|
|
|
// OwnerID is the owner ID of the bootstrapped cluster.
|
2022-11-24 04:57:58 -05:00
|
|
|
bytes owner_id = 2;
|
2023-08-07 09:24:46 -04:00
|
|
|
// ClusterID is the cluster ID of the bootstrapped cluster.
|
2022-11-24 04:57:58 -05:00
|
|
|
bytes cluster_id = 3;
|
2022-06-21 11:59:12 -04:00
|
|
|
}
|
2022-11-14 13:09:49 -05:00
|
|
|
|
2023-08-07 09:24:46 -04:00
|
|
|
// InitFailureResponse is the rpc message sent by the Constellation bootstrapper in response to the InitRequest when the bootstrapping failed.
|
2023-05-30 07:47:36 -04:00
|
|
|
message InitFailureResponse {
|
2023-08-07 09:24:46 -04:00
|
|
|
// Error is the error message.
|
2023-05-30 07:47:36 -04:00
|
|
|
string error = 1;
|
|
|
|
}
|
|
|
|
|
2023-08-07 09:24:46 -04:00
|
|
|
// LogResponseType is the rpc message sent by the Constellation bootstrapper to stream log messages.
|
2023-05-30 07:47:36 -04:00
|
|
|
message LogResponseType {
|
2023-08-07 09:24:46 -04:00
|
|
|
// Log are the journald logs of the node.
|
2023-05-30 07:47:36 -04:00
|
|
|
bytes log = 1;
|
|
|
|
}
|
|
|
|
|
2023-08-07 09:24:46 -04:00
|
|
|
// KubernetesComponent is a Kubernetes component to install.
|
2022-11-14 13:09:49 -05:00
|
|
|
message KubernetesComponent {
|
2023-08-07 09:24:46 -04:00
|
|
|
// Url to the component.
|
2022-11-14 13:09:49 -05:00
|
|
|
string url = 1;
|
2023-08-07 09:24:46 -04:00
|
|
|
// Hash of the component.
|
2022-11-14 13:09:49 -05:00
|
|
|
string hash = 2;
|
2023-08-07 09:24:46 -04:00
|
|
|
// InstallPath is the path to install the component to.
|
2022-11-14 13:09:49 -05:00
|
|
|
string install_path = 3;
|
2023-08-07 09:24:46 -04:00
|
|
|
// Extract is a flag to indicate whether the component should be extracted.
|
2022-11-14 13:09:49 -05:00
|
|
|
bool extract = 4;
|
|
|
|
}
|