Skip to content

Commit

Permalink
Add Yamls
Browse files Browse the repository at this point in the history
Signed-off-by: Muhammad Raisul Islam Evan <[email protected]>
  • Loading branch information
Evanraisul committed Nov 22, 2024
1 parent dfb0d92 commit 6ef5c00
Show file tree
Hide file tree
Showing 10 changed files with 118 additions and 9 deletions.
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
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
18 changes: 9 additions & 9 deletions docs/guides/memcached/reconfigure-tls/reconfigure-tls.md
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ Let's create the `MemcachedOpsRequest` CR we have shown above,

```bash
$ kubectl apply -f https://github.com/kubedb/docs/raw/{{< param "info.version" >}}/docs/examples/memcached/reconfigure-tls/mc-add-tls.yaml
Memcachedopsrequest.ops.kubedb.com/rd-add-tls created
Memcachedopsrequest.ops.kubedb.com/mc-add-tls created
```

#### Verify TLS Enabled Successfully
Expand Down Expand Up @@ -401,7 +401,7 @@ Now we are going to rotate certificates using a MemcachedOpsRequest. Below is th
apiVersion: ops.kubedb.com/v1alpha1
kind: MemcachedOpsRequest
metadata:
name: myops-rotate
name: mc-ops-rotate
namespace: demo
spec:
type: ReconfigureTLS
Expand Down Expand Up @@ -576,7 +576,7 @@ spec:
Let's apply the `YAML` file:

```bash
$ kubectl create -f https://github.com/kubedb/docs/raw/{{< param "info.version" >}}/docs/examples/memcached/reconfigure-tls/new-issuer.yaml
$ kubectl create -f https://github.com/kubedb/docs/raw/{{< param "info.version" >}}/docs/examples/memcached/reconfigure-tls/mc-new-issuer.yaml
issuer.cert-manager.io/mc-new-issuer created
```

Expand Down Expand Up @@ -770,7 +770,7 @@ Below is the YAML of the `MemcachedOpsRequest` CRO that we are going to create,
apiVersion: ops.kubedb.com/v1alpha1
kind: MemcachedOpsRequest
metadata:
name: mc-ops-remove
name: mc-ops-tls-remove
namespace: demo
spec:
type: ReconfigureTLS
Expand All @@ -789,7 +789,7 @@ Here,
Let's create the `MemcachedOpsRequest` CR we have shown above,

```bash
$ kubectl apply -f https://github.com/kubedb/docs/raw/{{< param "info.version" >}}/docs/examples/memcached/reconfigure-tls/mc-ops-remove.yaml
$ kubectl apply -f https://github.com/kubedb/docs/raw/{{< param "info.version" >}}/docs/examples/memcached/reconfigure-tls/mc-ops-tls-remove.yaml
Memcachedopsrequest.ops.kubedb.com/mc-ops-remove created
```

Expand All @@ -800,15 +800,15 @@ Let's wait for `MemcachedOpsRequest` to be `Successful`. Run the following comm
```bash
$ kubectl get memcachedopsrequest -n demo
Every 2.0s: kubectl get memcachedopsrequest -n demo
NAME TYPE STATUS AGE
mc-ops-remove ReconfigureTLS Successful 105s
NAME TYPE STATUS AGE
mc-ops-tls-remove ReconfigureTLS Successful 105s
```

We can see from the above output that the `MemcachedOpsRequest` has succeeded. If we describe the `MemcachedOpsRequest` we will get an overview of the steps that were followed.

```bash
$ kubectl describe mcops -n demo mc-ops-remove
Name: mc-ops-remove
$ kubectl describe mcops -n demo mc-ops-tls-remove
Name: mc-ops-tls-remove
Namespace: demo
Labels: <none>
Annotations: <none>
Expand Down

0 comments on commit 6ef5c00

Please sign in to comment.