Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New command for provisioning DB namespaces #185

Merged
merged 60 commits into from
Jan 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
1fe11bc
New command sfor provisioning db namespaces
rasika-chivate Dec 5, 2024
c583f23
Update mkdocs-base.yml
rasika-chivate Dec 5, 2024
c246de2
Update commands.md
rasika-chivate Dec 5, 2024
320649b
updated the file name and config file
rasika-chivate Dec 5, 2024
19da4b5
Update mkdocs-base.yml
rasika-chivate Dec 5, 2024
5104e8b
Update mkdocs-base.yml
rasika-chivate Dec 5, 2024
e837ef4
Update mkdocs-base.yml
rasika-chivate Dec 5, 2024
5d9e8b3
Update rbac.md
rasika-chivate Dec 5, 2024
ff3c863
Update manage_namespaces.md
rasika-chivate Dec 11, 2024
de1f889
Update mkdocs-base.yml
rasika-chivate Dec 11, 2024
cc20d27
Update manage_namespaces.md
rasika-chivate Dec 11, 2024
ae1bb31
Update manage_namespaces.md
rasika-chivate Dec 11, 2024
958153e
Update manage_namespaces.md
rasika-chivate Dec 11, 2024
50229e0
fixed typo
rasika-chivate Dec 11, 2024
39b4a8f
Update manage_namespaces.md
rasika-chivate Dec 11, 2024
c86cd59
Update manage_namespaces.md
rasika-chivate Dec 11, 2024
3a57a24
Update manage_namespaces.md
rasika-chivate Dec 12, 2024
3e3a9a9
added example for add command
rasika-chivate Dec 12, 2024
04f1392
format fix
rasika-chivate Dec 12, 2024
5a37960
Update manage_namespaces.md
rasika-chivate Dec 12, 2024
b95fd11
Update manage_namespaces.md
rasika-chivate Dec 12, 2024
6ebdee8
Update manage_namespaces.md
rasika-chivate Dec 12, 2024
5eac9bd
Update manage_namespaces.md
rasika-chivate Dec 12, 2024
be64416
Update manage_namespaces.md
rasika-chivate Dec 12, 2024
8332439
Update manage_namespaces.md
rasika-chivate Dec 12, 2024
af9ba3f
Update manage_namespaces.md
rasika-chivate Dec 12, 2024
b341175
Update manage_namespaces.md
rasika-chivate Dec 12, 2024
38d7bb2
Update manage_namespaces.md
rasika-chivate Dec 12, 2024
00a6690
Update manage_namespaces.md
rasika-chivate Dec 12, 2024
3861279
Update manage_namespaces.md
rasika-chivate Dec 12, 2024
1e77358
Update multi-namespaces.md
rasika-chivate Dec 12, 2024
4e356b6
Update everest_multinamespaces.png
rasika-chivate Dec 12, 2024
d7d85f5
Update multi-namespaces.md
rasika-chivate Dec 12, 2024
3df9837
format fix
rasika-chivate Dec 12, 2024
f5e830d
fix formatting
rasika-chivate Dec 12, 2024
95e35a8
Update multi-namespaces.md
rasika-chivate Dec 12, 2024
ddc09f4
updated the link to namespace management section
rasika-chivate Dec 12, 2024
ed460a0
Update multi-namespaces.md
rasika-chivate Dec 12, 2024
ef1334f
Update multi-namespaces.md
rasika-chivate Dec 12, 2024
e3c81d4
Update multi-namespaces.md
rasika-chivate Dec 12, 2024
adc561b
Update multi-namespaces.md
rasika-chivate Dec 12, 2024
2b9ef26
Update multi-namespaces.md
rasika-chivate Dec 12, 2024
b87a277
Update docs/administer/manage_namespaces.md
rasika-chivate Dec 16, 2024
965af50
Update docs/administer/manage_namespaces.md
rasika-chivate Dec 16, 2024
2f6d8a7
Update docs/administer/manage_namespaces.md
rasika-chivate Dec 16, 2024
8d31875
Update docs/administer/manage_namespaces.md
rasika-chivate Dec 16, 2024
72af278
Update docs/administer/manage_namespaces.md
rasika-chivate Dec 16, 2024
e81a7d3
Update docs/administer/manage_namespaces.md
rasika-chivate Dec 16, 2024
b9eea81
Update docs/administer/manage_namespaces.md
rasika-chivate Dec 16, 2024
022180d
Update docs/administer/manage_namespaces.md
rasika-chivate Dec 16, 2024
ebb6316
swich the order of examples
rasika-chivate Dec 17, 2024
f14e3f0
Update manage_namespaces.md
rasika-chivate Dec 17, 2024
ee57841
Update manage_namespaces.md
rasika-chivate Dec 17, 2024
e7a2aaa
Update docs/administer/manage_namespaces.md
rasika-chivate Dec 17, 2024
88becb3
Update manage_namespaces.md
rasika-chivate Dec 17, 2024
59646a4
Update manage_namespaces.md
rasika-chivate Dec 17, 2024
5e30164
Update docs/administer/manage_namespaces.md
rasika-chivate Dec 18, 2024
b0fc3ec
Update docs/administer/manage_namespaces.md
rasika-chivate Dec 18, 2024
7b52fb2
Update manage_namespaces.md
rasika-chivate Dec 20, 2024
348ffc7
Update monitor_endpoints.md
rasika-chivate Jan 6, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
86 changes: 86 additions & 0 deletions docs/administer/manage_namespaces.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
# Namespaces management

