39 Commits

Author SHA1 Message Date
Timofei Larkin
c16e37e079 [controller,api] Refactor tenant resource label
This patch refactors the secret selectors to use the
`internal.cozystack.io/tenantresource` label for managing secret
visibility and removes any selectors based on it or the previous
`apps.cozystack.io/tenantresource` label, the idea being that this label
will only ever be set by the controller.

```
[controller,api] Refactor labels for the secret selector.
```

Signed-off-by: Timofei Larkin <lllamnyp@gmail.com>
2025-10-01 13:24:40 +03:00
Andrei Kvapil
0afc3c1e86 [cozystack-api] Implement TenantNamespace, TenantModules, TenantSecret and TenantSecretsTable resources
[cozystack-controller] Introduce new dashboard-controller
[dashboard] Introduce new dashboard based on openapi-ui

Co-authored-by: kklinch0 <kklinch0@gmail.com>
Signed-off-by: kklinch0 <kklinch0@gmail.com>
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2025-09-24 18:27:54 +02:00
Timofei Larkin
4620f7dfa1 [platform] Add secret selectors to CozyRDs
This patch populates existing CozystackResourceDefinitions with minimal
working examples of secret selectors to take advantage of the newest
revision of the ancestor tracking webhook.

```release-note
[platform] Specify secret selectors for existing managed apps in their
respective CozystackResourceDefinitions, which provides the last bit of
information necessary for the lineage webhook to correctly mark secrets
as user-facing or not.
```

Signed-off-by: Timofei Larkin <lllamnyp@gmail.com>
2025-09-24 12:07:21 +03:00
Timofei Larkin
7e4883dfcc [platform] Mark some secrets as non-user-facing
Some k8s secrets created when deploying managed applications are
unhelpful to the end user or are outright not meant to be shown, because
they contain internal credentials not meant to be presented to the user.
This patch adds an `apps.cozystack.io/tenantresource=false` label to
such resources which will be later used to filter out such secrets in
the web UI.

```release-note
[platform] Mark non-user-facing secrets as such to avoid clutter in the
dashboard and leaking internal credentials.
```

Signed-off-by: Timofei Larkin <lllamnyp@gmail.com>
2025-09-23 15:09:18 +03:00
Timofei Larkin
917a6f354d [platform] Autodetect RobotLB
If running in Hetzner and using Hetzner's cloud load balancers, node
ports need to be allocated for the load balancer to function correctly.
Therefore if RobotLB is enabled, we probably need to assign node ports.

Release note:
[platform] Autodetect if node ports should be assigned to load balancer
services.

Signed-off-by: Timofei Larkin <lllamnyp@gmail.com>
2025-07-24 18:55:30 +03:00
kklinch0
c5d3fe9aaa bugfix fix pg LB frontend
Signed-off-by: kklinch0 <kklinch0@gmail.com>
2025-07-16 11:56:45 +03:00
Ahmad Murzahmatov
f6eaca3843 [postgres] do not allow change postgres pwd
Signed-off-by: Ahmad Murzahmatov <gwynbleidd2106@yandex.com>
2025-07-08 08:52:29 +06:00
Timofei Larkin
bd9e283d3b [platform] Always set resources for managed apps
This patch removes the loophole to leave resource requests and limits
unspecified in managed apps. Any of cpu, memory, and ephemeral storage
are now filled in from the resource preset (default or user-specified)
if not explicitly specified in .Values.resources. "none" is no longer an
accepted value in resourcePresets and the primary resources now always
have some explicit value for proper billing and isolation.

