You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/guides/pgbouncer/initialization/gitsync.md
+67-45Lines changed: 67 additions & 45 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
title: Initialize PgBouncer From Git Repository
3
3
menu:
4
4
docs_{{ .version }}:
5
-
identifier: guides-mysql-gitsync
5
+
identifier: guides-PgBouncer -gitsync
6
6
name: Git Repository
7
7
parent: pb-initialization-pgbouncer
8
8
weight: 20
@@ -15,67 +15,89 @@ section_menu_id: guides
15
15
# Initialization PgBouncer from a Git Repository
16
16
This guide demonstrates how to use KubeDB to initialize a PgBouncer database with initialization scripts (.sql, .sh, .js and/or .sql.gz) stored in a public or private Git repository.
17
17
To fetch the repository contents, KubeDB uses a sidecar container called [git-sync](https://github.com/kubernetes/git-sync).
18
-
In this example, we will initialize PgBouncer using a `.sql` script from the GitHub repository [kubedb/mysql-init-scripts](https://github.com/kubedb/mysql-init-scripts).
18
+
In this example, we will initialize PgBouncer using a `.sql` script from the GitHub repository [kubedb/PgBouncer -init-scripts](https://github.com/kubedb/PgBouncer-init-scripts).
19
19
20
20
## Before You Begin
21
21
22
22
- At first, you need to have a Kubernetes cluster, and the `kubectl` command-line tool must be configured to communicate with your cluster. If you do not already have a cluster, you can create one by using [kind](https://kind.sigs.k8s.io/docs/user/quick-start/).
23
23
24
-
- Now, install KubeDB operator in your cluster by following the steps [here](/docs/setup/README.md).
24
+
- Install `KubeDB` Provisioner and Ops-manager operator in your cluster following the steps [here](/docs/setup/README.md).
25
+
26
+
- You should be familiar with the following `KubeDB` concepts:
To keep everything isolated, we are going to use a separate namespace called `demo` throughout this tutorial.
32
+
27
33
```bash
28
34
$ kubectl create ns demo
29
35
namespace/demo created
30
36
```
31
37
38
+
> **Note:** YAML files used in this tutorial are stored in [docs/examples/pgbouncer](/docs/examples/pgbouncer) directory of [kubedb/docs](https://github.com/kubedb/docs) repository.
39
+
40
+
### Prepare Postgres
41
+
Prepare a KubeDB Postgres cluster using this [tutorial](/docs/guides/postgres/clustering/streaming_replication.md), or you can use any externally managed postgres but in that case you need to create an [appbinding](/docs/guides/pgbouncer/concepts/appbinding.md) yourself. In this tutorial we will use 3 node Postgres cluster named `ha-postgres`.
42
+
43
+
### Prepare PgBouncer
44
+
45
+
Now, we are going to deploy a `PgBouncer` with version `1.24.0`.
46
+
32
47
## From Public Git Repository
33
48
34
-
KubeDB implements a `MySQL` Custom Resource Definition (CRD) to define the specification of a PgBouncer database.
49
+
KubeDB implements a `PgBouncer ` Custom Resource Definition (CRD) to define the specification of a PgBouncer database.
35
50
To initialize the database from a public Git repository, you need to specify the required arguments for the `git-sync` sidecar container within the PgBouncer resource specification.
36
-
The following YAML manifest shows an example `MySQL` object configured with `git-sync`:
51
+
The following YAML manifest shows an example `PgBouncer ` object configured with `git-sync`:
Copy file name to clipboardExpand all lines: docs/guides/postgres/rotate-authentication/rotateauth.md
+4-3Lines changed: 4 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,7 +14,7 @@ section_menu_id: guides
14
14
**Rotate Authentication** is a feature of the KubeDB Ops-Manager that allows you to rotate a `Postgres` user's authentication credentials using a `PostgresOpsRequest`. There are two ways to perform this rotation.
15
15
16
16
1.**Operator Generated:** The KubeDB operator automatically generates a random credential, updates the existing secret with the new credential The KubeDB operator automatically generates a random credential and updates the existing secret with the new credential..
17
-
2.**User Defined:** The user can create their own credentials by defining a secret of type `kubernetes.io/basic-auth` containing the desired `username` and `password` and then reference this secret in the `PostgresOpsRequest`.
17
+
2.**User Defined:** The user can create their own credentials by defining a secret of type `kubernetes.io/basic-auth` containing the desired `password` and then reference this secret in the `PostgresOpsRequest`.
18
18
19
19
## Before You Begin
20
20
@@ -245,11 +245,12 @@ The above output shows that the password has been changed successfully. The prev
245
245
#### 2. Using user created credentials
246
246
247
247
At first, we need to create a secret with kubernetes.io/basic-auth type using custom username and password. Below is the command to create a secret with kubernetes.io/basic-auth type,
248
+
> **Note:** Can not change the username while rotating authentication. The username must be same as 'postgres' which is the current username of the database.
0 commit comments