The management of namespaces plays a vital role in efficiently organizing and allocating resources within Percona Everest.

## Add new namespaces

You can run the following command for provisioning a new DB namespace:

```sh
everestctl namespaces add [NAMESPACE]
```

The command supports the following flags:

`--operator.mongodb=<bool>`

`--operator.postgresql=<bool>`

`--operator.xtradb-cluster=<bool>`

`--take-ownership` - Allows Percona Everest to manage an existing Kubernetes namespace by adding the necessary labels. Without this flag, Percona Everest will attempt to create the namespace and throw an error if it already exists. Use this flag to take over an existing namespace.

??? example "Example"
```sh
everestctl namespaces add development --operator.postgresql=false
✓ Installing namespace 'development'
```
In the above command, we did not specify the MongoDB and MySQL operators. Therefore, by default, Percona Everest assumes these operators are true and will add them.

```sh
everestctl namespaces add production

? Which operators do you want to install? MongoDB
✓ Installing namespace 'production'
```

!!! note
The `everestctl install` command allows you create database namespaces during the initial installation. However, it cannot be rerun to add more database namespaces. To create additional database namespaces after installation, use the namespaces add command.

- To provision a DB namespace after installation, use the command `everestctl namespaces add`.

- You may choose to skip the DB namespace installation in the `everestctl install` command.

## Update namespaces

!!! info "Important"
Removing operators with `update` is currently not supported.

You can run the following command to add more operators to an existing DB namespace.


```sh
everestctl namespaces update [NAMESPACE]
```

??? example "Example"
```sh
everestctl namespaces update development

? Which operators do you want to install? MongoDB
✓ Updating namespace 'development'
```


## Delete namespaces

You can run the following command for deleting namespaces:

```sh
everestctl namespaces remove [NAMESPACE]
```

- This command deletes only the specified namespace, as long as it is managed by Percona Everest.

- Setting `--keep-namespace` deletes all resources within the namespace (e.g., operators, DatabaseClusters, BackupStorages) while preserving the namespace itself. Use this option to clean up the namespace without removing it.


??? example "Example"
```sh
everestctl namespaces remove development

✓ Deleting database clusters in namespace 'development'
✓ Deleting backup storages in namespace 'development'
✓ Deleting monitoring instances in namespace 'development'
✓ Deleting namespace 'development'
```
2 changes: 1 addition & 1 deletion docs/administer/rbac.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Role Based Access Control
# Role-based access control (RBAC)

!!! warning "Disclaimer"
RBAC is currently in **Technical Preview**. Early adopters are advised to use this feature only for testing purposes and not in production environments.
Expand Down
Binary file modified docs/images/everest_multinamespaces.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 3 additions & 5 deletions docs/use/monitor_endpoints.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ To use monitoring in Percona Everest, you should have a PMM instance up and runn

