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 Restart, TLS and Reconfigure TLS for Memcached #716

Merged
merged 12 commits into from
Dec 3, 2024
18 changes: 18 additions & 0 deletions docs/examples/memcached/custom-config/custom-podtemplate.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
apiVersion: kubedb.com/v1
kind: Memcached
metadata:
name: custom-mc
namespace: demo
spec:
version: "1.6.22"
replicas: 1
podTemplate:
spec:
containers:
- name: memcached
env:
- name: "Memcached_Key"
value: KubeDB
- name: "Memcached_Value"
value: '123'
deletionPolicy: WipeOut
13 changes: 13 additions & 0 deletions docs/examples/memcached/custom-config/node-selector.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
apiVersion: kubedb.com/v1
kind: Memcached
metadata:
name: memcached-node-selector
namespace: demo
spec:
version: "1.6.22"
replicas: 1
podTemplate:
spec:
nodeSelector:
disktype: ssd
deletionPolicy: WipeOut
29 changes: 29 additions & 0 deletions docs/examples/memcached/custom-config/sidecar-container.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
apiVersion: kubedb.com/v1
kind: Memcached
metadata:
name: memcached-custom-sidecar
namespace: demo
spec:
version: "1.6.22"
replicas: 1
podTemplate:
spec:
containers:
- name: memcached
resources:
limits:
cpu: 100m
memory: 100Mi
requests:
cpu: 100m
memory: 100Mi
- name: filebeat
image: evanraisul/custom_filebeat:latest
resources:
limits:
cpu: 300m
memory: 300Mi
requests:
cpu: 300m
memory: 300Mi
deletionPolicy: WipeOut
16 changes: 16 additions & 0 deletions docs/examples/memcached/custom-config/with-tolerations.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
apiVersion: kubedb.com/v1
kind: Memcached
metadata:
name: memcached-with-tolerations
namespace: demo
spec:
version: "1.6.22"
replicas: 1
podTemplate:
spec:
tolerations:
- key: "key1"
operator: "Equal"
value: "node1"
effect: "NoSchedule"
deletionPolicy: WipeOut
9 changes: 9 additions & 0 deletions docs/examples/memcached/custom-config/without-toleration.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
apiVersion: kubedb.com/v1
kind: Memcached
metadata:
name: memcached-without-tolerations
namespace: demo
spec:
version: "1.6.22"
replicas: 1
deletionPolicy: WipeOut
8 changes: 8 additions & 0 deletions docs/examples/memcached/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: memcached-ca-issuer
namespace: demo
spec:
ca:
secretName: memcached-ca
21 changes: 21 additions & 0 deletions docs/examples/memcached/reconfigure-tls/mc-add-tls.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
apiVersion: ops.kubedb.com/v1alpha1
kind: MemcachedOpsRequest
metadata:
name: mc-add-tls
namespace: demo
spec:
type: ReconfigureTLS
databaseRef:
name: memcd-quickstart
tls:
issuerRef:
name: memcached-ca-issuer
kind: Issuer
apiGroup: "cert-manager.io"
certificates:
- alias: client
subject:
organizations:
- memcached
organizationalUnits:
- client
14 changes: 14 additions & 0 deletions docs/examples/memcached/reconfigure-tls/mc-change-issuer.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
apiVersion: ops.kubedb.com/v1alpha1
kind: MemcachedOpsRequest
metadata:
name: mc-change-issuer
namespace: demo
spec:
type: ReconfigureTLS
databaseRef:
name: memcd-quickstart
tls:
issuerRef:
name: mc-new-issuer
kind: Issuer
apiGroup: "cert-manager.io"
8 changes: 8 additions & 0 deletions docs/examples/memcached/reconfigure-tls/mc-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: mc-new-issuer
namespace: demo
spec:
ca:
secretName: memcached-new-ca
11 changes: 11 additions & 0 deletions docs/examples/memcached/reconfigure-tls/mc-ops-rotate.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
apiVersion: ops.kubedb.com/v1alpha1
kind: MemcachedOpsRequest
metadata:
name: mc-ops-rotate
namespace: demo
spec:
type: ReconfigureTLS
databaseRef:
name: memcd-quickstart
tls:
rotateCertificates: true
11 changes: 11 additions & 0 deletions docs/examples/memcached/reconfigure-tls/mc-ops-tls-remove.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
apiVersion: ops.kubedb.com/v1alpha1
kind: MemcachedOpsRequest
metadata:
name: mc-ops-tls-remove
namespace: demo
spec:
type: ReconfigureTLS
databaseRef:
name: memcd-quickstart
tls:
remove: true
9 changes: 9 additions & 0 deletions docs/examples/memcached/reconfigure-tls/memcached.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
apiVersion: kubedb.com/v1
kind: Memcached
metadata:
name: memcd-quickstart
namespace: demo
spec:
replicas: 1
version: "1.6.22"
deletionPolicy: WipeOut
20 changes: 20 additions & 0 deletions docs/examples/memcached/restart/memcached.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
apiVersion: kubedb.com/v1
kind: Memcached
metadata:
name: memcd-quickstart
namespace: demo
spec:
replicas: 1
version: "1.6.22"
podTemplate:
spec:
containers:
- name: memcached
resources:
limits:
cpu: 500m
memory: 128Mi
requests:
cpu: 250m
memory: 64Mi
deletionPolicy: WipeOut
9 changes: 9 additions & 0 deletions docs/examples/memcached/restart/opsrequest-restart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
apiVersion: ops.kubedb.com/v1alpha1
kind: MemcachedOpsRequest
metadata:
name: memcd-new
namespace: demo
spec:
type: Restart
databaseRef:
name: memcd-quickstart
19 changes: 19 additions & 0 deletions docs/examples/memcached/tls/mc-tls.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
apiVersion: kubedb.com/v1
kind: Memcached
metadata:
name: memcd-quickstart
namespace: demo
spec:
replicas: 1
version: "1.6.22"
tls:
issuerRef:
apiGroup: "cert-manager.io"
kind: Issuer
name: memcached-ca-issuer
certificates:
- alias: client
ipAddresses:
- 127.0.0.1
- 192.168.0.252
deletionPolicy: WipeOut
8 changes: 8 additions & 0 deletions docs/examples/memcached/tls/memcached-ca-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: memcached-ca-issuer
namespace: demo
spec:
ca:
secretName: memcached-ca
48 changes: 22 additions & 26 deletions docs/guides/memcached/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,34 +15,30 @@ aliases:

