Skip to content

Commit d8a034d

Browse files
authored
Merge pull request #96 from DotKube/copilot/restructure-project-for-api-versioning
Restructure project for API versioning
2 parents 7303b52 + 7e2c29e commit d8a034d

23 files changed

Lines changed: 38 additions & 38 deletions

src/OperatorTemplate.Operator/Controllers/Services/SqlServerEndpointService.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
using k8s.Models;
22
using KubeOps.KubernetesClient;
3-
using SqlServerOperator.Entities;
3+
using SqlServerOperator.Entities.V1Alpha1;
44

55
namespace SqlServerOperator.Controllers.Services;
66

src/OperatorTemplate.Operator/Controllers/DatabaseController.cs renamed to src/OperatorTemplate.Operator/Controllers/V1Alpha1/DatabaseController.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@
66
using Microsoft.Data.SqlClient;
77
using SqlServerOperator.Configuration;
88
using SqlServerOperator.Controllers.Services;
9-
using SqlServerOperator.Entities;
9+
using SqlServerOperator.Entities.V1Alpha1;
1010
using System.Text;
1111

12-
namespace SqlServerOperator.Controllers;
12+
namespace SqlServerOperator.Controllers.V1Alpha1;
1313

1414
[EntityRbac(typeof(V1Alpha1SQLServerDatabase), Verbs = RbacVerb.All)]
1515
public class SQLServerDatabaseController(

src/OperatorTemplate.Operator/Controllers/DatabaseUserController.cs renamed to src/OperatorTemplate.Operator/Controllers/V1Alpha1/DatabaseUserController.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55
using KubeOps.KubernetesClient;
66
using Microsoft.Data.SqlClient;
77
using SqlServerOperator.Controllers.Services;
8-
using SqlServerOperator.Entities;
8+
using SqlServerOperator.Entities.V1Alpha1;
99
using System.Text;
1010

11-
namespace SqlServerOperator.Controllers;
11+
namespace SqlServerOperator.Controllers.V1Alpha1;
1212

1313
[EntityRbac(typeof(V1Alpha1DatabaseUser), Verbs = RbacVerb.All)]
1414
public class SQLServerUserController(

src/OperatorTemplate.Operator/Controllers/ExternalSqlServerController.cs renamed to src/OperatorTemplate.Operator/Controllers/V1Alpha1/ExternalSqlServerController.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55
using KubeOps.KubernetesClient;
66
using Microsoft.Data.SqlClient;
77
using SqlServerOperator.Controllers.Services;
8-
using SqlServerOperator.Entities;
8+
using SqlServerOperator.Entities.V1Alpha1;
99
using System.Text;
1010

11-
namespace SqlServerOperator.Controllers;
11+
namespace SqlServerOperator.Controllers.V1Alpha1;
1212

1313
[EntityRbac(typeof(V1Alpha1ExternalSQLServer), Verbs = RbacVerb.All)]
1414
public class ExternalSQLServerController(

src/OperatorTemplate.Operator/Controllers/SchemaController.cs renamed to src/OperatorTemplate.Operator/Controllers/V1Alpha1/SchemaController.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55
using KubeOps.KubernetesClient;
66
using Microsoft.Data.SqlClient;
77
using SqlServerOperator.Controllers.Services;
8-
using SqlServerOperator.Entities;
8+
using SqlServerOperator.Entities.V1Alpha1;
99
using System.Text;
1010

11-
namespace SqlServerOperator.Controllers;
11+
namespace SqlServerOperator.Controllers.V1Alpha1;
1212

1313
[EntityRbac(typeof(V1Alpha1SQLServerSchema), Verbs = RbacVerb.All)]
1414
public class SQLServerSchemaController(

src/OperatorTemplate.Operator/Controllers/SqlServerController.cs renamed to src/OperatorTemplate.Operator/Controllers/V1Alpha1/SqlServerController.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66
using KubeOps.KubernetesClient;
77
using SqlServerOperator.Builders;
88
using SqlServerOperator.Configuration;
9-
using SqlServerOperator.Entities;
10-
using SqlServerOperator.Finalizers;
9+
using SqlServerOperator.Entities.V1Alpha1;
10+
using SqlServerOperator.Finalizers.V1Alpha1;
1111
using System.Security.Cryptography;
1212

13-
namespace SqlServerOperator.Controllers;
13+
namespace SqlServerOperator.Controllers.V1Alpha1;
1414

1515
[EntityRbac(typeof(V1Alpha1SQLServer), Verbs = RbacVerb.All)]
1616
public class SQLServerController(ILogger<SQLServerController> logger, IKubernetesClient kubernetesClient, DefaultMssqlConfig config) : IEntityController<V1Alpha1SQLServer>

src/OperatorTemplate.Operator/Controllers/SqlServerLoginController.cs renamed to src/OperatorTemplate.Operator/Controllers/V1Alpha1/SqlServerLoginController.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55
using KubeOps.KubernetesClient;
66
using Microsoft.Data.SqlClient;
77
using SqlServerOperator.Controllers.Services;
8-
using SqlServerOperator.Entities;
8+
using SqlServerOperator.Entities.V1Alpha1;
99
using System.Text;
1010

11-
namespace SqlServerOperator.Controllers;
11+
namespace SqlServerOperator.Controllers.V1Alpha1;
1212

1313
[EntityRbac(typeof(V1Alpha1SQLServerLogin), Verbs = RbacVerb.All)]
1414
public class SQLServerLoginController(

src/OperatorTemplate.Operator/Entities/Database.cs renamed to src/OperatorTemplate.Operator/Entities/V1Alpha1/Database.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
using KubeOps.Abstractions.Entities;
44
using KubeOps.Abstractions.Entities.Attributes;
55

6-
namespace SqlServerOperator.Entities;
6+
namespace SqlServerOperator.Entities.V1Alpha1;
77

88
[KubernetesEntity(Group = "sql-server.dotkube.io", ApiVersion = "v1alpha1", Kind = "Database")]
99
public class V1Alpha1SQLServerDatabase : CustomKubernetesEntity<V1Alpha1SQLServerDatabase.V1Alpha1SQLServerDatabaseSpec, V1Alpha1SQLServerDatabase.V1Alpha1SQLServerDatabaseStatus>

src/OperatorTemplate.Operator/Entities/DatabaseUser.cs renamed to src/OperatorTemplate.Operator/Entities/V1Alpha1/DatabaseUser.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
using KubeOps.Abstractions.Entities;
55
using KubeOps.Abstractions.Entities.Attributes;
66

7-
namespace SqlServerOperator.Entities;
7+
namespace SqlServerOperator.Entities.V1Alpha1;
88

99
[KubernetesEntity(Group = "sql-server.dotkube.io", ApiVersion = "v1alpha1", Kind = "SQLServerUser")]
1010
public class V1Alpha1DatabaseUser : CustomKubernetesEntity<V1Alpha1DatabaseUser.V1Alpha1DatabaseUserSpec, V1Alpha1DatabaseUser.V1Alpha1DatabaseUserStatus>

src/OperatorTemplate.Operator/Entities/ExternalSqlServer.cs renamed to src/OperatorTemplate.Operator/Entities/V1Alpha1/ExternalSqlServer.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
using KubeOps.Abstractions.Entities;
33
using KubeOps.Abstractions.Entities.Attributes;
44

5-
namespace SqlServerOperator.Entities;
5+
namespace SqlServerOperator.Entities.V1Alpha1;
66

77
[KubernetesEntity(Group = "sql-server.dotkube.io", ApiVersion = "v1alpha1", Kind = "ExternalSQLServer")]
88
public class V1Alpha1ExternalSQLServer : CustomKubernetesEntity<V1Alpha1ExternalSQLServer.V1Alpha1ExternalSQLServerSpec, V1Alpha1ExternalSQLServer.V1Alpha1ExternalSQLServerStatus>

0 commit comments

Comments
 (0)