74 Commits

Author SHA1 Message Date
Timofei Larkin
7ddd9cf4a8 [rbac] Fix permissions for high-privilege users
## What this PR does

This patch grants "admin" permissions to super-admins, "use" permissions
to admins and super-admins, "view" permissions to "use"-privileged
users, admins, and super-admins. Previously lower-privileged roles were
not assigned to higher-privileged users, so a viewer could excercise
their basic read-only permissions which were not available to
high-privilege users. This patch corrects the template function used to
generate subjects in rolebindings, fixing the issue.

### Release note

```release-note
[rbac] Fix issue of privileged users not having low-privilege read-only
permissions.
```

Signed-off-by: Timofei Larkin <lllamnyp@gmail.com>
2025-11-12 14:09:40 +03:00
Andrei Kvapil
2f0657f8ba [virtual-machine] Revert per-vm network policies
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2025-11-07 11:36:59 +01:00
Andrei Kvapil
b45f4a6545 [dashboard] sync with upstream & enhancements
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2025-11-05 18:22:22 +01:00
Andrei Kvapil
93a9241899 [tenant] Allow listing workloads
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2025-11-03 11:56:00 +01:00
nbykov0
023276ebab [apps] tenant: add vpcs to tenant roles
Signed-off-by: nbykov0 <166552198+nbykov0@users.noreply.github.com>
2025-10-31 17:48:36 +03:00
Andrei Kvapil
9632772337 [dx] JSDoc compatible syntax for values.yaml
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2025-10-29 08:57:26 +05:00
Timofei Larkin
45036ff249 [oidc] Check APIVersions before deploying
When enabling OIDC, the Tenant applications may try to deploy
KeycloakRealmGroups before the Keycloak operator is live. This may
lead to a race where neither HelmRelease is able to progress. This patch
addresses this.

```release-note
[oidc] Do not deploy KeycloakRealmGroup resources as part of the Tenant
application if the v1.edp.epam.com API is not yet available.
```

