Skip to content

Commit

Permalink
Add volume expansion standalone
Browse files Browse the repository at this point in the history
Signed-off-by: Neaj Morshad <[email protected]>
  • Loading branch information
Neaj-Morshad-101 committed Nov 14, 2024
1 parent 8b86a72 commit 3572373
Show file tree
Hide file tree
Showing 11 changed files with 528 additions and 7 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: 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
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
apiVersion: ops.kubedb.com/v1alpha1
kind: MSSQLServerOpsRequest
metadata:
name: mops-volume-exp-std
namespace: demo
spec:
type: VolumeExpansion
databaseRef:
name: mssql-standalone
volumeExpansion:
mode: "Offline" # Online
mssqlserver: 2Gi
38 changes: 38 additions & 0 deletions docs/examples/mssqlserver/volume-expansion/mssql-standalone.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
apiVersion: kubedb.com/v1alpha2
kind: MSSQLServer
metadata:
name: mssql-standalone
namespace: demo
spec:
version: "2022-cu12"
replicas: 1
storageType: Durable
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"
storage:
storageClassName: "longhorn"
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi
deletionPolicy: WipeOut
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
---
title: MSSQLServer Volume Expansion
title: Availability Group (HA Cluster) Volume Expansion
menu:
docs_{{ .version }}:
identifier: mssqlserver-volume-expansion-guide
name: MSSQLServer Volume Expansion
identifier: volume-expansion-guide-ag-cluster
name: Availability Group (HA Cluster)
parent: ms-volume-expansion
weight: 20
weight: 30
menu_name: docs_{{ .version }}
section_menu_id: guides
---
Expand All @@ -14,7 +14,7 @@ section_menu_id: guides
# MSSQLServer Volume Expansion

This guide will show you how to use `KubeDB` Ops-manager operator to expand the volume of a MSSQLServer.
This guide will show you how to use `KubeDB` Ops-manager operator to expand the volume of a SQL Server Availability Group Cluster.

## Before You Begin

Expand All @@ -38,11 +38,11 @@ $ kubectl create ns demo
namespace/demo created
```

## Expand Volume of MSSQLServer
## Expand Volume of MSSQLServer Availability Group Cluster

Here, we are going to deploy a `MSSQLServer` cluster using a supported version by `KubeDB` operator. Then we are going to apply `MSSQLServerOpsRequest` to expand its volume. The process of expanding MSSQLServer `standalone` is same as MSSQLServer Availability Group cluster.

### Prepare MSSQLServer
### Prepare MSSQLServer Availability Group Cluster

At first verify that your cluster has a storage class, that supports volume expansion. Let's check,

Expand Down
Loading

0 comments on commit 3572373

Please sign in to comment.