Skip to content

Commit

Permalink
add external backend doc for proxysql
Browse files Browse the repository at this point in the history
Signed-off-by: TasdidurRahman <[email protected]>
  • Loading branch information
TasdidurRahman committed Dec 12, 2022
1 parent 9138668 commit 8080168
Show file tree
Hide file tree
Showing 13 changed files with 563 additions and 8 deletions.
4 changes: 2 additions & 2 deletions docs/guides/elasticsearch/quickstart/overview/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ Here,
Let's create the Elasticsearch CR that is shown above:

```bash
$ kubectl apply -f https://github.com/kubedb/docs/raw/{{< param "info.version" >}}/docs/guides/elasticsearch/quickstart/overview/yamls/elasticsearch.yaml
$ kubectl apply -f https://github.com/kubedb/docs/raw/{{< param "info.version" >}}/docs/guides/elasticsearch/quickstart/mysqlgrp/yamls/elasticsearch.yaml
elasticsearch.kubedb.com/es-quickstart created
```

Expand Down Expand Up @@ -531,7 +531,7 @@ Say, the Elasticsearch CR was deleted with `spec.terminationPolicy` to `Halt` an
You can do it by simpily re-deploying the original Elasticsearch object:

```bash
$ kubectl apply -f https://github.com/kubedb/docs/raw/{{< param "info.version" >}}/docs/guides/elasticsearch/quickstart/overview/yamls/elasticsearch.yaml
$ kubectl apply -f https://github.com/kubedb/docs/raw/{{< param "info.version" >}}/docs/guides/elasticsearch/quickstart/mysqlgrp/yamls/elasticsearch.yaml
elasticsearch.kubedb.com/es-quickstart created
```

Expand Down
2 changes: 1 addition & 1 deletion docs/guides/mariadb/quickstart/overview/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ spec:
```
```bash
$ kubectl apply -f https://github.com/kubedb/docs/raw/{{< param "info.version" >}}/docs/guides/mariadb/quickstart/overview/examples/sample-mariadb.yaml
$ kubectl apply -f https://github.com/kubedb/docs/raw/{{< param "info.version" >}}/docs/guides/mariadb/quickstart/mysqlgrp/examples/sample-mariadb.yaml
mariadb.kubedb.com/sample-mariadb created
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ With kubedb proxysql we have eased this process with declarative yaml. We have s
User will provide the configuration under the `.spec.initConfig` section of the proxysql yaml. The operator parses the yaml and creates a configuration file. A secret is then created, holding that configuration file inside. Each time a new pod is created it is created with the configuration file inside that secret.

<p align="center">
  <img alt="ProxySQL Declarative Configuration" src="/docs/guides/proxysql/concepts/declarativeConfiguration/images/configuration.png">
<img alt="ProxySQL Declarative Configuration" src="/docs/guides/proxysql/concepts/declarativeConfiguration/images/configuration.png">
</p>

At any time the user might need to change the configuration. To serve that purpose we have introduced ProxySQLOpsRequest. When an ops-request is being created the enterprise operator updates the configuration secret and applies the changes to the proxysql cluster nodes. This is how the the configuration secret remains as a source of truth for the ProxySQL CRO and any changes are made in a declarative way.
Expand Down
4 changes: 3 additions & 1 deletion docs/guides/proxysql/concepts/proxysql/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ spec:

### .spec.backend