For information on installing PMM, see the [documentation](https://docs.percona.com/percona-monitoring-and-management/setting-up/index.html).

## Add monitoring
## Add monitoring endpoint

To add monitoring in Percona Everest from the UI:
{.power-number}
Expand All @@ -44,8 +44,7 @@ To add monitoring in Percona Everest from the UI:
6. Click **Add**.



## Edit monitoring
## Edit monitoring endpoint

To edit a monitoring endpoint from the Percona Everest UI:
{.power-number}
Expand All @@ -65,7 +64,7 @@ To edit a monitoring endpoint from the Percona Everest UI:
4. Click **Add**.


## Delete monitoring
## Delete monitoring endpoint

To delete a monitoring endpoint from the Percona Everest UI:
{.power-number}
Expand All @@ -88,7 +87,6 @@ To delete a monitoring endpoint from the Percona Everest UI:







48 changes: 21 additions & 27 deletions docs/use/multi-namespaces.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
In Kubernetes, the concept of namespaces enables you to create isolated groups of resources within a single cluster. These namespaces provide a way to organize and manage resources without interfering with other resources within the same cluster.


!!! warning "Important"
!!! info "Important"
Resource names must be unique within a specific namespace but not across different namespaces.


Expand All @@ -15,7 +15,7 @@ For example, you can deploy different environments like production, development,

## Default namespaces in Percona Everest

!!! warning "Important"
!!! info "Important"
The following namespaces are restricted and cannot be used for deploying databases.

Percona Everest will create the following namespaces by default. You can see these default namespaces while Percona Everest is being installed.
Expand All @@ -30,41 +30,35 @@ To set up the namespaces that Percona Everest will manage and where you can depl

The following holds true for multiple namespaces:

- You can configure multiple namespaces in Percona Everest.
- You can [configure multiple namespaces](../administer/manage_namespaces.md#add-new-namespaces) in Percona Everest using the `everestctl namespaces add [NAMESPACE]` command.

- You can install different operators in various namespaces by running the install command multiple times.
- You can [install different operators](../administer/manage_namespaces.md#update-namespaces) in various namespaces using the `everestctl namespaces update [NAMESPACE]` command.

See the following example for more details:

??? info "Example: Installing various operators in different namespaces"

To install various operators in different namespaces, such as MySQL and MongoDB operator in namespaces dev and testing, and PostgreSQL operator in namespaces production and staging, run the following commands:
{.power-number}

1. `everestctl install`
??? example "Example: Configuring multiple namesapces and installing various operators within those namespaces"
To install various operators in different namespaces, such as MongoDB and MySQL operator in namespace production, and PostgreSQL operator in namespace development, run the following commands:
{.power-number}

1. `everestctl namespaces add development`

??? example "Expected output"
??? example "Expected output"
```sh
? Which operators do you want to install? PostgreSQL
✓ Installing namespace 'development'
```

```sh
? Namespaces managed by Everest [comma separated] dev,testing
? What operators do you want to install? MySQL, MongoDB
```
2. `everestctl namespaces add production`.

2. Rerun the `everestctl install` command to install the PostgreSQL operator in the production and staging namespaces.
??? example "Expected output"
```sh
? Which operators do you want to install? MySQL, MongoDB
✓ Installing namespace 'production'
```
rasika-chivate marked this conversation as resolved.
Show resolved Hide resolved


??? example "Expected output"
Go to Percona Everest UI and navigate to <i class="uil uil-cog"></i> **Settings > Namespaces**. A list of all the namespaces that you have created will appear here.

```sh
? Namespaces managed by Everest [comma separated] production,staging
? What operators do you want to install? PostgreSQL
```


Go to Percona Everest UI and navigate to <i class="uil uil-cog"></i> **Settings > Namespaces**. A list of all the namespaces that you have created will appear here.

![!image](../images/everest_multinamespaces.png)
![!image](../images/everest_multinamespaces.png)

## Deploy the database in your namespace

Expand Down
5 changes: 3 additions & 2 deletions mkdocs-base.yml
Original file line number Diff line number Diff line change
Expand Up @@ -181,8 +181,9 @@ nav:
- Administer:
- User management: administer/manage_users.md
- Single sign-on (SSO): administer/Idp_integration.md
- Access Control:
- RBAC: administer/rbac.md
- Role-based access control: administer/rbac.md
- Namespaces management: administer/manage_namespaces.md

- Use:
- Database view: use/database_view.md
- Provision a database: use/db_provision.md
Expand Down
Loading