Signed-off-by: Timofei Larkin <lllamnyp@gmail.com>
2025-07-03 17:45:32 +03:00
Andrei Kvapil
5ffe11dfc6 [postgres] add backup and restore (#1086)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **New Features**
- Introduced support for cluster restoration from backup with new
bootstrap configuration options.
- Added a ScheduledBackup resource for automated PostgreSQL backups
using a more flexible backup configuration.

- **Improvements**
- Simplified and modernized backup configuration with new parameters for
retention policy, destination path, and endpoint URL.
- Updated backup scheduling to use a 6-field cron expression for more
precise timing.
- Changed default resource preset from "nano" to "micro" for improved
performance.

- **Removals**
- Removed legacy backup scripts, Docker image, and Kubernetes CronJob
templates related to the old backup system.

- **Documentation**
- Updated documentation to reflect the new backup and bootstrap
parameters, and revised backup instructions.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-06-24 10:28:17 +02:00
Timofei Larkin
fa09845ef9 wrap cron in quotes to avoid yaml issues
Signed-off-by: Timofei Larkin <lllamnyp@gmail.com>
2025-06-23 17:59:05 +03:00
Andrei Kvapil
ba74f397f5 [postgres] Escape users and database names
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2025-06-23 15:39:09 +02:00
kklinch0
7c45335abb [postgres] add backup and restore
Signed-off-by: kklinch0 <kklinch0@gmail.com>
2025-06-23 15:38:34 +02:00
Andrei Kvapil
3b8a9f9d2c Configure all apps to use new function to generate subjects
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2025-06-16 20:32:11 +02:00
kklinch0
8e79f24c5b add rq for pg
Signed-off-by: kklinch0 <kklinch0@gmail.com>
2025-06-11 22:48:09 +03:00
Timofei Larkin
b6142cd4f5 Use library chart for resource management
Signed-off-by: Timofei Larkin <lllamnyp@gmail.com>
2025-06-04 09:05:21 +03:00
Andrei Kvapil
a887e19e6c Capture all resources by WorkloadMonitors (#1018)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **New Features**
- Introduced monitoring resources for HAProxy, NGINX, and generic HTTP
cache workloads, allowing improved workload observability.
- **Enhancements**
- Added standardized labels to MariaDB, Postgres, and Redis resources
for better integration and management within Kubernetes environments.
- Updated label selectors in Postgres resources to use standardized
Kubernetes app labels.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-06-02 09:28:30 +02:00
Timofei Larkin
0e22358b30 Capture all resources by WorkloadMonitors
Signed-off-by: Timofei Larkin <lllamnyp@gmail.com>
2025-06-02 09:44:27 +03:00
kklinch0
225d103509 [k8s] add topologySpreadConstraints for client k8s cluster
Signed-off-by: kklinch0 <kklinch0@gmail.com>
2025-05-28 23:17:00 +02:00
Timofei Larkin
db34f31175 Don't overcommit memory or throttle CPU
This patch recreates the resource presets with a non-burstable memory
allocation (request==limit) and without CPU limits. With the new presets
the difference between the larger presets became meaningless, so their
values were adjusted.

Signed-off-by: Timofei Larkin <lllamnyp@gmail.com>
2025-05-12 15:59:28 +03:00
Ian Simon
19409d801d [postgres] remove douplicated template from backup manifest
Signed-off-by: Ian Simon <cheatmaster114@gmail.com>
2025-04-24 11:29:30 +02:00
kklinch0
ea3b092128 feature/add-presets 2025-03-13 17:03:00 +03:00
kklinch0
88729e4124 rename globalAppTopologySpreadConstraints 2025-03-05 11:39:41 +03:00
kklinch0
4cce138d31 feature/add-topologyspreadconstraints-pg 2025-03-05 10:41:43 +03:00
Andrei Kvapil
107f390ae8 workloadmonitor (#563)
- upd redis
- update kubernetes app to use workloadmonitors
- upd kubernetes
- fix version


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **New Features**
- Added `WorkloadMonitor` resources for various components including
Kubernetes clusters, Redis, Sentinel, and SeaweedFS.
- Introduced monitoring capabilities for `alerta`, `alertmanager`,
`grafana`, and `vlogs` services.
- Enhanced RBAC configurations to support new monitoring resources
across multiple API groups.

- **Improvements**
	- Updated metadata and labeling for virtual machine templates.
	- Added dynamic resource naming based on release and group names.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2025-01-09 13:25:12 +01:00
klinch0
8c980c60ad add precommit and fix postgres job (#418)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

## Release Notes

- **New Features**
- Introduced a pre-commit workflow to automate checks before code
merges.
  - Added a section in the README for testing packages locally.

- **Improvements**
- Enhanced PostgreSQL initialization script for better user and role
management.
- Updated documentation for Managed PostgreSQL Service with improved
formatting and additional backup parameters.
- Integrated pre-commit hooks for maintaining code quality in YAML and
Markdown files.
- Added a new target in the installer Makefile to run pre-checks before
building images.

- **Bug Fixes**
- Adjusted formatting in various README files to ensure consistent
presentation.

- **Chores**
- Updated image reference to use the latest version in configuration
files.
  - Updated versioning for various packages in the versions map.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-10-14 18:15:41 +02:00
Andrei Kvapil
7a1b56fa78 postgres: fix setting max_connections (#382)
fix regression introduced by
https://github.com/aenix-io/cozystack/pull/376

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **New Features**
- Enhanced flexibility in PostgreSQL configuration with conditional
handling of the `max_connections` parameter.

- **Bug Fixes**
- Improved parameter assignment logic for better configuration
management.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-10-01 18:38:03 +02:00
chumkaska
7431e245b3 add postgresql.parameters.max_connections (#359)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **New Features**
- Introduced a new configuration parameter `max_connections` for
PostgreSQL, allowing users to specify the maximum number of concurrent
connections.
- Added a "Server Configuration" section in the settings for easier
management of PostgreSQL parameters.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
Co-authored-by: Andrei Gumilev <andrey.gumilev@aenix.io>
Co-authored-by: Andrei Kvapil <kvapss@gmail.com>
2024-09-26 11:41:06 +02:00
Andrei Kvapil
0d3b8fc6ff Fix FerretDB backups
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2024-09-15 06:52:21 +02:00
Andrei Kvapil
fab5940b12 Fix backups for MariaDB and Postgres
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2024-09-15 06:52:21 +02:00
Andrei Kvapil
b00621ee2a Add passwords generation to postgres (#330)
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>

Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2024-09-04 15:15:24 +02:00
Andrei Kvapil
b908400d59 fix: typo in storageClass (#310) 2024-08-30 09:42:01 +02:00
Andrei Kvapil
c07c4bbdab Introduce stroageClass option for all applications (#290)
Provide the oportunity to specify StroageClass in applications

Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2024-08-20 17:19:10 +02:00
Andrei Kvapil
c56e576906 fix network-policies (#272)
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2024-08-12 10:10:18 +02:00
Andrei Kvapil
00f7c3647b Upd dashboard and handle ResourceView (#262)
- Patch Dashboard to use specific role for resourceview
- Update kubeapps v2.11.0

partially fixes https://github.com/aenix-io/cozystack/issues/259

---------

Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2024-08-07 12:35:45 +02:00
Andrei Kvapil
ec283c33a4 postgres: automatically set schema permissions (#216)
This PR refactors postgress configuration script:
- Added event trigger on creating new schemas for automatically set
owner
- Refactored logic for fixing permissions for all objects in all schemas

Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2024-07-22 23:31:32 +02:00
Andrei Kvapil
995dea6f5c postgres: option to enable quorum-based replication
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2024-06-21 10:12:32 +02:00
Andrei Kvapil
4a97e297d4 postgres: fix users and roles (#138)
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2024-05-21 02:29:49 +02:00
Andrei Kvapil
7cd7de73ee Introduce replicas options
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2024-04-26 15:19:25 +02:00
Andrei Kvapil
f642698921 Preapare release v0.0.1
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2024-02-08 12:04:32 +01:00