`.spec.backend` specifies the information about the appbinding of the backend MySQL/PerconaXtraDB/MariaDB. The appbinding should contain the basic informations like connections url, server type , ssl infos etc. To know more about what appbinding is, you can refer to the Appbinding page in the concept section. See the api [here](https://pkg.go.dev/kubedb.dev/[email protected]/apis/kubedb/v1alpha2#:~:text=//%20Backend%20refers%20to%20the%20AppBinding%20of%20the%20backend%20MySQL/MariaDB/Percona%2DXtraDB%20server%0A%09Backend%20*core.LocalObjectReference%20%60json%3A%22backend%2Comitempty%22%60).
`.spec.backend` specifies the information about the appbinding of the backend MySQL/PerconaXtraDB/MariaDB. The appbinding should contain the basic informations like connections url, server type , ssl infos etc. To know more about what appbinding is, you can refer to the [Appbinding](/docs/guides/proxysql/concepts/appbinding/index.md) page in the concept section. See the api [here](https://pkg.go.dev/kubedb.dev/[email protected]/apis/kubedb/v1alpha2#:~:text=//%20Backend%20refers%20to%20the%20AppBinding%20of%20the%20backend%20MySQL/MariaDB/Percona%2DXtraDB%20server%0A%09Backend%20*core.LocalObjectReference%20%60json%3A%22backend%2Comitempty%22%60).

### .spec.authSecret

Expand Down Expand Up @@ -171,6 +171,8 @@ ProxySQL managed by KubeDB can be monitored with builtin-Prometheus and Promethe

`.spec.initConfig.adminVariables` section carries all the `admin_variables` info that you want to set for the proxysql. You need to mention the variables you want to set with its value in a key-value format under this section and the KubeDB operator will bootstrap the proxysql with this.

Checkout this [link](/docs/guides/proxysql/concepts/declarativeConfiguration/index.md) for detailed overview on declarative configuration.

### .spec.configSecret

`.spec.configSecret` is another field to pass the bootstrap configuration for the proxysql. If you want to pass the configuration through a secret you can just mention the secret name under this field. The secret should look something like the following
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ spec:
```
```bash
$ kubectl apply -f https://github.com/kubedb/docs/raw/{{< param "info.version" >}}/docs/guides/proxysql/quickstart/overview/examples/sample-mysql.yaml
$ kubectl apply -f https://github.com/kubedb/docs/raw/{{< param "info.version" >}}/docs/guides/proxysql/quickstart/mysqlgrp/examples/sample-mysql.yaml
mysql.kubedb.com/mysql-server created
```

Expand Down Expand Up @@ -143,7 +143,7 @@ This is the simplest version of a KubeDB ProxySQL server. Here in the `.spec.ver
Now let's apply the yaml.

```yaml
$ kubectl apply -f https://github.com/kubedb/docs/raw/{{< param "info.version" >}}/docs/guides/proxysql/quickstart/overview/examples/sample-proxysql.yaml
$ kubectl apply -f https://github.com/kubedb/docs/raw/{{< param "info.version" >}}/docs/guides/proxysql/quickstart/mysqlgrp/examples/sample-proxysql.yaml
proxysql.kubedb.com/proxysql-server created
```

Expand Down Expand Up @@ -261,7 +261,7 @@ spec:
Let's apply the yaml.

```yaml
$ kubectl apply -f https://github.com/kubedb/docs/raw/{{< param "info.version" >}}/docs/guides/proxysql/quickstart/overview/examples/ubuntu.yaml
$ kubectl apply -f https://github.com/kubedb/docs/raw/{{< param "info.version" >}}/docs/guides/proxysql/quickstart/mysqlgrp/examples/ubuntu.yaml
deployment.apps/ubuntu created
```

Expand Down
20 changes: 20 additions & 0 deletions docs/guides/proxysql/quickstart/xtradbext/examples/appbinding.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
apiVersion: appcatalog.appscode.com/v1alpha1
kind: AppBinding
metadata:
name: xtradb-galera-appbinding
namespace: demo
spec:
clientConfig:
caBundle: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSURJekNDQWd1Z0F3SUJBZ0lVWUp4dVBqcW1EbjJPaVdkMGk5cUZ2MGdzdzQwd0RRWUpLb1pJaHZjTkFRRUwKQlFBd0lURU9NQXdHQTFVRUF3d0ZiWGx6Y1d3eER6QU5CZ05WQkFvTUJtdDFZbVZrWWpBZUZ3MHlNakV3TVRBeApNalE1TlROYUZ3MHlNekV3TVRBeE1qUTVOVE5hTUNFeERqQU1CZ05WQkFNTUJXMTVjM0ZzTVE4d0RRWURWUVFLCkRBWnJkV0psWkdJd2dnRWlNQTBHQ1NxR1NJYjNEUUVCQVFVQUE0SUJEd0F3Z2dFS0FvSUJBUURkRTRMaEFabEQKQTh2aWk5QTlaT1VLOEVzeWU2ZDBWWnpRZmJUeS90VlF0N05ybkhjS1NkVHFmS0lkczl1bXhSd1Y2ak5WU2RtUQp2M3NUa0xwYTZBbFRwYklQazZ5S2UxRGs2YUhhbFZDSVc4SExLNW43YklzTEV3aEkyb3F4WmIrd0pydXVGSi95Clk4a2tyazVXaFBJZzRqM3VjV0FhcllqTVpxNXRQbU9sOFJXanhzY2k3WjJsN0lIcWplSjYrKzRENXlkeGx6L3gKdVhLNmxVM2J2Y2craWhUVno1UENNS2R4OHZNL052dTNuQ21Ja2hzQUkrNGVWZE4xenRIWG51UTFXRFhlUEFFYwpRQnJGanFuWk5pYmRUeU4zYTgrdmVUM2hLK3Fhc0ZFSU5aOFY4ZFVQSVV5cHFYSmk0anZCSW9FU0RvV2V1Z3QzCklhMjh6OE5XNk9WbkFnTUJBQUdqVXpCUk1CMEdBMVVkRGdRV0JCUUk3QU41RnNrT2lxb1pOVDNSc2ozQVBDVXcKbkRBZkJnTlZIU01FR0RBV2dCUUk3QU41RnNrT2lxb1pOVDNSc2ozQVBDVXduREFQQmdOVkhSTUJBZjhFQlRBRApBUUgvTUEwR0NTcUdTSWIzRFFFQkN3VUFBNElCQVFCU2JDUkx1TitGd2loQ3ZiamlmcjFldGViNUEzeVRWWjN2CkN6MEhMK2RYekJEbVI5OGxPdWgvSDV4bEVyT3U1emdjSXJLK3BtM0toQVl1NXhZOHBFSklwRXBCRExnSEVQNTQKMkc1NllydXcva1J2cWJ4VWlwUjIzTWJGZXpyUW9BeXNKbmZGRmZrYXNVWlBRSjg0dE05UStoTEpUcnp0VkczZgphcnVCd3h0SDA3bklZMTFRUnhZbERPQWx6ck9icWdvUUtwODFXVTBrTzdDRVd2Q1ZOenphb2dWV08rZUtvdUw5Ci9aQjVYQ1FVRlRScFlEQjB1aFk1NTAwR1kxYnRpRUVKaVdZVTg0UVFzampINVZlRkFtN21ldWRkak9pTEM3dUMKSmFISkRLa0txZWtDSkZ6YzF0QmpHQVZUNHZaTGcrUldhUmJHa01Qdm1WZVFIOUtSMVN2aQotLS0tLUVORCBDRVJUSUZJQ0FURS0tLS0tCg==
service:
name: xtradb-galera
path: /
port: 3306
scheme: mysql
url: tcp(xtradb-galera.demo.svc:3306)/
secret:
name: xtradb-galera-auth
type: perconaxtradb
tlsSecret:
name: xtradb-galera-client-cert
version: 8.0.26
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
apiVersion: kubedb.com/v1alpha2
kind: ProxySQL
metadata:
name: proxy-server
namespace: demo
spec:
version: "2.4.4-debian"
replicas: 1
syncUsers: true
backend:
name: xtradb-galera-appbinding
terminationPolicy: WipeOut
26 changes: 26 additions & 0 deletions docs/guides/proxysql/quickstart/xtradbext/examples/ubuntu.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
apiVersion: apps/v1
kind: Deployment
metadata:
creationTimestamp: null
labels:
app: ubuntu
name: ubuntu
namespace: demo
spec:
replicas: 1
selector:
matchLabels:
app: ubuntu
strategy: {}
template:
metadata:
creationTimestamp: null
labels:
app: ubuntu
spec:
containers:
- image: ubuntu
imagePullPolicy: IfNotPresent
name: ubuntu
command: ["/bin/sleep", "3650d"]
resources: {}
Loading

0 comments on commit 8080168

Please sign in to comment.