Skip to content

Commit

Permalink
Add Reconfigure, UpdateVersion, Reconfigure TLS for SQL Server (#714)
Browse files Browse the repository at this point in the history
* Finish standalone

Signed-off-by: Neaj Morshad <[email protected]>

* Finish reconfigure for ag

Signed-off-by: Neaj Morshad <[email protected]>

* Fix index

Signed-off-by: Neaj Morshad <[email protected]>

* Update images

Signed-off-by: Neaj Morshad <[email protected]>

* Add Update Version doc

Signed-off-by: Neaj Morshad <[email protected]>

* Add volume expansion standalone

Signed-off-by: Neaj Morshad <[email protected]>

* reconfigure tls overview

Signed-off-by: Neaj Morshad <[email protected]>

* reconfigure tls guide wip tls added

Signed-off-by: Neaj Morshad <[email protected]>

* Finish reconfigure tls for standalone

Signed-off-by: Neaj Morshad <[email protected]>

* Finish reconfigure tls for ag

Signed-off-by: Neaj Morshad <[email protected]>

* Add reconfigure tls image

Signed-off-by: Neaj Morshad <[email protected]>

* Update concepts

Signed-off-by: Neaj Morshad <[email protected]>

* Update yamls

Signed-off-by: Neaj Morshad <[email protected]>

* Add review changes

Signed-off-by: Neaj Morshad <[email protected]>

---------

Signed-off-by: Neaj Morshad <[email protected]>
  • Loading branch information
Neaj-Morshad-101 authored Dec 17, 2024
1 parent 6d67a6e commit 7786905
Show file tree
Hide file tree
Showing 51 changed files with 4,923 additions and 65 deletions.
8 changes: 8 additions & 0 deletions docs/examples/mssqlserver/reconfigure-tls/issuer.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
apiVersion: cert-manager.io/v1
kind: Issuer
metadata:
name: mssqlserver-ca-issuer
namespace: demo
spec:
ca:
secretName: mssqlserver-ca
32 changes: 32 additions & 0 deletions docs/examples/mssqlserver/reconfigure-tls/ms-standalone.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
apiVersion: kubedb.com/v1alpha2
kind: MSSQLServer
metadata:
name: ms-standalone
namespace: demo
spec:
version: "2022-cu12"
replicas: 1
tls:
issuerRef:
name: mssqlserver-ca-issuer
kind: Issuer
apiGroup: "cert-manager.io"
clientTLS: false
podTemplate:
spec:
containers:
- name: mssql
env:
- name: ACCEPT_EULA
value: "Y"
- name: MSSQL_PID
value: Evaluation
storageType: Durable
storage:
storageClassName: "standard"
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi
deletionPolicy: WipeOut
24 changes: 24 additions & 0 deletions docs/examples/mssqlserver/reconfigure-tls/msops-add-tls.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
apiVersion: ops.kubedb.com/v1alpha1
kind: MSSQLServerOpsRequest
metadata:
name: msops-add-tls
namespace: demo
spec:
type: ReconfigureTLS
databaseRef:
name: ms-standalone
tls:
issuerRef:
name: mssqlserver-ca-issuer
kind: Issuer
apiGroup: "cert-manager.io"
certificates:
- alias: client
subject:
organizations:
- mssqlserver
organizationalUnits:
- client
clientTLS: true
timeout: 5m
apply: IfReady
24 changes: 24 additions & 0 deletions docs/examples/mssqlserver/reconfigure-tls/msops-ag-add-tls.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
apiVersion: ops.kubedb.com/v1alpha1
kind: MSSQLServerOpsRequest
metadata:
name: msops-ag-add-tls
namespace: demo
spec:
type: ReconfigureTLS
databaseRef:
name: mssql-ag-cluster
tls:
issuerRef:
name: mssqlserver-ca-issuer
kind: Issuer
apiGroup: "cert-manager.io"
certificates:
- alias: client
subject:
organizations:
- mssqlserver
organizationalUnits:
- client
clientTLS: true
timeout: 5m
apply: IfReady
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
apiVersion: ops.kubedb.com/v1alpha1
kind: MSSQLServerOpsRequest
metadata:
name: msops-ag-change-issuer
namespace: demo
spec:
type: ReconfigureTLS
databaseRef:
name: mssql-ag-cluster
tls:
issuerRef:
name: mssqlserver-new-ca-issuer
kind: Issuer
apiGroup: "cert-manager.io"
11 changes: 11 additions & 0 deletions docs/examples/mssqlserver/reconfigure-tls/msops-ag-remove.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
apiVersion: ops.kubedb.com/v1alpha1
kind: MSSQLServerOpsRequest
metadata:
name: msops-ag-remove
namespace: demo
spec:
type: ReconfigureTLS
databaseRef:
name: mssql-ag-cluster
tls:
remove: true
13 changes: 13 additions & 0 deletions docs/examples/mssqlserver/reconfigure-tls/msops-ag-rotate.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
apiVersion: ops.kubedb.com/v1alpha1
kind: MSSQLServerOpsRequest
metadata:
name: msops-ag-rotate
namespace: demo
spec:
type: ReconfigureTLS
databaseRef:
name: mssql-ag-cluster
tls:
rotateCertificates: true
timeout: 5m
apply: IfReady
14 changes: 14 additions & 0 deletions docs/examples/mssqlserver/reconfigure-tls/msops-change-issuer.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
apiVersion: ops.kubedb.com/v1alpha1
kind: MSSQLServerOpsRequest
metadata:
name: msops-change-issuer
namespace: demo
spec:
type: ReconfigureTLS
databaseRef:
name: ms-standalone
tls:
issuerRef:
name: mssqlserver-new-ca-issuer
kind: Issuer
apiGroup: "cert-manager.io"
11 changes: 11 additions & 0 deletions docs/examples/mssqlserver/reconfigure-tls/msops-remove.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
apiVersion: ops.kubedb.com/v1alpha1
kind: MSSQLServerOpsRequest
metadata:
name: msops-remove
namespace: demo
spec:
type: ReconfigureTLS
databaseRef:
name: ms-standalone
tls:
remove: true
13 changes: 13 additions & 0 deletions docs/examples/mssqlserver/reconfigure-tls/msops-rotate.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
apiVersion: ops.kubedb.com/v1alpha1
kind: MSSQLServerOpsRequest
metadata:
name: msops-rotate
namespace: demo
spec:
type: ReconfigureTLS
databaseRef:
name: ms-standalone
tls:
rotateCertificates: true
timeout: 5m
apply: IfReady
44 changes: 44 additions & 0 deletions docs/examples/mssqlserver/reconfigure-tls/mssql-ag-cluster.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
apiVersion: kubedb.com/v1alpha2
kind: MSSQLServer
metadata:
name: mssql-ag-cluster
namespace: demo
spec:
version: "2022-cu12"
replicas: 3
topology:
mode: AvailabilityGroup
availabilityGroup:
databases:
- agdb1
- agdb2
tls:
issuerRef:
name: mssqlserver-ca-issuer
kind: Issuer
apiGroup: "cert-manager.io"
clientTLS: false
podTemplate:
spec:
containers:
- name: mssql
env:
- name: ACCEPT_EULA
value: "Y"
- name: MSSQL_PID
value: Evaluation
resources:
requests:
cpu: "500m"
memory: "1.5Gi"
limits:
memory: "2Gi"
storageType: Durable
storage:
storageClassName: "standard"
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi
deletionPolicy: WipeOut
8 changes: 8 additions & 0 deletions docs/examples/mssqlserver/reconfigure-tls/new-issuer.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
apiVersion: cert-manager.io/v1
kind: Issuer
metadata:
name: mssqlserver-new-ca-issuer
namespace: demo
spec:
ca:
secretName: mssqlserver-new-ca
34 changes: 34 additions & 0 deletions docs/examples/mssqlserver/reconfigure/ms-standalone.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
apiVersion: kubedb.com/v1alpha2
kind: MSSQLServer
metadata:
name: ms-standalone
namespace: demo
spec:
version: "2022-cu12"
configSecret:
name: ms-custom-config
replicas: 1
tls:
issuerRef:
name: mssqlserver-ca-issuer
kind: Issuer
apiGroup: "cert-manager.io"
clientTLS: false
podTemplate:
spec:
containers:
- name: mssql
env:
- name: ACCEPT_EULA
value: "Y"
- name: MSSQL_PID
value: Evaluation
storageType: Durable
storage:
storageClassName: "standard"
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi
deletionPolicy: WipeOut
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
apiVersion: ops.kubedb.com/v1alpha1
kind: MSSQLServerOpsRequest
metadata:
name: msops-reconfigure-ag-apply
namespace: demo
spec:
type: Reconfigure
databaseRef:
name: mssqlserver-ag-cluster
configuration:
applyConfig:
mssql.conf: |-
[memory]
memorylimitmb = 3072
timeout: 5m
apply: IfReady
14 changes: 14 additions & 0 deletions docs/examples/mssqlserver/reconfigure/msops-reconfigure-ag.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
apiVersion: ops.kubedb.com/v1alpha1
kind: MSSQLServerOpsRequest
metadata:
name: msops-reconfigure-ag
namespace: demo
spec:
type: Reconfigure
databaseRef:
name: mssqlserver-ag-cluster
configuration:
configSecret:
name: new-custom-config
timeout: 5m
apply: IfReady
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
apiVersion: ops.kubedb.com/v1alpha1
kind: MSSQLServerOpsRequest
metadata:
name: msops-reconfigure-standalone-apply
namespace: demo
spec:
type: Reconfigure
databaseRef:
name: ms-standalone
configuration:
applyConfig:
mssql.conf: |-
[memory]
memorylimitmb = 3072
timeout: 5m
apply: IfReady
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
apiVersion: ops.kubedb.com/v1alpha1
kind: MSSQLServerOpsRequest
metadata:
name: msops-reconfigure-standalone
namespace: demo
spec:
type: Reconfigure
databaseRef:
name: ms-standalone
configuration:
configSecret:
name: new-custom-config
timeout: 5m
apply: IfReady
40 changes: 40 additions & 0 deletions docs/examples/mssqlserver/reconfigure/mssqlserver-ag-cluster.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
apiVersion: kubedb.com/v1alpha2
kind: MSSQLServer
metadata:
name: mssqlserver-ag-cluster
namespace: demo
spec:
version: "2022-cu12"
configSecret:
name: ms-custom-config
replicas: 3
topology:
mode: AvailabilityGroup
availabilityGroup:
databases:
- agdb1
- agdb2
tls:
issuerRef:
name: mssqlserver-ca-issuer
kind: Issuer
apiGroup: "cert-manager.io"
clientTLS: false
podTemplate:
spec:
containers:
- name: mssql
env:
- name: ACCEPT_EULA
value: "Y"
- name: MSSQL_PID
value: Developer
storageType: Durable
storage:
storageClassName: "standard"
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi
deletionPolicy: WipeOut
Loading

0 comments on commit 7786905

Please sign in to comment.