> New to KubeDB? Please start [here](/docs/README.md).

## Supported Memcached Features

| Features | Availability |
| ------------------------------------ | :----------: |
| Clustering | ✗ |
| Persistent Volume | ✗ |
| Instant Backup | ✗ |
| Scheduled Backup | ✗ |
| Initialize using Snapshot | ✗ |
| Initialize using Script | ✗ |
| Multiple Memcached Versions | ✓ |
| Custom Configuration | ✓ |
| Externally manageable Auth Secret | ✗ |
| Reconfigurable Health Checker | ✓ |
| Using Custom docker image | ✓ |
| Builtin Prometheus Discovery | ✓ |
| Using Prometheus operator | ✓ |
| Automated Version Update | ✓ |
| Automated Vertical Scaling | ✓ |
| Automated Horizontal Scaling | ✓ |
| Automated db-configure Reconfiguration | ✓ |
| TLS: Add, Remove, Update, Rotate ( Cert Manager ) |✗|
| Automated Volume Expansion | ✗ |
| Autoscaling (Vertically) | ✓ |
| Grafana Dashboard | ✓ |
| Alert Dashboard | ✗ |
## Overview
`Memcached` is an in-memory key-value store that allows for high-performance, low-latency data caching. It is often used to speed up dynamic web applications by offloading frequent, computationally expensive database queries and storing data that needs to be retrieved fast. Memcached is frequently used in contexts where the rapid retrieval of tiny data items, such as session data, query results, and user profiles, is critical for increasing application performance. It is especially well-suited for use cases requiring scalability, distributed caching, and high throughput, making it a popular choice for powering online and mobile apps, particularly in high-concurrency environments. Memcached is a simple, extremely efficient caching layer that minimizes stress on backend systems and improves performance for applications that require real-time data.

## Supported Memcached Features

| Features | Availability |
| ----------------------------------------------------- | :----------: |
| Custom Configuration | ✓ |
| Externally manageable Auth Secret | ✓ |
| Reconfigurable Health Checker | ✓ |
| Using Custom docker image | ✓ |
| Builtin Prometheus Discovery | ✓ |
| Operator Managed Prometheus Discovery | ✓ |
| Automated Version Update | ✓ |
| Automated Vertical Scaling | ✓ |
| Automated Horizontal Scaling | ✓ |
| Automated db-configure Reconfiguration | ✓ |
| Authentication & Authorization | ✓ |
| TLS: Add, Remove, Update, Rotate ( Cert Manager ) | ✓ |
| Autoscaling (Vertically) | ✓ |
| Multiple Memcached Versions | ✓ |
| Monitoring using Prometheus and Grafana | ✓ |
| Monitoring Grafana Dashboard | ✓ |
| Alert Grafana Dashboard | ✓ |

## Life Cycle of a Memcached Object

Expand Down
2 changes: 1 addition & 1 deletion docs/guides/memcached/autoscaler/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ menu:
identifier: auto-scaling
name: Autoscaling
parent: mc-memcached-guides
weight: 47
weight: 90
menu_name: docs_{{ .version }}
---
2 changes: 1 addition & 1 deletion docs/guides/memcached/autoscaler/compute/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ menu:
identifier: compute-auto-scaling
name: Compute Autoscaling
parent: auto-scaling
weight: 46
weight: 91
menu_name: docs_{{ .version }}
---
2 changes: 1 addition & 1 deletion docs/guides/memcached/concepts/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ menu:
identifier: mc-concepts-memcached
name: Concepts
parent: mc-memcached-guides
weight: 20
weight: 30
menu_name: docs_{{ .version }}
---
2 changes: 1 addition & 1 deletion docs/guides/memcached/custom-configuration/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ menu:
identifier: custom-configuration
name: Custom Configuration
parent: mc-memcached-guides
weight: 30
weight: 40
menu_name: docs_{{ .version }}
---
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: Run Memcached with Custom Configuration
menu:
docs_{{ .version }}:
identifier: mc-using-config-file-configuration
name: Config File
name: Customize Configurations
parent: custom-configuration
weight: 10
menu_name: docs_{{ .version }}
Expand Down
Loading