Skip to content

Commit

Permalink
update navigation for reconfigure
Browse files Browse the repository at this point in the history
Signed-off-by: Mehedi Hasan <[email protected]>
  • Loading branch information
heheh13 committed Dec 12, 2022
1 parent 886f03c commit 72ce315
Show file tree
Hide file tree
Showing 6 changed files with 207 additions and 1 deletion.
3 changes: 3 additions & 0 deletions docs/guides/mysql/reconfigure-tls/reconfigure/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ mysql.kubedb.com/mysql created
</div>
<div class="tab-pane fade" id="innodbCluster" role="tabpanel" aria-labelledby="sc-tab">
```yaml
apiVersion: kubedb.com/v1alpha2
kind: MySQL
Expand Down Expand Up @@ -131,6 +132,7 @@ mysql.kubedb.com/mysql created
</div>

<div class="tab-pane fade " id="semisync" role="tabpanel" aria-labelledby="sc-tab">

```yaml
apiVersion: kubedb.com/v1alpha2
kind: MySQL
Expand Down Expand Up @@ -168,6 +170,7 @@ mysql.kubedb.com/mysql created
<div class="tab-pane fade show active" id="standAlone" role="tabpanel" aria-labelledby="st-tab">
```yaml
apiVersion: kubedb.com/v1alpha2
kind: MySQL
Expand Down
138 changes: 137 additions & 1 deletion docs/guides/mysql/reconfigure/reconfigure-steps/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,28 @@ secret/my-configuration created

In this section, we are going to create a MySQL object specifying `spec.configSecret` field to apply this custom configuration. Below is the YAML of the `MySQL` CR that we are going to create,

<ul class="nav nav-tabs" id="definationTab" role="tablist">
<li class="nav-item">
<a class="nav-link active" id="gr-tab" data-toggle="tab" href="#groupReplication" role="tab" aria-controls="groupReplication" aria-selected="true">Group Replication</a>
</li>

<li class="nav-item">
<a class="nav-link" id="ic-tab" data-toggle="tab" href="#innodbCluster" role="tab" aria-controls="innodbCluster" aria-selected="false">Innodb Cluster</a>
</li>

<li class="nav-item">
<a class="nav-link" id="sc-tab" data-toggle="tab" href="#semisync" role="tab" aria-controls="semisync" aria-selected="false">Semi sync </a>
</li>

<li class="nav-item">
<a class="nav-link" id="st-tab" data-toggle="tab" href="#standAlone" role="tab" aria-controls="standAlone" aria-selected="false">Stand Alone</a>
</li>
</ul>


<div class="tab-content" id="definationTabContent">
<div class="tab-pane fade show active" id="groupReplication" role="tabpanel" aria-labelledby="gr-tab">

```yaml
apiVersion: kubedb.com/v1alpha2
kind: MySQL
Expand Down Expand Up @@ -91,10 +113,124 @@ spec:
Let's create the `MySQL` CR we have shown above,

```bash
$ kubectl create -f https://github.com/kubedb/docs/raw/{{< param "info.version" >}}/docs/guides/mysql/reconfigure/reconfigure-steps/yamls/sample-mysql-config.yaml
$ kubectl create -f https://github.com/kubedb/docs/raw/{{< param "info.version" >}}/docs/guides/mysql/reconfigure/reconfigure-steps/yamls/group-replication.yaml
mysql.kubedb.com/sample-mysql created
```

</div>

<div class="tab-pane fade" id="innodbCluster" role="tabpanel" aria-labelledby="sc-tab">

```yaml
apiVersion: kubedb.com/v1alpha2
kind: MySQL
metadata:
name: sample-mysql
namespace: demo
spec:
version: "8.0.31-innodb"
topology:
mode: InnoDBCluster
innoDBCluster:
router:
replicas: 1
replicas: 3
configSecret:
name: my-configuration
storageType: Durable
storage:
storageClassName: "standard"
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi
terminationPolicy: WipeOut
```

Let's create the `MySQL` CR we have shown above,

```bash
$ kubectl create -f https://github.com/kubedb/docs/raw/{{< param "info.version" >}}/docs/guides/mysql/reconfigure/reconfigure-steps/yamls/innob-cluster.yaml
mysql.kubedb.com/sample-mysql created
```

</div>

<div class="tab-pane fade " id="semisync" role="tabpanel" aria-labelledby="sc-tab">

```yaml
apiVersion: kubedb.com/v1alpha2
kind: MySQL
metadata:
name: sample-mysql
namespace: demo
spec:
version: "8.0.31"
topology:
mode: SemiSync
semiSync:
sourceWaitForReplicaCount: 1
sourceTimeout: 23h
errantTransactionRecoveryPolicy: PseudoTransaction
replicas: 3
configSecret:
name: my-configuration
storageType: Durable
storage:
storageClassName: "standard"
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi
terminationPolicy: WipeOut
```

Let's create the `MySQL` CR we have shown above,

```bash
$ kubectl create -f https://github.com/kubedb/docs/raw/{{< param "info.version" >}}/docs/guides/mysql/reconfigure/reconfigure-steps/yamls/semi-sync.yaml
mysql.kubedb.com/sample-mysql created
```

</div>


<div class="tab-pane fade" id="standAlone" role="tabpanel" aria-labelledby="st-tab">

```yaml
apiVersion: kubedb.com/v1alpha2
kind: MySQL
metadata:
name: sample-mysql
namespace: demo
spec:
version: "8.0.31"
configSecret:
name: my-configuration
storageType: Durable
storage:
storageClassName: "standard"
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi
terminationPolicy: WipeOut
```

Let's create the `MySQL` CR we have shown above,

```bash
$ kubectl create -f https://github.com/kubedb/docs/raw/{{< param "info.version" >}}/docs/guides/mysql/reconfigure/reconfigure-steps/yamls/stand-alone.yaml
mysql.kubedb.com/sample-mysql created
```
</div>

</div>


Now, wait until `sample-mysql` has status `Ready`. i.e,

```bash
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
apiVersion: kubedb.com/v1alpha2
kind: MySQL
metadata:
name: sample-mysql
namespace: demo
spec:
version: "8.0.31-innodb"
topology:
mode: InnoDBCluster
innoDBCluster:
router:
replicas: 1
replicas: 3
configSecret:
name: my-configuration
storageType: Durable
storage:
storageClassName: "standard"
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi
terminationPolicy: WipeOut
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
apiVersion: kubedb.com/v1alpha2
kind: MySQL
metadata:
name: sample-mysql
namespace: demo
spec:
version: "8.0.31"
topology:
mode: SemiSync
semiSync:
sourceWaitForReplicaCount: 1
sourceTimeout: 23h
errantTransactionRecoveryPolicy: PseudoTransaction
replicas: 3
configSecret:
name: my-configuration
storageType: Durable
storage:
storageClassName: "standard"
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi
terminationPolicy: WipeOut
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
apiVersion: kubedb.com/v1alpha2
kind: MySQL
metadata:
name: sample-mysql
namespace: demo
spec:
version: "8.0.31"
configSecret:
name: my-configuration
storageType: Durable
storage:
storageClassName: "standard"
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi
terminationPolicy: WipeOut

0 comments on commit 72ce315

Please sign in to comment.