Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
Signed-off-by: Tamal Saha <[email protected]>
  • Loading branch information
tamalsaha committed Nov 4, 2024
1 parent 1f0490e commit a7400b7
Show file tree
Hide file tree
Showing 73 changed files with 5,199 additions and 46 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
apiVersion: autoscaling.kubedb.com/v1alpha1
kind: MSSQLServerAutoscaler
metadata:
name: ms-as-compute
namespace: demo
spec:
databaseRef:
name: mssqlserver-ag-cluster
opsRequestOptions:
timeout: 5m
apply: IfReady
compute:
mssqlserver:
trigger: "On"
podLifeTimeThreshold: 5m
resourceDiffPercentage: 10
minAllowed:
cpu: 800m
memory: 2Gi
maxAllowed:
cpu: 1
memory: 3Gi
containerControlledValues: "RequestsAndLimits"
controlledResources: ["cpu", "memory"]
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
apiVersion: kubedb.com/v1alpha2
kind: MSSQLServer
metadata:
name: mssqlserver-ag-cluster
namespace: demo
spec:
version: "2022-cu12"
replicas: 3
topology:
mode: AvailabilityGroup
availabilityGroup:
databases:
- agdb1
- agdb2
internalAuth:
endpointCert:
issuerRef:
apiGroup: cert-manager.io
name: mssqlserver-ca-issuer
kind: Issuer
tls:
issuerRef:
name: mssqlserver-ca-issuer
kind: Issuer
apiGroup: "cert-manager.io"
clientTLS: false
podTemplate:
spec:
containers:
- name: mssql
resources:
requests:
cpu: "500m"
memory: "1.5Gi"
limits:
cpu: "600m"
memory: "1.6Gi"
storageType: Durable
storage:
storageClassName: "longhorn"
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi
deletionPolicy: WipeOut
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
apiVersion: autoscaling.kubedb.com/v1alpha1
kind: MSSQLServerAutoscaler
metadata:
name: ms-as-storage
namespace: demo
spec:
databaseRef:
name: mssqlserver-ag-cluster
storage:
mssqlserver:
trigger: "On"
usageThreshold: 60
scalingThreshold: 50
expansionMode: "Offline"
upperBound: "100Gi"
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
apiVersion: kubedb.com/v1alpha2
kind: MSSQLServer
metadata:
name: mssqlserver-ag-cluster
namespace: demo
spec:
version: "2022-cu12"
replicas: 3
topology:
mode: AvailabilityGroup
availabilityGroup:
databases:
- agdb1
- agdb2
internalAuth:
endpointCert:
issuerRef:
apiGroup: cert-manager.io
name: mssqlserver-ca-issuer
kind: Issuer
tls:
issuerRef:
name: mssqlserver-ca-issuer
kind: Issuer
apiGroup: "cert-manager.io"
clientTLS: false
podTemplate:
spec:
containers:
- name: mssql
resources:
requests:
cpu: "500m"
memory: "1.5Gi"
limits:
cpu: "600m"
memory: "1.6Gi"
storageType: Durable
storage:
storageClassName: "longhorn"
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi
deletionPolicy: WipeOut
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
apiVersion: kubedb.com/v1alpha2
kind: MSSQLServer
metadata:
name: mssql-monitoring
namespace: demo
spec:
version: "2022-cu12"
replicas: 1
tls:
issuerRef:
name: mssqlserver-ca-issuer
kind: Issuer
apiGroup: "cert-manager.io"
clientTLS: false
monitor:
agent: prometheus.io/operator
prometheus:
exporter:
port: 9399
resources:
limits:
memory: 512Mi
requests:
cpu: 200m
memory: 256Mi
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
runAsGroup: 10001
runAsNonRoot: true
runAsUser: 10001
seccompProfile:
type: RuntimeDefault
serviceMonitor:
interval: 10s
labels:
release: prometheus
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,11 @@
apiVersion: ops.kubedb.com/v1alpha1
kind: MSSQLServerOpsRequest
metadata:
name: msops-restart
namespace: demo
spec:
type: Restart
databaseRef:
name: mssqlserver-ag-cluster
timeout: 3m
apply: Always
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
apiVersion: kubedb.com/v1alpha2
kind: MSSQLServer
metadata:
name: mssqlserver-ag-cluster
namespace: demo
spec:
version: "2022-cu12"
replicas: 3
topology:
mode: AvailabilityGroup
availabilityGroup:
databases:
- agdb1
- agdb2
internalAuth:
endpointCert:
issuerRef:
apiGroup: cert-manager.io
name: mssqlserver-ca-issuer
kind: Issuer
tls:
issuerRef:
name: mssqlserver-ca-issuer
kind: Issuer
apiGroup: "cert-manager.io"
clientTLS: false
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,8 @@
apiVersion: cert-manager.io/v1
kind: Issuer
metadata:
name: mssqlserver-ca-issuer
namespace: demo
spec:
ca:
secretName: mssqlserver-ca
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
apiVersion: ops.kubedb.com/v1alpha1
kind: MSSQLServerOpsRequest
metadata:
name: msops-hscale-down
namespace: demo
spec:
type: HorizontalScaling
databaseRef:
name: mssql-ag-cluster
horizontalScaling:
replicas: 2
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
apiVersion: ops.kubedb.com/v1alpha1
kind: MSSQLServerOpsRequest
metadata:
name: msops-hscale-up
namespace: demo
spec:
type: HorizontalScaling
databaseRef:
name: mssql-ag-cluster
horizontalScaling:
replicas: 3
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
apiVersion: kubedb.com/v1alpha2
kind: MSSQLServer
metadata:
name: mssql-ag-cluster
namespace: demo
spec:
version: "2022-cu12"
replicas: 2
topology:
mode: AvailabilityGroup
availabilityGroup:
databases:
- agdb1
- agdb2
internalAuth:
endpointCert:
issuerRef:
apiGroup: cert-manager.io
name: mssqlserver-ca-issuer
kind: Issuer
tls:
issuerRef:
name: mssqlserver-ca-issuer
kind: Issuer
apiGroup: "cert-manager.io"
clientTLS: false
podTemplate:
spec:
containers:
- name: mssql
resources:
requests:
cpu: "500m"
memory: "1.5Gi"
limits:
cpu: 1
memory: "2Gi"
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,8 @@
apiVersion: cert-manager.io/v1
kind: Issuer
metadata:
name: mssqlserver-ca-issuer
namespace: demo
spec:
ca:
secretName: mssqlserver-ca
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
apiVersion: ops.kubedb.com/v1alpha1
kind: MSSQLServerOpsRequest
metadata:
name: mops-vscale-ag-cluster
namespace: demo
spec:
type: VerticalScaling
databaseRef:
name: mssql-ag-cluster
verticalScaling:
mssqlserver:
resources:
requests:
memory: "1.7Gi"
cpu: "700m"
limits:
cpu: 2
memory: "4Gi"
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
apiVersion: ops.kubedb.com/v1alpha1
kind: MSSQLServerOpsRequest
metadata:
name: mops-vscale-standalone
namespace: demo
spec:
type: VerticalScaling
databaseRef:
name: mssql-standalone
verticalScaling:
mssqlserver:
resources:
requests:
memory: "5Gi"
cpu: "1000m"
limits:
memory: "5Gi"
Loading

0 comments on commit a7400b7

Please sign in to comment.