Implement Keystone environment deployments
This commit is contained in:
15
app/Enums/BuildArtifactStatus.php
Normal file
15
app/Enums/BuildArtifactStatus.php
Normal file
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
|
||||
namespace App\Enums;
|
||||
|
||||
use App\Enums\Concerns\Arrayable;
|
||||
|
||||
enum BuildArtifactStatus: string
|
||||
{
|
||||
use Arrayable;
|
||||
|
||||
case PENDING = 'pending';
|
||||
case BUILDING = 'building';
|
||||
case AVAILABLE = 'available';
|
||||
case FAILED = 'failed';
|
||||
}
|
||||
14
app/Enums/BuildStrategy.php
Normal file
14
app/Enums/BuildStrategy.php
Normal file
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
|
||||
namespace App\Enums;
|
||||
|
||||
use App\Enums\Concerns\Arrayable;
|
||||
|
||||
enum BuildStrategy: string
|
||||
{
|
||||
use Arrayable;
|
||||
|
||||
case TARGET_SERVER = 'target_server';
|
||||
case DEDICATED_BUILDER = 'dedicated_builder';
|
||||
case EXTERNAL_REGISTRY = 'external_registry';
|
||||
}
|
||||
15
app/Enums/DeployPolicy.php
Normal file
15
app/Enums/DeployPolicy.php
Normal file
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
|
||||
namespace App\Enums;
|
||||
|
||||
use App\Enums\Concerns\Arrayable;
|
||||
|
||||
enum DeployPolicy: string
|
||||
{
|
||||
use Arrayable;
|
||||
|
||||
case WITH_ENVIRONMENT = 'with_environment';
|
||||
case DEPENDENCY_ONLY = 'dependency_only';
|
||||
case MANUAL_OR_ON_ROUTE_CHANGE = 'manual_or_on_route_change';
|
||||
case MANUAL = 'manual';
|
||||
}
|
||||
17
app/Enums/EnvironmentAttachmentRole.php
Normal file
17
app/Enums/EnvironmentAttachmentRole.php
Normal file
@@ -0,0 +1,17 @@
|
||||
<?php
|
||||
|
||||
namespace App\Enums;
|
||||
|
||||
use App\Enums\Concerns\Arrayable;
|
||||
|
||||
enum EnvironmentAttachmentRole: string
|
||||
{
|
||||
use Arrayable;
|
||||
|
||||
case DATABASE = 'database';
|
||||
case CACHE = 'cache';
|
||||
case QUEUE = 'queue';
|
||||
case STORAGE = 'storage';
|
||||
case GATEWAY = 'gateway';
|
||||
case CUSTOM = 'custom';
|
||||
}
|
||||
14
app/Enums/EnvironmentVariableSource.php
Normal file
14
app/Enums/EnvironmentVariableSource.php
Normal file
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
|
||||
namespace App\Enums;
|
||||
|
||||
use App\Enums\Concerns\Arrayable;
|
||||
|
||||
enum EnvironmentVariableSource: string
|
||||
{
|
||||
use Arrayable;
|
||||
|
||||
case USER = 'user';
|
||||
case MANAGED_ATTACHMENT = 'managed_attachment';
|
||||
case SYSTEM = 'system';
|
||||
}
|
||||
20
app/Enums/OperationKind.php
Normal file
20
app/Enums/OperationKind.php
Normal file
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
namespace App\Enums;
|
||||
|
||||
use App\Enums\Concerns\Arrayable;
|
||||
|
||||
enum OperationKind: string
|
||||
{
|
||||
use Arrayable;
|
||||
|
||||
case SERVER_PROVISION = 'server_provision';
|
||||
case SERVICE_DEPLOY = 'service_deploy';
|
||||
case REPLICA_DEPLOY = 'replica_deploy';
|
||||
case SLICE_PROVISION = 'slice_provision';
|
||||
case SLICE_CONFIGURE = 'slice_configure';
|
||||
case ENVIRONMENT_DEPLOY = 'environment_deploy';
|
||||
case GATEWAY_CUTOVER = 'gateway_cutover';
|
||||
case CONFIG_CHANGE = 'config_change';
|
||||
case CREDENTIAL_ROTATION = 'credential_rotation';
|
||||
}
|
||||
@@ -4,7 +4,7 @@ namespace App\Enums;
|
||||
|
||||
use App\Enums\Concerns\Arrayable;
|
||||
|
||||
enum DeploymentStatus: string
|
||||
enum OperationStatus: string
|
||||
{
|
||||
use Arrayable;
|
||||
|
||||
15
app/Enums/RegistryType.php
Normal file
15
app/Enums/RegistryType.php
Normal file
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
|
||||
namespace App\Enums;
|
||||
|
||||
use App\Enums\Concerns\Arrayable;
|
||||
|
||||
enum RegistryType: string
|
||||
{
|
||||
use Arrayable;
|
||||
|
||||
case GENERIC = 'generic';
|
||||
case GITEA = 'gitea';
|
||||
case GHCR = 'ghcr';
|
||||
case DOCKER_HUB = 'docker_hub';
|
||||
}
|
||||
13
app/Enums/SchedulerMode.php
Normal file
13
app/Enums/SchedulerMode.php
Normal file
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
|
||||
namespace App\Enums;
|
||||
|
||||
use App\Enums\Concerns\Arrayable;
|
||||
|
||||
enum SchedulerMode: string
|
||||
{
|
||||
use Arrayable;
|
||||
|
||||
case SINGLE = 'single';
|
||||
case EVERY_REPLICA = 'every_replica';
|
||||
}
|
||||
@@ -13,6 +13,7 @@ enum ServiceCategory: string
|
||||
case GATEWAY = 'gateway';
|
||||
case STORAGE = 'storage';
|
||||
case CACHE = 'cache';
|
||||
case BUILDER = 'builder';
|
||||
|
||||
public static function getDescription(ServiceCategory|string $category)
|
||||
{
|
||||
@@ -25,10 +26,11 @@ enum ServiceCategory: string
|
||||
|
||||
return match ($category) {
|
||||
self::APPLICATION => 'The base container image for your application',
|
||||
self::DATABASE => 'Postgres or MySQL',
|
||||
self::DATABASE => 'Postgres',
|
||||
self::GATEWAY => 'The first point of contact for your application',
|
||||
self::STORAGE => 'S3 or S3-compatible service',
|
||||
self::CACHE => 'Redis, Memcached or similar',
|
||||
self::CACHE => 'Valkey',
|
||||
self::BUILDER => 'Build service for application artifacts',
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
14
app/Enums/ServiceEndpointScope.php
Normal file
14
app/Enums/ServiceEndpointScope.php
Normal file
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
|
||||
namespace App\Enums;
|
||||
|
||||
use App\Enums\Concerns\Arrayable;
|
||||
|
||||
enum ServiceEndpointScope: string
|
||||
{
|
||||
use Arrayable;
|
||||
|
||||
case DOCKER_NETWORK = 'docker_network';
|
||||
case PRIVATE_NETWORK = 'private_network';
|
||||
case PUBLIC = 'public';
|
||||
}
|
||||
@@ -8,14 +8,8 @@ enum ServiceType: string
|
||||
{
|
||||
use Arrayable;
|
||||
|
||||
case FRANKENPHP = 'frankenphp';
|
||||
case PHP_FPM = 'php-fpm';
|
||||
case POSTGRES = 'postgres';
|
||||
case CADDY = 'caddy';
|
||||
case VALKEY = 'valkey';
|
||||
|
||||
// future?
|
||||
case MYSQL = 'mysql';
|
||||
case NGINX = 'nginx';
|
||||
case REDIS = 'redis';
|
||||
case LARAVEL = 'laravel';
|
||||
}
|
||||
|
||||
14
app/Enums/SourceProviderType.php
Normal file
14
app/Enums/SourceProviderType.php
Normal file
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
|
||||
namespace App\Enums;
|
||||
|
||||
use App\Enums\Concerns\Arrayable;
|
||||
|
||||
enum SourceProviderType: string
|
||||
{
|
||||
use Arrayable;
|
||||
|
||||
case GITEA = 'gitea';
|
||||
case GITHUB = 'github';
|
||||
case GENERIC_GIT = 'generic_git';
|
||||
}
|
||||
Reference in New Issue
Block a user