Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions .gemini/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"general": {
"previewFeatures": true,
"enableNotifications": true,
"sessionRetention": {
"enabled": true,
"maxAge": "30d",
"warningAcknowledged": true
},
"plan": {
"modelRouting": true
},
"preferredEditor": "antigravity"
},
"model": {
"name": "gemini-3-flash-preview"
},
"ide": {
"hasSeenNudge": true,
"enabled": true
},
"tools": {
"sandbox": false
},
"experimental": {
"enableAgents": true,
"modelSteering": true
},
"ui": {
"theme": "GitHub"
}
}
49 changes: 47 additions & 2 deletions OperatorTemplate.sln
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@


Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.0.31903.59
Expand All @@ -15,6 +15,12 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{267FA675
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OperatorTemplate.Operator.UnitTests", "src\tests\OperatorTemplate.Operator.UnitTests\OperatorTemplate.Operator.UnitTests.csproj", "{903C99D2-30A4-4C4B-919B-7D850CCDA554}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OperatorTemplate.ExternalWorker", "src\OperatorTemplate.ExternalWorker\OperatorTemplate.ExternalWorker.csproj", "{61F38C33-FB57-465D-9801-CFE4A8E04B56}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OperatorTemplate.ExternalWorker.UnitTests", "src\tests\OperatorTemplate.ExternalWorker.UnitTests\OperatorTemplate.ExternalWorker.UnitTests.csproj", "{C48BC147-29AE-4483-A062-296F83AB99A0}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OperatorTemplate.Entities", "src\OperatorTemplate.Entities\OperatorTemplate.Entities.csproj", "{BD9FA40A-8FBD-40A2-B458-EB478E29B445}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -73,6 +79,42 @@ Global
{903C99D2-30A4-4C4B-919B-7D850CCDA554}.Release|x64.Build.0 = Release|Any CPU
{903C99D2-30A4-4C4B-919B-7D850CCDA554}.Release|x86.ActiveCfg = Release|Any CPU
{903C99D2-30A4-4C4B-919B-7D850CCDA554}.Release|x86.Build.0 = Release|Any CPU
{61F38C33-FB57-465D-9801-CFE4A8E04B56}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{61F38C33-FB57-465D-9801-CFE4A8E04B56}.Debug|Any CPU.Build.0 = Debug|Any CPU
{61F38C33-FB57-465D-9801-CFE4A8E04B56}.Debug|x64.ActiveCfg = Debug|Any CPU
{61F38C33-FB57-465D-9801-CFE4A8E04B56}.Debug|x64.Build.0 = Debug|Any CPU
{61F38C33-FB57-465D-9801-CFE4A8E04B56}.Debug|x86.ActiveCfg = Debug|Any CPU
{61F38C33-FB57-465D-9801-CFE4A8E04B56}.Debug|x86.Build.0 = Debug|Any CPU
{61F38C33-FB57-465D-9801-CFE4A8E04B56}.Release|Any CPU.ActiveCfg = Release|Any CPU
{61F38C33-FB57-465D-9801-CFE4A8E04B56}.Release|Any CPU.Build.0 = Release|Any CPU
{61F38C33-FB57-465D-9801-CFE4A8E04B56}.Release|x64.ActiveCfg = Release|Any CPU
{61F38C33-FB57-465D-9801-CFE4A8E04B56}.Release|x64.Build.0 = Release|Any CPU
{61F38C33-FB57-465D-9801-CFE4A8E04B56}.Release|x86.ActiveCfg = Release|Any CPU
{61F38C33-FB57-465D-9801-CFE4A8E04B56}.Release|x86.Build.0 = Release|Any CPU
{C48BC147-29AE-4483-A062-296F83AB99A0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C48BC147-29AE-4483-A062-296F83AB99A0}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C48BC147-29AE-4483-A062-296F83AB99A0}.Debug|x64.ActiveCfg = Debug|Any CPU
{C48BC147-29AE-4483-A062-296F83AB99A0}.Debug|x64.Build.0 = Debug|Any CPU
{C48BC147-29AE-4483-A062-296F83AB99A0}.Debug|x86.ActiveCfg = Debug|Any CPU
{C48BC147-29AE-4483-A062-296F83AB99A0}.Debug|x86.Build.0 = Debug|Any CPU
{C48BC147-29AE-4483-A062-296F83AB99A0}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C48BC147-29AE-4483-A062-296F83AB99A0}.Release|Any CPU.Build.0 = Release|Any CPU
{C48BC147-29AE-4483-A062-296F83AB99A0}.Release|x64.ActiveCfg = Release|Any CPU
{C48BC147-29AE-4483-A062-296F83AB99A0}.Release|x64.Build.0 = Release|Any CPU
{C48BC147-29AE-4483-A062-296F83AB99A0}.Release|x86.ActiveCfg = Release|Any CPU
{C48BC147-29AE-4483-A062-296F83AB99A0}.Release|x86.Build.0 = Release|Any CPU
{BD9FA40A-8FBD-40A2-B458-EB478E29B445}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{BD9FA40A-8FBD-40A2-B458-EB478E29B445}.Debug|Any CPU.Build.0 = Debug|Any CPU
{BD9FA40A-8FBD-40A2-B458-EB478E29B445}.Debug|x64.ActiveCfg = Debug|Any CPU
{BD9FA40A-8FBD-40A2-B458-EB478E29B445}.Debug|x64.Build.0 = Debug|Any CPU
{BD9FA40A-8FBD-40A2-B458-EB478E29B445}.Debug|x86.ActiveCfg = Debug|Any CPU
{BD9FA40A-8FBD-40A2-B458-EB478E29B445}.Debug|x86.Build.0 = Debug|Any CPU
{BD9FA40A-8FBD-40A2-B458-EB478E29B445}.Release|Any CPU.ActiveCfg = Release|Any CPU
{BD9FA40A-8FBD-40A2-B458-EB478E29B445}.Release|Any CPU.Build.0 = Release|Any CPU
{BD9FA40A-8FBD-40A2-B458-EB478E29B445}.Release|x64.ActiveCfg = Release|Any CPU
{BD9FA40A-8FBD-40A2-B458-EB478E29B445}.Release|x64.Build.0 = Release|Any CPU
{BD9FA40A-8FBD-40A2-B458-EB478E29B445}.Release|x86.ActiveCfg = Release|Any CPU
{BD9FA40A-8FBD-40A2-B458-EB478E29B445}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand All @@ -83,5 +125,8 @@ Global
{BA562A07-2B9B-4EC4-9274-04205FAD0E1E} = {EF766E96-3389-4E09-BA91-208849025070}
{267FA675-E60C-849D-F30D-87C719B37639} = {EF766E96-3389-4E09-BA91-208849025070}
{903C99D2-30A4-4C4B-919B-7D850CCDA554} = {267FA675-E60C-849D-F30D-87C719B37639}
{61F38C33-FB57-465D-9801-CFE4A8E04B56} = {EF766E96-3389-4E09-BA91-208849025070}
{C48BC147-29AE-4483-A062-296F83AB99A0} = {267FA675-E60C-849D-F30D-87C719B37639}
{BD9FA40A-8FBD-40A2-B458-EB478E29B445} = {EF766E96-3389-4E09-BA91-208849025070}
EndGlobalSection
EndGlobal
EndGlobal
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: kubesqlworkers.sql-server.dotkube.io
spec:
group: sql-server.dotkube.io
names:
kind: KubeSqlWorker
listKind: KubeSqlWorkerList
plural: kubesqlworkers
singular: kubesqlworker
scope: Cluster
versions:
- name: v1alpha1
schema:
openAPIV3Schema:
properties:
status:
description: Status of the KubeSqlWorker configuration.
properties:
state:
description: The current state of the worker configuration.
type: string
type: object
spec:
description: Spec of the KubeSqlWorker configuration.
properties: {}
type: object
type: object
served: true
storage: true
subresources:
status: {}
4 changes: 4 additions & 0 deletions deploy/chart/kubesqlserver-operator/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,10 @@ spec:
env:
- name: ASPNETCORE_ENVIRONMENT
value: {{ .Values.controller.environment | quote }}
- name: POD_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
{{- with .Values.controller.extraEnv }}
{{- toYaml . | nindent 12 }}
{{- end }}
Expand Down
4 changes: 4 additions & 0 deletions deploy/chart/kubesqlserver-operator/templates/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ rules:
- sqlserverlogins
- sqlserverusers
- sqlserverschemas
- kubesqlworkers
verbs:
- create
- delete
Expand All @@ -36,6 +37,7 @@ rules:
- sqlserverlogins/status
- sqlserverusers/status
- sqlserverschemas/status
- kubesqlworkers/status
verbs:
- get
- patch
Expand Down Expand Up @@ -68,6 +70,7 @@ rules:
- ""
resources:
- services
- serviceaccounts
verbs:
- create
- get
Expand All @@ -91,6 +94,7 @@ rules:
- apps
resources:
- statefulsets
- deployments
verbs:
- create
- get
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -365,6 +365,13 @@ tests:
content:
name: ASPNETCORE_ENVIRONMENT
value: Development
- contains:
path: spec.template.spec.containers[0].env
content:
name: POD_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
- contains:
path: spec.template.spec.containers[0].env
content:
Expand Down
79 changes: 79 additions & 0 deletions deploy/chart/kubesqlserver-operator/tests/role_test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
suite: test cluster role
templates:
- role.yaml
tests:
- it: should create ClusterRole with correct permissions
asserts:
- isKind:
of: ClusterRole
- equal:
path: metadata.name
value: RELEASE-NAME-operator-role
- contains:
path: rules
content:
apiGroups:
- sql-server.dotkube.io
resources:
- sqlservers
- externalsqlservers
- databases
- externaldatabases
- sqlserverlogins
- sqlserverusers
- sqlserverschemas
- kubesqlworkers
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- contains:
path: rules
content:
apiGroups:
- sql-server.dotkube.io
resources:
- sqlservers/status
- externalsqlservers/status
- databases/status
- externaldatabases/status
- sqlserverlogins/status
- sqlserverusers/status
- sqlserverschemas/status
- kubesqlworkers/status
verbs:
- get
- patch
- update
- contains:
path: rules
content:
apiGroups:
- apps
resources:
- statefulsets
- deployments
verbs:
- create
- get
- list
- watch
- contains:
path: rules
content:
apiGroups:
- ""
resources:
- services
- serviceaccounts
verbs:
- create
- get
- list
- patch
- update
- watch
43 changes: 43 additions & 0 deletions deploy/yaml/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,41 @@ spec:
subresources:
status: {}
---
# Source: kubesqlserver-operator/crds/kubesqlworkers_sql-server_dotkube_io.yaml
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: kubesqlworkers.sql-server.dotkube.io
spec:
group: sql-server.dotkube.io
names:
kind: KubeSqlWorker
listKind: KubeSqlWorkerList
plural: kubesqlworkers
singular: kubesqlworker
scope: Cluster
versions:
- name: v1alpha1
schema:
openAPIV3Schema:
properties:
status:
description: Status of the KubeSqlWorker configuration.
properties:
state:
description: The current state of the worker configuration.
type: string
type: object
spec:
description: Spec of the KubeSqlWorker configuration.
properties: {}
type: object
type: object
served: true
storage: true
subresources:
status: {}
---
# Source: kubesqlserver-operator/crds/sqlserverlogins_sql-server_dotkube_io.yaml
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
Expand Down Expand Up @@ -437,6 +472,7 @@ rules:
- sqlserverlogins
- sqlserverusers
- sqlserverschemas
- kubesqlworkers
verbs:
- create
- delete
Expand All @@ -457,6 +493,7 @@ rules:
- sqlserverlogins/status
- sqlserverusers/status
- sqlserverschemas/status
- kubesqlworkers/status
verbs:
- get
- patch
Expand Down Expand Up @@ -489,6 +526,7 @@ rules:
- ""
resources:
- services
- serviceaccounts
verbs:
- create
- get
Expand All @@ -512,6 +550,7 @@ rules:
- apps
resources:
- statefulsets
- deployments
verbs:
- create
- get
Expand Down Expand Up @@ -592,5 +631,9 @@ spec:
env:
- name: ASPNETCORE_ENVIRONMENT
value: "Production"
- name: POD_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
resources:
{}
33 changes: 33 additions & 0 deletions dev/dev-helm-chart/crds/kubesqlworkers_sql-server_dotkube_io.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: kubesqlworkers.sql-server.dotkube.io
spec:
group: sql-server.dotkube.io
names:
kind: KubeSqlWorker
listKind: KubeSqlWorkerList
plural: kubesqlworkers
singular: kubesqlworker
scope: Cluster
versions:
- name: v1alpha1
schema:
openAPIV3Schema:
properties:
status:
description: Status of the KubeSqlWorker configuration.
properties:
state:
description: The current state of the worker configuration.
type: string
type: object
spec:
description: Spec of the KubeSqlWorker configuration.
properties: {}
type: object
type: object
served: true
storage: true
subresources:
status: {}
Loading