Skip to content

Commit

Permalink
docs: add operational notes (#49)
Browse files Browse the repository at this point in the history
  • Loading branch information
evegufy authored Mar 5, 2024
1 parent 3f3a4ff commit d2d8653
Show file tree
Hide file tree
Showing 3 changed files with 62 additions and 2 deletions.
2 changes: 1 addition & 1 deletion charts/centralidp/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ keycloak:
- get
- list
postgresql:
# -- PostgreSQL chart configuration;
# -- PostgreSQL chart configuration (recommended for demonstration purposes only);
# default configurations:
# host: "centralidp-postgresql-primary",
# port: 5432;
Expand Down
2 changes: 1 addition & 1 deletion charts/sharedidp/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ keycloak:
- get
- list
postgresql:
# -- PostgreSQL chart configuration;
# -- PostgreSQL chart configuration (recommended for demonstration purposes only);
# default configurations:
# host: "sharedidp-postgresql-primary",
# port: 5432;
Expand Down
60 changes: 60 additions & 0 deletions docs/technical documentation/13. Operational Notes.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
## Operational Notes

This document contains operational notes.

### Postgres subchart for demonstration purposes only

It's not recommended to use the postgres dependency from Bitnami outside of a demonstration context.

The helm charts provide the option to connect to an external database.

### Persistent volume running out of space

It was observed that the centralIdP Keycloak can quite run easily out of space due the event_entity table logging login requests.

This was observed in the connection with the postgres dependency from Bitnami which defaults to 8Gi for the persistent volume (for reference within the helm charts this could be postgresql.primary/readReplicas.persistence.size).

> The general recommendation is to have concepts in place (database maintenance, monitoring, etc.) to prevent this from happening, which is outside of the scope of a reference implementation.

#### How to solve

Expand the persistent volume by requesting more storage within the persistent volume claim (spec.resources.requests.storage).

[OPTIONAL] In addition also the event_entity table can be cleaned up.

Useful query to get an overview on the database:

```
SELECT relname as table_name, pg_size_pretty(pg_total_relation_size(relid)) as total_size FROM pg_catalog.pg_statio_user_tables ORDER BY pg_total_relation_size(relid) DESC;
```

Statements for cleanup:

```
// adjust the 'event_time < 1690892701000' accordingly, https://www.epochconverter.com/
DELETE FROM
public.event_entity
WHERE id in
(SELECT id FROM public.event_entity
WHERE
event_time < 1690892701000
ORDER BY
event_time ASC
LIMIT
300000);
```

```
VACUUM FULL
verbose public.event_entity
```

## NOTICE

This work is licensed under the [Apache-2.0](https://www.apache.org/licenses/LICENSE-2.0).

- SPDX-License-Identifier: Apache-2.0
- SPDX-FileCopyrightText: 2024 Contributors to the Eclipse Foundation
- Source URL: https://github.com/eclipse-tractusx/portal-iam

0 comments on commit d2d8653

Please sign in to comment.