Signed-off-by: Timofei Larkin <lllamnyp@gmail.com>
2025-10-08 20:37:21 +03:00
kklinch0
65bee1a8dc feature/make info app unconditionally
Signed-off-by: kklinch0 <kklinch0@gmail.com>
2025-09-30 00:40:28 +03:00
Andrei Kvapil
e5c1cf97bd [cozystack-api] Specify tenantmodules labels
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2025-09-25 16:37:19 +02: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
Andrei Kvapil
9f9d8f8530 Allign timeouts for HelmReleases
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2025-09-24 16:54:17 +02:00
Andrei Kvapil
f871fbdb1e Remove versions_map logic
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2025-09-24 12:32:37 +02: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
kklinch0
1243a960e3 feature make force upgrade for ingress controller chart
Signed-off-by: kklinch0 <kklinch0@gmail.com>
2025-09-10 09:34:37 +03:00
IvanHunters
3e03b1bd86 add resource quota for testing ns
Signed-off-by: IvanHunters <xorokhotnikov@gmail.com>
2025-09-09 17:42:52 +03:00
Andrei Kvapil
c4e048b315 fix race conditions for seaweedfs and fix tests preparing (#1371)
<!-- Thank you for making a contribution! Here are some tips for you:
- Start the PR title with the [label] of Cozystack component:
- For system components: [platform], [system], [linstor], [cilium],
[kube-ovn], [dashboard], [cluster-api], etc.
- For managed apps: [apps], [tenant], [kubernetes], [postgres],
[virtual-machine] etc.
- For development and maintenance: [tests], [ci], [docs], [maintenance].
- If it's a work in progress, consider creating this PR as a draft.
- Don't hesistate to ask for opinion and review in the community chats,
even if it's still a draft.
- Add the label `backport` if it's a bugfix that needs to be backported
to a previous version.
-->

## What this PR does


### Release note

<!--  Write a release note:
- Explain what has changed internally and for users.
- Start with the same [label] as in the PR title
- Follow the guidelines at
https://github.com/kubernetes/community/blob/master/contributors/guide/release-notes.md.
-->

```release-note
fix race conditions for seaweedfs and fix tests preparing
```

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

* Chores
* Increased deployment timeouts to 10 minutes and set install/upgrade
remediation to unlimited retries for SeaweedFS, ingress, and monitoring
components to improve deployment resilience.
* Tests
* Extended end-to-end readiness waits for alerting components from 5 to
15 minutes for more stable test runs.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-09-01 19:46:46 +02:00
IvanHunters
8e906be9df fix race conditions for seaweedfs and fix tests preparing
Signed-off-by: IvanHunters <xorokhotnikov@gmail.com>
2025-09-01 16:32:49 +03:00
Andrei Kvapil
a4aeeca2d3 [virtual-machine] Use external IP for egress traffic for PortList method too
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2025-08-29 19:49:45 +02:00
Nick Volynkin
e3a4e284de [apps,extra] Update all app versions after updating OpenAPI schemas
Signed-off-by: Nick Volynkin <nick.volynkin@gmail.com>
2025-08-18 15:55:01 +03:00
Andrei Kvapil
5359c6d991 Update cozyvalues-gen
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2025-08-08 00:26:51 +02:00
Nick Volynkin
58def95f67 Use cozyvalues-gen with packages/apps/tenant (#1314)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **Documentation**
* All application parameter documentation was enhanced with explicit
type annotations and structured field descriptions for improved clarity.
* README files now include detailed parameter tables with type columns
and refined default values.
* Helm values.yaml files feature consistent type annotations and
hierarchical field documentation.

* **Schema Enhancements**
* JSON schemas for Postgres, Tenant, Virtual Machine, and Monitoring
apps were comprehensively restructured with explicit types, defaults,
validation patterns, and richer nested configuration options.

* **Chores**
* Switched documentation and schema generation tools to a unified
command (`cozyvalues-gen`) across all relevant Makefiles and CI
workflows for consistency and simplification.

* **Bug Fixes**
* Updated resource specifications in virtual machine tests for improved
accuracy.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-08-07 15:05:52 +05:00
Nick Volynkin
b26dc63b01 [apps] Use new OpenAPI schema and README generator for tenants
Signed-off-by: Nick Volynkin <nick.volynkin@gmail.com>
2025-08-07 11:40:22 +03:00
IvanHunters
1c2cc0fa28 [monitoring] more retries
Signed-off-by: IvanHunters <xorokhotnikov@gmail.com>
2025-08-01 15:54:09 +03:00
kklinch0
6598213b58 fix net pod policy
Signed-off-by: kklinch0 <kklinch0@gmail.com>
2025-07-24 17:28:10 +03:00
Andrei Kvapil
a010fde4b0 Merge branch 'main' into make-extra-apps-deletable
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2025-07-19 03:42:55 +02:00
Andrei Kvapil
379e0da6d2 Remove default values
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2025-07-19 03:41:56 +02:00
Andrei Kvapil
72e7b5e0b5 Get rid of bitnami's readme-generator
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2025-07-18 00:40:31 +02:00
kklinch0
1faf40cd81 [oidc] make keycloak deletable
Signed-off-by: kklinch0 <kklinch0@gmail.com>
2025-07-10 20:10:54 +03:00
kklinch0
dd16b8f27f vm add svc to dashboard
Signed-off-by: kklinch0 <kklinch0@gmail.com>
2025-07-05 12:43:06 +03:00
Andrei Kvapil
d5521df9bd [tenant] Respect cpu-allocation-ratio in resourceQuotas
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2025-07-02 15:14:56 +03: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
Timofei Larkin
028f2e4e8d Add helper function to generate subjects
Signed-off-by: Timofei Larkin <lllamnyp@gmail.com>
2025-06-16 19:19:57 +03:00
kklinch0
f1b66c80f6 bump tenant version
Signed-off-by: kklinch0 <kklinch0@gmail.com>
2025-06-05 15:40:45 +03:00
mattia
520fbfb2e4 Add RBAC rules to allow portforward in kubevirt for SSH via virtctl
Signed-off-by: mattia <mattia@hidora.io>
2025-06-05 09:38:40 +02:00
Nick Volynkin
119d582379 [docs] Review the Tenant app documentation
* Brush up some formatting
* Explain the relations of nested tenants in more detail

Signed-off-by: Nick Volynkin <nick.volynkin@gmail.com>
2025-05-23 14:50:24 +03:00
Nick Volynkin
451267310b [docs] Tenants cannot have dashes in the names
Gave examples of tenant naming.

Part of cozystack/cozystack#971

Signed-off-by: Nick Volynkin <nick.volynkin@gmail.com>
2025-05-23 14:50:23 +03:00
Andrei Kvapil
c22603bf7e [tenant] Fix networkpolicy for accessing externalIPs from the cluster (#854)
This PR fixes an issue with accessing external IPs of cluster from
cluster itself

```
Policy verdict log: flow 0x6c9bf32e local EP ID 1155, remote ID remote-node, proto 6, ingress, action deny, auth: disabled, match none, 172.27.88.13:46124 -> 10.244.4.174:30274 tcp SYN
xx drop (Policy denied) flow 0x6c9bf32e to endpoint 1155, ifindex 247, file bpf_lxc.c:2181, , identity remote-node->56986: 172.27.88.13:46124 -> 10.244.4.174:30274 tcp SYN
```

related doc:
https://docs.cilium.io/en/stable/security/policy/language/#entities-based


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

## Summary by CodeRabbit

- **New Features**
- Expanded network access for the tenant application to allow
connections from both external sources and within the cluster.

- **Chores**
	- Updated the tenant application to version 1.9.2.
	- Adjusted version mappings to reflect the latest release.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-04-23 14:30:55 +02:00
Andrei Kvapil
0a998c8b49 Revert "[platform] Hash tenant config and store in configmap"
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2025-04-23 13:24:14 +02:00
Andrei Kvapil
7bfad655c2 Fix: networkpolicy for tenant to access from cluster
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2025-04-23 12:18:40 +02:00
Timofei Larkin
f1624353ef Hash tenant config and store in configmap
Every tenant now creates a configmap in its __tenant__ namespace with a
sha256 of its values. Tenants (and eventually all other apps), watch the
configmap in their __release__ namespace, by referencing it in the
valuesFrom part of the HelmRelease. `tenant-root` is an exception, since
it is the only tenant where the release namespace is the same as the
tenant namespace. It references a different configmap in its valesFrom,
created and reconciled by the cozystack installer script. Part of #802.

Signed-off-by: Timofei Larkin <lllamnyp@gmail.com>
2025-04-22 18:57:18 +02:00
kklinch0
d12dd0e117 fix vm and k8s resources
Signed-off-by: kklinch0 <kklinch0@gmail.com>
2025-03-20 14:59:47 +03:00
Andrei Kvapil
3d03b22775 Prepare release v0.28.0
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2025-03-13 16:02:07 +03:00
Andrei Kvapil
99a53b8f9a Enable tenant isolation by default
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2025-03-10 21:09:23 +01:00
klinch0
e2369bae68 feature/add-quota (#644)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **New Features**
- Introduced a new configurable parameter for tenant resource quotas,
enabling flexible CPU and memory management.
	- Added a new YAML template for Kubernetes ResourceQuota configuration.
	- Updated application version to 1.8.0.
- **Documentation**
- Added documentation for the new `resourceQuotas` parameter in tenant
configuration.
- **Chores**
	- Updated versioning entries for the tenant application.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-02-25 14:53:52 +01:00
Floppy Disk
6c73e3f3ae feature/mv-kubeconfig 2025-02-20 15:23:54 +03:00
Floppy Disk
4cc48e6f34 add-workloadmonitors-roles 2025-02-13 13:33:35 +03:00
klinch0
06afcf27a3 feature/fix-k8s-config-with-OIDC (#594)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **Chores**
	- Updated tenant application version from 1.6.6 to 1.6.7
	- Updated version tracking in package management system
	- Minor configuration adjustments in kubeconfig template
- Enhanced logic for determining API server endpoint based on kubeconfig
presence
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-01-20 14:13:57 +01:00
klinch0
d4634797f3 feature/add resources to vmcluster (#556)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

## Release Notes

- **Version Updates**
  - Tenant application version bumped from 1.6.5 to 1.6.6
  - Monitoring application version updated from 1.5.3 to 1.5.4

- **Monitoring Configuration**
- Adjusted metrics storage deduplication interval: shortterm from 5
minutes to 15 seconds, longterm from 15 seconds to 5 minutes
- Updated resource configurations for VM components, including new
resource specifications for vminsert, vmselect, and vmstorage
- Increased memory limits and requests for VMAgent from 500Mi to 1024Mi
and from 200Mi to 768Mi, respectively

- **Performance Improvements**
  - Enhanced resource allocation for monitoring services
  - More flexible configuration options for metrics storage
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-01-09 13:18:46 +01:00
Andrei Kvapil
f1e11451fa Fix tenant permissions for oidc disabled cluster (#549) 2024-12-30 09:46:08 +01:00
Andrei Kvapil
3c9e50a4df Update dashboard to use Cozystack API (#539)
<img width="1675" alt="Screenshot 2024-12-23 at 13 40 30"
src="https://github.com/user-attachments/assets/cc123697-4efd-4a4f-909c-793cec8d91bd"
/>
<img width="1673" alt="Screenshot 2024-12-23 at 13 40 45"
src="https://github.com/user-attachments/assets/3be63e8d-9ee6-487d-90d0-3583dc968dfc"
/>


Signed-off-by: Andrei Kvapil <kvapss@gmail.com>


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

- **New Features**
- Introduced a new `pluginConfig` section in the Kubeapps dashboard
configuration for managing a broader range of applications.
- **Bug Fixes**
- Enhanced URL generation logic to ensure proper encoding of package
identifiers.
- **Chores**
- Updated image digests in the configuration for both the dashboard and
kubeappsapis sections.
	- Removed unnecessary patch application steps from the build process.
	- Upgraded the Go version used for building the application.
- Updated the application version for the tenant package from `1.6.3` to
`1.6.4`.
	- Added a new version `1.6.4 HEAD` for the tenant package.
- Adjusted RBAC configuration to streamline permissions and enhance
group-based access management.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
Co-authored-by: klinch0 <68821526+klinch0@users.noreply.github.com>
2024-12-27 11:22:25 +01:00