Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Reconfigure, UpdateVersion, Reconfigure TLS for SQL Server #714

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
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
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: mg-issuer
namespace: demo
spec:
ca:
secretName: mongo-ca
17 changes: 17 additions & 0 deletions docs/examples/mssqlserver/reconfigure-tls/mg-replicaset.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
apiVersion: kubedb.com/v1
kind: MongoDB
metadata:
name: mg-rs
namespace: demo
spec:
version: "4.4.26"
replicas: 3
replicaSet:
name: rs0
storage:
storageClassName: "standard"
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi
21 changes: 21 additions & 0 deletions docs/examples/mssqlserver/reconfigure-tls/mops-add-tls.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
apiVersion: ops.kubedb.com/v1alpha1
kind: MongoDBOpsRequest
metadata:
name: mops-add-tls
namespace: demo
spec:
type: ReconfigureTLS
databaseRef:
name: mg-rs
tls:
issuerRef:
name: mg-issuer
kind: Issuer
apiGroup: "cert-manager.io"
certificates:
- alias: client
subject:
organizations:
- mongo
organizationalUnits:
- client
14 changes: 14 additions & 0 deletions docs/examples/mssqlserver/reconfigure-tls/mops-change-issuer.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
apiVersion: ops.kubedb.com/v1alpha1
kind: MongoDBOpsRequest
metadata:
name: mops-change-issuer
namespace: demo
spec:
type: ReconfigureTLS
databaseRef:
name: mg-rs
tls:
issuerRef:
name: mg-new-issuer
kind: Issuer
apiGroup: "cert-manager.io"
11 changes: 11 additions & 0 deletions docs/examples/mssqlserver/reconfigure-tls/mops-remove.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
apiVersion: ops.kubedb.com/v1alpha1
kind: MongoDBOpsRequest
metadata:
name: mops-remove
namespace: demo
spec:
type: ReconfigureTLS
databaseRef:
name: mg-rs
tls:
remove: true
11 changes: 11 additions & 0 deletions docs/examples/mssqlserver/reconfigure-tls/mops-rotate.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
apiVersion: ops.kubedb.com/v1alpha1
kind: MongoDBOpsRequest
metadata:
name: mops-rotate
namespace: demo
spec:
type: ReconfigureTLS
databaseRef:
name: mg-rs
tls:
rotateCertificates: true
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
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
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
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
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: mg-new-issuer
namespace: demo
spec:
ca:
secretName: mongo-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
Loading