From 9866a688b898f697dceb05a10b32993cfbbc6fb1 Mon Sep 17 00:00:00 2001 From: Nikolai Rodionov Date: Mon, 29 Apr 2024 19:45:31 +0200 Subject: [PATCH] Refactor providers data --- proto/environments/environments_v1.proto | 29 +++++++++++------------- 1 file changed, 13 insertions(+), 16 deletions(-) diff --git a/proto/environments/environments_v1.proto b/proto/environments/environments_v1.proto index 5a450c5..c65f56d 100644 --- a/proto/environments/environments_v1.proto +++ b/proto/environments/environments_v1.proto @@ -72,9 +72,10 @@ message EnvironmentMetadata { } message EnvironmentSpec { - Provider provider = 2; // Provide - Kubernetes kubernetes = 3; - HetznerOptions hetzner_options = 4; + Provider provider = 1; // Provide + Kubernetes kubernetes = 2; + ServerType server_type = 3; + Location server_location = 4; } message EnvironmentFull { @@ -97,23 +98,19 @@ enum ServerType { SERVER_TYPE_REGULAR = 2; SERVER_TYPE_PLUS = 3; SERVER_TYPE_PRO = 4; + SERVER_TYPE_CUSTOM = 5; } -enum HetznerLocation { - HETZNER_LOCATION_UNSPECIFIED = 0; - HETZNER_LOCATION_NUREMBERG = 1; - HETZNER_LOCATION_FALKENSTEIN = 2; - HETZNER_LOCATION_HELSINKI = 3; - HETZNER_LOCATION_HILLSBORO = 4; - HETZNER_LOCATION_ASHBURN = 5; +enum Location { + LOCATION_UNSPECIFIED = 0; + LOCATION_HETZNER_NUREMBERG = 1; + LOCATION_HETZNER_FALKENSTEIN = 2; + LOCATION_HETZNER_HELSINKI = 3; + LOCATION_HETZNER_HILLSBORO = 4; + LOCATION_HETZNER_ASHBURN = 5; } enum Kubernetes { KUBERNETES_UNSPECIFIED = 0; KUBERNETES_K3S = 1; -} - -message HetznerOptions { - ServerType server_type = 1; - HetznerLocation server_location = 2; -} +} \ No newline at end of file