Commit Graph

66 Commits

Author SHA1 Message Date
Timofei Larkin
0f8a9ac9ef [installer] Update cozypkg and improve migration 20
This patch makes sure that migration #20 really uses the very latest
chart versions by forcing a reconcile with cozypkg, instead of
annotating the underlying HelmRelease.

```release-note
[installer] Update cozypkg in installer and use it to bulletproof the
20th migration script by reconciling the HelmReleases with the
--with-source flag.
```

Signed-off-by: Timofei Larkin <lllamnyp@gmail.com>
2025-09-25 12:03:22 +03:00
Andrei Kvapil
23e59ea654 New dashboard based on OpenAPI schema (#1269)
A new dashboard based on https://github.com/PRO-Robotech/openapi-ui
project

<img width="1720" height="1373" alt="Screenshot 2025-08-01 at 09-01-00
OpenAPI UI"
src="https://github.com/user-attachments/assets/7ae04789-24ec-4e4b-830b-6f16e96513eb"
/>
<img width="1720" height="1373" alt="Screenshot 2025-08-01 at 09-01-14
OpenAPI UI"
src="https://github.com/user-attachments/assets/ca5aa85d-43f0-4b5b-b87a-3bc237834f10"
/>
<img width="1720" height="1373" alt="Screenshot 2025-08-01 at 09-02-05
OpenAPI UI"
src="https://github.com/user-attachments/assets/ebee7bfa-c3ac-4fe6-b5e1-43e9e7042c6a"
/>

<!-- 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.
-->

<!--  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
[cozystack-api] Implement TenantNamespace, TenantModules, TenantSecret and TenantSecretsTable resources
[cozystack-controller] Introduce new dashboard-controller
[dashboard] Introduce new dashboard based on openapi-ui
```

Signed-off-by: Timofei Larkin <lllamnyp@gmail.com>
2025-09-25 00:07:07 +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
Andrei Kvapil
b93fe65992 [seaweedfs] fix seaweedfs migration
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2025-09-17 22:58:43 +02:00
Andrei Kvapil
17eb1e0ba3 [seaweedfs] Remove VerticalPodAutoscaler
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2025-09-15 20:54:51 +02:00
Andrei Kvapil
bb1e8805dc [seaweedfs] Refactor config; add resources
Co-authored-by: kklinch0 <kklinch0@gmail.com>
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2025-09-15 16:45:40 +02:00
Andrei Kvapil
9f2b98d364 [dx] Remove BUILDER and PLATFORM autodetection logic
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2025-09-05 11:48:19 +02:00
Andrei Kvapil
8fbebd4e47 [virtual-machine] fix versions migration
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2025-09-02 13:30:40 +02: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
Andrei Kvapil
8704767ac5 [dx] Allow to not specify BUILDER for makefile if PLATFORM specified
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2025-07-30 16:46:07 +02:00
Andrei Kvapil
02436f312f [kubernetes] Add dependency for snapshot CRD and migration to latest version
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2025-07-24 20:27:26 +02:00
Timofei Larkin
657662461f [ci] Use OCIR for non-release PRs
Changing the container registry from GHCR to OCIR will help with more
flexibe image retention policies and removes the restrictions on the
GitHub token when contributors submit PRs from forks. Release PRs remain
on GHCR, as before.

Signed-off-by: Timofei Larkin <lllamnyp@gmail.com>
2025-07-21 12:53:13 +03:00
Andrei Kvapil
036fa6f888 [hack] Add migration script for fixing nested resource maps
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2025-07-02 06:15:04 +03:00
Andrei Kvapil
3f6b6798f4 [kubernetes] Fixes for resources and migration to v0.32.4
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2025-06-17 01:34:54 +02:00
Andrei Kvapil
c2e8fba483 [cluster-api] Add missing migration for capi-providers
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2025-06-17 01:33:58 +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
Andrei Kvapil
908c75927e [platform] Use cozypkg instead of helm
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2025-06-13 19:02:15 +02:00
kklinch0
f10f8455fc (k8s) configure containerd for client k8s cluster 2025-06-04 10:40:10 +03:00
Andrei Kvapil
e9c463c867 [platform] Add migration for expose-* options
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2025-05-15 13:45:19 +02:00
Timofei Larkin
d002879b0b Downgrade CAPI operator
Signed-off-by: Timofei Larkin <lllamnyp@gmail.com>
2025-05-14 15:16:14 +03:00
Ubuntu
2349ff61c1 scripts/common-envs.mk: add PLATFORM calculation with json parsing
Signed-off-by: nbykov0 <166552198+nbykov0@users.noreply.github.com>
2025-05-08 19:04:48 +03:00
nbykov0
bbb93c647d scripts/common-envs.mk: commit suggestions after a review
Signed-off-by: nbykov0 <166552198+nbykov0@users.noreply.github.com>
2025-05-08 19:04:48 +03:00
nbykov0
951ba75d93 scripts/common-envs.mk: add --bootsrap flag to inspects
Signed-off-by: nbykov0 <166552198+nbykov0@users.noreply.github.com>
2025-05-08 19:04:48 +03:00
nbykov0
57fefde732 scrips/common-envs.mk: add BUILDER and PLATFORM calculation
Signed-off-by: nbykov0 <166552198+nbykov0@users.noreply.github.com>
2025-05-08 19:04:48 +03:00
nbykov0
6ad30915eb Add PLATFORM make variable; calculate it if undefined
Signed-off-by: nbykov0 <166552198+nbykov0@users.noreply.github.com>
2025-05-08 19:04:48 +03:00
Andrei Kvapil
79b5c6b5af [platform] Use devel versions notation for HelmCharts
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2025-04-25 12:13:40 +02:00
kklinch0
719fdd29cc [platform]: fix migrations
Signed-off-by: kklinch0 <kklinch0@gmail.com>
2025-04-22 17:40:59 +03:00
Andrei Kvapil
172e660cd1 [dx] automatically detect version for migrations in installer.sh
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2025-04-22 12:46:54 +02:00
Andrei Kvapil
14262cdd2a [platform]: add migration for kube-rbac-proxy daemonset (#830)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **Chores**
- Introduced a migration script to update monitoring resources, ensuring
refreshed configurations and pod restarts for improved system stability.
	- Updated installer version tracking to support the latest migration.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-04-22 12:44:56 +02:00
kklinch0
fde6e9cc73 [platform]: add migration for kube-rbac-proxy daemonset
Signed-off-by: kklinch0 <kklinch0@gmail.com>
2025-04-22 13:05:48 +03:00
kklinch0
eeaa1b4517 [platform]: add migration for kube-rbac-proxy daemonset
Signed-off-by: kklinch0 <kklinch0@gmail.com>
2025-04-22 12:38:49 +03:00
kklinch0
f90fc6f681 [platform] fix deleting bundles
Signed-off-by: kklinch0 <kklinch0@gmail.com>
2025-04-14 13:22:33 +03:00
Andrei Kvapil
3d962685ce Move project from aenix-io to cozystack repository
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2025-03-10 21:16:58 +01:00
xy2
439381e474 Allow lookup function in 'make diff'. (#647)
Many applications require the lookup function on the live server. Allow
its usage as well as in `make show`.

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

## Summary by CodeRabbit

- **Chores**
- Updated the release diff operation to simulate the upgrade process on
the server side, ensuring a safer preview without applying changes.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-02-25 09:54:18 +01:00
Timofei Larkin
392cd862e9 Update scripts/migrations/9
Co-authored-by: Andrei Kvapil <kvapss@gmail.com>
2025-02-25 10:38:17 +03:00
Timofei Larkin
b32106484f New schema version 10
BREAKING: all kuberneteses will be upgraded to chart version 0.15.1
2025-02-24 16:33:21 +03:00
Andrei Kvapil
95e39c951a Prepare release v0.20.0 (#522)
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>

Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2024-12-09 18:42:41 +01:00
klinch0
647a5577f1 add keycloak (#475)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

## Release Notes

- **New Features**
- Integrated Keycloak service into deployment configurations across
multiple files, enhancing user authentication capabilities.
- Introduced a new Helm chart for Keycloak, facilitating easier
deployment and management.
- Added Kubernetes Ingress and Service resources for Keycloak to manage
external access and internal service routing.
- Configured a PostgreSQL cluster specifically for Keycloak, ensuring
data persistence.

- **Bug Fixes**
- Updated versioning in the installer script to ensure compatibility
with the latest configurations.

- **Documentation**
- Added detailed configuration options for Keycloak deployment,
including resource limits and ingress settings.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-11-21 01:18:19 +01:00
Andrei Kvapil
bfbde07c55 Prepare release v0.18.0 (#462)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

## Release Notes

- **New Features**
	- Expanded build process to include the `cozystack-api` component.
- Updated image versions for `cozystack`, `darkhttpd`, and other
components to improve performance and stability.

- **Bug Fixes**
- Updated image digests for various components, ensuring the latest
updates and security patches are applied.

- **Documentation**
- Incremented version numbers across multiple configuration files for
clarity and consistency.

- **Chores**
- Updated various package versions in the version map for better
dependency management.

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

Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2024-11-06 09:26:26 +01:00
klinch0
3c27a1e9bf add metrics agents (#461)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **New Features**
- Introduced new HelmRelease configurations for cert-manager, monitoring
agents, and Victoria Metrics Operator in Kubernetes.
- Added resource specifications for `vmselect` in the VMCluster
configuration.
- Enhanced resource management for `vmselect` with defined limits and
requests for memory and CPU.

- **Bug Fixes**
	- Adjusted resource limits for Redis failover memory allocation.

- **Documentation**
- Updated README and release notes for various components, enhancing
clarity and usability.

- **Chores**
- Updated image versions across multiple components for consistency and
performance improvements.
- Modified migration scripts to facilitate transitions and manage
resources effectively.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Andrei Kvapil <kvapss@gmail.com>
2024-11-04 19:01:33 +01:00
klinch0
e41b5249d2 fix logos names (#459)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **New Features**
- Updated the application icon for the `vm-instance` application to
enhance visual representation.
  
- **Bug Fixes**
- Improved the execution of migration scripts by ensuring they have the
correct permissions before running.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-11-04 17:34:40 +01:00
klinch0
0ae7db654c add migration for dv (#455)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **New Features**
- Updated versioning logic to support migration from version 5 to
version 6.
- Introduced a migration script for managing Persistent Volume Claims
(PVCs) and updating configurations.

- **Bug Fixes**
- Ensured error handling and waiting mechanisms for Kubernetes resources
are preserved during migrations.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-10-24 14:44:19 +02:00
klinch0
f3b9843553 fix version if work in fort (#427)
if i work in fork, i see error:

```
klin@asus:~/gumilev/cozystack/packages/core/installer$ make image-cozystack REGISTRY=kklinch0
make -C ../../.. repos
make[1]: Entering directory '/home/klin/gumilev/cozystack'
rm -rf _out
make -C packages/apps check-version-map
make[2]: Entering directory '/home/klin/gumilev/cozystack/packages/apps'
find . -maxdepth 2 -name Chart.yaml  | awk -F/ '{print $2}' | while read i; do sed -i "s/^name: .*/name: $i/" "$i/Chart.yaml"; done
../../hack/gen_versions_map.sh
git diff --exit-code -- versions_map
make[2]: Leaving directory '/home/klin/gumilev/cozystack/packages/apps'
make -C packages/extra check-version-map
make[2]: Entering directory '/home/klin/gumilev/cozystack/packages/extra'
find . -maxdepth 2 -name Chart.yaml | awk -F/ '{print $2}' | while read i; do sed -i "s/^name: .*/name: $i/" "$i/Chart.yaml"; done
../../hack/gen_versions_map.sh
git diff --exit-code -- versions_map
make[2]: Leaving directory '/home/klin/gumilev/cozystack/packages/extra'
make -C packages/system repo
make[2]: Entering directory '/home/klin/gumilev/cozystack/packages/system'
fatal: No names found, cannot describe anything.
rm -rf "../../_out/repos/system"
mkdir -p "../../_out/repos/system"
helm package -d "../../_out/repos/system" $(find . -mindepth 2 -maxdepth 2 -name Chart.yaml | awk 'sub("/Chart.yaml", "")') --version 
WARNING: Kubernetes configuration file is group-readable. This is insecure. Location: /home/klin/.kube/config
WARNING: Kubernetes configuration file is world-readable. This is insecure. Location: /home/klin/.kube/config
Error: flag needs an argument: --version
make[2]: *** [Makefile:8: repo] Error 1
make[2]: Leaving directory '/home/klin/gumilev/cozystack/packages/system'
make[1]: *** [Makefile:26: repos] Error 2
make[1]: Leaving directory '/home/klin/gumilev/cozystack'
make: *** [Makefile:26: image-cozystack] Error 
```

so as not to cause unnecessary difficulties when trying to find the
problem, I suggest this crutch


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

## Summary by CodeRabbit

- **New Features**
- Enhanced script functionality to automatically retrieve the latest
version tag when not defined.
  
- **Bug Fixes**
- Improved handling of the `VERSION` variable to ensure it is populated
correctly.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-10-18 09:39:12 +02:00
Andrei Kvapil
1a4732859e Unsuspend all cozystack charts on start (#429)
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>

Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2024-10-16 18:31:24 +02:00
Andrei Kvapil
005821476c Introduce valuesFiles for various Cilium configurations (#322)
This PR introduces different values files for `cozy-cilium` chart, and
`valuesFiles` for fluxcd.

This might be useful in cases where same chart reused for multiple
configurations

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

## Summary by CodeRabbit

- **New Features**
- Introduced multiple values files for enhanced configuration management
in Cilium deployments.
- Added new YAML configurations for Cilium, allowing for tailored
networking settings in Kubernetes.

- **Bug Fixes**
- Removed deprecated configuration parameters to simplify deployment and
management of Cilium.

- **Documentation**
- Updated Helm templates to support conditional inclusion of values
files, improving flexibility in chart rendering.

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

Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2024-08-30 17:27:06 +02:00
Andrei Kvapil
b3d4c9c6a2 fix CSI label for tenant Kubernetes clusters (#291) 2024-08-19 10:12:12 +02:00
Andrei Kvapil
a120ce726e DX: Use generic Makefile for packages (#288)
This change is aimed at improving the development experience.

- The option `make delete` has been added.
- Added check for `NAME` and `NAMESPACE` variables
- Now, any package (not just system ones) can include options such as
make show, make diff, make apply.
- Applications from packages/extra require explicit specification of the
`NAMESPACE`.
- Applications from packages/apps require explicit specification of both
`NAME` and `NAMESPACE`.

Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2024-08-16 10:26:13 +02:00
Andrei Kvapil
7c77a6594a Unsuspend system helmreleases on cozystack restart (#219)
Developers ofthen forget to unsuspend helm releases after the local
development (I do!)
This change make ensure that all system helm charts are getting
reconciled by flux after cozystack container restart

Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2024-07-18 20:55:24 +03:00
Andrei Kvapil
dfbc210bbd hotfix: handle missing flux-operator release during upgrade (#198)
image to test:

```
ghcr.io/aenix-io/cozystack/cozystack:v0.8.0@sha256:48e9f676f4eca5f7036648a56767c31beb0aca8fdc6d6798bd65de74886ed1ef
```


this PR should fix a problem of upgrading from older cozystack version

```
make: Leaving directory '/cozystack/packages/core/platform'
deployment.apps/source-controller condition met
deployment.apps/helm-controller condition met
Error from server (NotFound): helmreleases.helm.toolkit.fluxcd.io "fluxcd" not found
NAME                                        CREATED AT
helmreleases.helm.toolkit.fluxcd.io         2024-05-29T11:00:16Z
helmrepositories.source.toolkit.fluxcd.io   2024-05-29T11:00:17Z
make: Entering directory '/cozystack/packages/system/fluxcd-operator'
kubectl patch hr -n cozy-fluxcd fluxcd-operator -p '{"spec": {"suspend": true}}' --type=merge --field-manager=flux-client-side-apply
Error from server (NotFound): helmreleases.helm.toolkit.fluxcd.io "fluxcd-operator" not found
make: *** [../../../scripts/package-system.mk:20: suspend] Error 1
make: Leaving directory '/cozystack/packages/system/fluxcd-operator'
time="2024-07-04T12:50:05Z" level=fatal msg="failed to run" err="exit status 2"
```
2024-07-04 16:18:02 +03:00
Kingdon Barrett
07384c40f8 Tenant nginx ingress (fixes) (#191)
I am testing install with this PR #183 and I had some issues, these
should help

---------

Signed-off-by: Kingdon Barrett <kingdon+github@tuesdaystudios.com>
2024-06-28 09:02:41 +02:00