diff --git a/docs/examples/memcached/reconfigure-tls/issuer.yaml b/docs/examples/memcached/reconfigure-tls/issuer.yaml new file mode 100644 index 000000000..3b1e28f71 --- /dev/null +++ b/docs/examples/memcached/reconfigure-tls/issuer.yaml @@ -0,0 +1,8 @@ +apiVersion: cert-manager.io/v1 +kind: Issuer +metadata: + name: memcached-ca-issuer + namespace: demo +spec: + ca: + secretName: memcached-ca \ No newline at end of file diff --git a/docs/examples/memcached/reconfigure-tls/mc-add-tls.yaml b/docs/examples/memcached/reconfigure-tls/mc-add-tls.yaml new file mode 100644 index 000000000..9dee52dfd --- /dev/null +++ b/docs/examples/memcached/reconfigure-tls/mc-add-tls.yaml @@ -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 \ No newline at end of file diff --git a/docs/examples/memcached/reconfigure-tls/mc-change-issuer.yaml b/docs/examples/memcached/reconfigure-tls/mc-change-issuer.yaml new file mode 100644 index 000000000..2da1192df --- /dev/null +++ b/docs/examples/memcached/reconfigure-tls/mc-change-issuer.yaml @@ -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" \ No newline at end of file diff --git a/docs/examples/memcached/reconfigure-tls/mc-new-issuer.yaml b/docs/examples/memcached/reconfigure-tls/mc-new-issuer.yaml new file mode 100644 index 000000000..4d9bd4fa1 --- /dev/null +++ b/docs/examples/memcached/reconfigure-tls/mc-new-issuer.yaml @@ -0,0 +1,8 @@ +apiVersion: cert-manager.io/v1 +kind: Issuer +metadata: + name: mc-new-issuer + namespace: demo +spec: + ca: + secretName: memcached-new-ca \ No newline at end of file diff --git a/docs/examples/memcached/reconfigure-tls/mc-ops-rotate.yaml b/docs/examples/memcached/reconfigure-tls/mc-ops-rotate.yaml new file mode 100644 index 000000000..095ca9ee7 --- /dev/null +++ b/docs/examples/memcached/reconfigure-tls/mc-ops-rotate.yaml @@ -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 \ No newline at end of file diff --git a/docs/examples/memcached/reconfigure-tls/mc-ops-tls-remove.yaml b/docs/examples/memcached/reconfigure-tls/mc-ops-tls-remove.yaml new file mode 100644 index 000000000..fb5f6f80e --- /dev/null +++ b/docs/examples/memcached/reconfigure-tls/mc-ops-tls-remove.yaml @@ -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 \ No newline at end of file diff --git a/docs/examples/memcached/reconfigure-tls/memcached.yaml b/docs/examples/memcached/reconfigure-tls/memcached.yaml new file mode 100644 index 000000000..405c5f6bf --- /dev/null +++ b/docs/examples/memcached/reconfigure-tls/memcached.yaml @@ -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 \ No newline at end of file diff --git a/docs/examples/memcached/tls/mc-tls.yaml b/docs/examples/memcached/tls/mc-tls.yaml new file mode 100644 index 000000000..d6f6457d8 --- /dev/null +++ b/docs/examples/memcached/tls/mc-tls.yaml @@ -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 \ No newline at end of file diff --git a/docs/examples/memcached/tls/memcached-ca-issuer.yaml b/docs/examples/memcached/tls/memcached-ca-issuer.yaml new file mode 100644 index 000000000..3b1e28f71 --- /dev/null +++ b/docs/examples/memcached/tls/memcached-ca-issuer.yaml @@ -0,0 +1,8 @@ +apiVersion: cert-manager.io/v1 +kind: Issuer +metadata: + name: memcached-ca-issuer + namespace: demo +spec: + ca: + secretName: memcached-ca \ No newline at end of file diff --git a/docs/guides/memcached/reconfigure-tls/reconfigure-tls.md b/docs/guides/memcached/reconfigure-tls/reconfigure-tls.md index 001eada0e..9f17289e0 100644 --- a/docs/guides/memcached/reconfigure-tls/reconfigure-tls.md +++ b/docs/guides/memcached/reconfigure-tls/reconfigure-tls.md @@ -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 @@ -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 @@ -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 ``` @@ -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 @@ -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 ``` @@ -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: Annotations: