Commit Graph

1320 Commits

Author SHA1 Message Date
IvanHunters
5b6ebbc796 [review] compact _versions.tpl
Signed-off-by: IvanHunters <xorokhotnikov@gmail.com>
2025-07-16 17:41:15 +03:00
IvanHunters
7b87d555e4 [review] disable caching and remove reusing root context
Signed-off-by: IvanHunters <xorokhotnikov@gmail.com>
2025-07-16 17:36:42 +03:00
IvanHunters
168a9ae7f4 [conflicts] merge from fixed conflicts branch
Signed-off-by: IvanHunters <xorokhotnikov@gmail.com>
2025-07-15 22:36:39 +03:00
Timofei Larkin
19b79b7ca4 Merge branch 'main' into feat/select-k8s-fix-conflict
Signed-off-by: Timofei Larkin <lllamnyp@gmail.com>
2025-07-15 15:48:56 +04:00
Timofei Larkin
0de9a0a262 Fixing versions_map
Signed-off-by: Timofei Larkin <lllamnyp@gmail.com>
2025-07-15 14:43:19 +03:00
IvanHunters
edc9995832 [tests] fix versions.yaml path
Signed-off-by: IvanHunters <xorokhotnikov@gmail.com>
2025-07-15 14:40:23 +03:00
IvanHunters
6023dffd6d [tests] fix versions.yaml path
Signed-off-by: IvanHunters <xorokhotnikov@gmail.com>
2025-07-15 13:06:48 +03:00
IvanHunters
6fdde29723 Merge branch 'main' into feat/selectable-k8s-version
Signed-off-by: IvanHunters <49371933+IvanHunters@users.noreply.github.com>
2025-07-15 12:56:32 +03:00
IvanHunters
d63aac727c [kubernetes] refactoring checking k8s version for nitpick comment by rabbit
Signed-off-by: IvanHunters <xorokhotnikov@gmail.com>
2025-07-15 12:48:10 +03:00
IvanHunters
7b9a19c94b [kubernetes] refactoring doubles for difference k8s versions
Signed-off-by: IvanHunters <xorokhotnikov@gmail.com>
2025-07-15 12:48:10 +03:00
IvanHunters
f78ab1c867 [kubernetes] add caching for loading kubernetes versions file
Signed-off-by: IvanHunters <xorokhotnikov@gmail.com>
2025-07-15 12:48:10 +03:00
IvanHunters
7c918125e5 [kubernetes] add check for deployed Kubernetes server version using kubectl
Signed-off-by: IvanHunters <xorokhotnikov@gmail.com>
2025-07-15 12:48:10 +03:00
IvanHunters
d3f1dca1ad generate kubeversions from versions.yaml
Signed-off-by: IvanHunters <xorokhotnikov@gmail.com>
2025-07-15 12:48:10 +03:00
IvanHunters
259a2f5cab [kubernetes] modify tests for user-selectable cluster version case
Signed-off-by: IvanHunters <xorokhotnikov@gmail.com>
2025-07-15 12:48:10 +03:00
Timofei Larkin
c7376ef3c9 [kubernetes] User-selectable cluster version
This patch adds a new version field to the kubernetes chart, letting
end-users specify the version of kubernetes they want to deploy.

[kubernetes] Let users specify desired version of tenant k8s cluster.

Signed-off-by: Timofei Larkin <lllamnyp@gmail.com>
Signed-off-by: IvanHunters <xorokhotnikov@gmail.com>
2025-07-15 12:48:10 +03:00
klinch0
7a619d8b04 bugfix fix nats (#1195)
<!-- 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 nats helm chart
```

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

## Summary by CodeRabbit

* **Chores**
  * Updated the NATS application chart version to 0.8.1.
  * Adjusted version mapping entries for the NATS package.

* **Refactor**
* Reorganized the NATS configuration by moving the routeURLs setting
under the cluster section for improved clarity.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-07-15 12:41:23 +03:00
Nick Volynkin
c58aa798a4 [apps] Remove preset 'none' from app charts and README (#1196)
Preset 'none' is in fact disallowed since cozystack/cozystack#1156

Signed-off-by: Nick Volynkin <nick.volynkin@gmail.com>


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

* **Documentation**
* Updated documentation across all supported applications to remove
"none" from the list of allowed values for the `resourcesPreset`
parameter. Only sizing presets from "nano" to "2xlarge" are now listed
as valid options.
* **Chores**
  * Incremented chart versions for all affected applications.
* Updated version mapping to reference specific commits for released
versions.
* Removed "none" from allowed enum values for `resourcesPreset` in JSON
schemas across all applications.
* Refactored Makefiles to centralize and update resource preset enums,
removing "none" from allowed values.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-07-15 09:05:59 +03:00
Andrei Kvapil
378e6e018e [seaweedfs] Fix drift for security config (#1193)
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>

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

upstream issue: https://github.com/seaweedfs/seaweedfs/pull/6967

## 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
[seaweedfs] Fix drift for security config
```

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

## Summary by CodeRabbit

* **Bug Fixes**
* Ensured JWT signing keys in the SeaweedFS security configuration
remain consistent across Helm upgrades, preventing unintentional key
rotation and maintaining stable authentication.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-07-14 21:37:08 +02:00
Nick Volynkin
55cfdb3a38 [apps] Remove preset 'none' from app charts and README
Preset 'none' is in fact disallowed since cozystack/cozystack#1156

Signed-off-by: Nick Volynkin <nick.volynkin@gmail.com>
2025-07-14 19:31:10 +03:00
kklinch0
cc2b36fbe0 bugfix fix nats
Signed-off-by: kklinch0 <kklinch0@gmail.com>
2025-07-11 22:47:19 +03:00
Andrei Kvapil
76c8de7f4d [seaweedfs] Fix drift for security config
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2025-07-11 16:45:10 +02:00
klinch0
c1a4a58500 [oidc] make keycloak deletable (#1178)
<!-- 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
[oidc] make keycloak deletable
```

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

## Summary by CodeRabbit

* **New Features**
* Added automated cleanup of Keycloak-related resources during
uninstallation to ensure smooth deletion.
* **Bug Fixes**
* Improved conditional logic for enabling OIDC and Keycloak-related
resources, ensuring they are only activated when explicitly set to
"true".
* **Chores**
  * Updated version numbers and references for the tenant application.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-07-11 09:02:34 +03:00
kklinch0
1faf40cd81 [oidc] make keycloak deletable
Signed-off-by: kklinch0 <kklinch0@gmail.com>
2025-07-10 20:10:54 +03:00
Andrei Kvapil
1b7a597f1c [talos] Update Talos Linux v1.10.5 (#1186)
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>

<!-- 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
[talos] Update Talos Linux v1.10.5
```

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

## Summary by CodeRabbit

* **Chores**
* Updated system firmware, microcode, and storage extension versions to
the latest releases across all installer profiles.
* Increased profile version from v1.10.3 to v1.10.5 for improved
component compatibility and reliability.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-07-10 14:29:15 +02:00
Andrei Kvapil
aa84b1c054 [talos] Update Talos Linux v1.10.5
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2025-07-10 14:28:49 +02:00
Timofei Larkin
6e96dd0a33 [docs] Changelogs for v0.32.1 and changelog template (#1111)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **Documentation**
* Added a new changelog template with predefined sections for consistent
release documentation.
* Published a detailed changelog for version 0.32.1, outlining major
features, fixes, dependency updates, documentation changes, testing
improvements, and CI/CD enhancements.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-07-10 13:13:17 +04:00
Andrei Kvapil
08cb7c0f28 Release v0.34.0-beta.1 (#1187)
This PR prepares the release `v0.34.0-beta.1`.

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

## Summary by CodeRabbit

* **Chores**
* Updated multiple container image versions and tags across various
components to newer releases, including several beta versions.
  * Refreshed image digests to ensure the latest builds are used.
  * Updated dashboard configuration to reflect the new app version.
  * No changes to functionality or user interface.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
v0.34.0-beta.1
2025-07-10 11:03:03 +02:00
Nick Volynkin
ef30e69245 [docs] Changelog for v0.32.1 and changelog template
Signed-off-by: Nick Volynkin <nick.volynkin@gmail.com>
2025-07-10 11:50:39 +03:00
Timofei Larkin
847980f03d [release-v0.31] [docs] Release notes for v0.31.1 and v0.31.2 (#1068)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **Documentation**
- Added detailed changelog entries for versions 0.31.1 and 0.31.2,
highlighting recent fixes, improvements, and security updates.
- Included a summary of key changes, security fixes, and platform,
dashboard, and application enhancements.
  - Provided links and references for further details on each release.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-07-10 12:48:06 +04:00
cozystack-bot
0ecb8585bc Prepare release v0.34.0-beta.1
Signed-off-by: cozystack-bot <217169706+cozystack-bot@users.noreply.github.com>
2025-07-10 08:09:47 +00:00
Andrei Kvapil
32aea4254b [cilium] Update Cilium v1.17.5 (#1181)
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>

<!-- 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
[cilium] Update Cilium v1.17.5
```
2025-07-10 10:05:47 +02:00
Andrei Kvapil
e49918745e [kube-ovn] Update Kube-OVN v1.13.14 (#1182)
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>

<!-- 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
[kube-ovn] Update Kube-OVN v1.13.14
```
2025-07-10 09:31:06 +02:00
Andrei Kvapil
220c347cc5 [kamaji] Update Kamaji edge-25.7.1 (#1184)
<!-- 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
[kamaji] Update Kamaji edge-25.7.1 #
```

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

## Summary by CodeRabbit

* **Chores**
* Removed all Helm chart files, templates, configuration, documentation,
and related scripts for the Kamaji Etcd component.
* Deleted Kubernetes resource definitions, backup/defrag jobs,
monitoring, RBAC, and ServiceAccount templates associated with Kamaji
Etcd.
* Removed supporting patches and Makefiles for managing the Kamaji Etcd
Helm chart.
* All user-facing configuration and deployment options for Kamaji Etcd
via Helm are no longer available.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-07-10 01:32:23 +02:00
Andrei Kvapil
a4ec46a941 [cozystack-api] Specify OpenAPI schema for apps (#1174)
Depends on https://github.com/cozystack/cozystack/pull/1173

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

<!-- 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
[cozystack-api] Specify OpenAPI schema for apps
```
2025-07-10 01:23:19 +02:00
Andrei Kvapil
2c126786b3 Update Flux Operator (0.24.0) (#1167)
This PR updates Flux Operator to 0.24.0 - some changes have been
undertaken to make upgrading Flux on any version of the flux-operator
more reliable - these are related to `spec.distribution.artifact` which
I think you have already seen


https://fluxcd.control-plane.io/operator/fluxinstance/#distribution-artifact

May be relevant to air-gapped environments.

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

## Summary by CodeRabbit

* **New Features**
* Added support for specifying extra pod volumes and container volume
mounts via new configuration options in the Helm chart.
* Extended CRD schemas to support additional provider types, new
filtering options, and enhanced validation and authentication fields.
* Introduced new fields for improved authentication and workload
identity federation in CRDs.

* **Documentation**
* Updated README files to document new configuration options and reflect
the latest chart versions.

* **Chores**
* Bumped Helm chart and app versions to 0.24.0 for both operator and
instance charts.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-07-10 00:19:35 +02:00
Andrei Kvapil
784f1454ba [kubevirt][cdi] Update KubeVirt v1.5.2 and CDI v1.62.0 (#1183)
- [kubevirt] Update KubeVirt v1.5.2
- [cdi] Update CDI v1.62.0

<!-- 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
[kubevirt] Update KubeVirt v1.5.2
[cdi] Update CDI v1.62.0
```
2025-07-10 00:16:45 +02:00
Andrei Kvapil
9d9226b575 [linstor] Update LINSTOR v1.31.2 (#1180)
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>

<!-- 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
[linstor] Update LINSTOR v1.31.2
```
2025-07-10 00:16:28 +02:00
Andrei Kvapil
9ec5863a75 Release v0.33.2 (#1177)
This PR prepares the release `v0.33.2`.

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

* **Chores**
* Updated container image versions and digests for multiple components,
including cluster-autoscaler, kubevirt-cloud-provider,
kubevirt-csi-driver, cozystack installer, e2e service, matchbox,
s3manager, cozystackAPI, cozystack-controller, dashboard, kubeapps-apis,
Kamaji, kubeovn-webhook, kubeovn, and kubevirt-csi-node.
* Updated configuration fields to reflect new image versions where
applicable.
  * No changes to user-facing features or functionality.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
v0.33.2
2025-07-09 22:14:03 +02:00
cozystack-bot
50f3089f14 Prepare release v0.33.2
Signed-off-by: cozystack-bot <217169706+cozystack-bot@users.noreply.github.com>
2025-07-09 19:36:09 +00:00
Andrei Kvapil
1aadefef75 [ci] overwrite checkout token
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2025-07-09 21:24:59 +02:00
Andrei Kvapil
5727110542 [kamaji] Update Kamaji edge-25.7.1
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2025-07-09 19:03:07 +02:00
Andrei Kvapil
f2fffb03e4 [cdi] Update CDI v1.62.0
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2025-07-09 18:58:43 +02:00
Andrei Kvapil
ab5eae3fbc [kubevirt] Update KubeVirt v1.5.2
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2025-07-09 18:58:39 +02:00
Andrei Kvapil
38cf5fd58c [cilium] Update Cilium v1.17.5
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2025-07-09 18:54:42 +02:00
Andrei Kvapil
cda554b58c [kube-ovn] Update Kube-OVN v1.13.14
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2025-07-09 18:54:01 +02:00
Andrei Kvapil
a73794d751 [linstor] Update LINSTOR v1.31.2
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2025-07-09 18:45:12 +02:00
Andrei Kvapil
81a412517c [cozystack-api] Disable startegic-json-patch support (#1179)
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>

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

This PR adds a post-processing hook that removes
application/strategic-merge-patch+json from every PATCH operation in the
generated OpenAPI v2/v3 specs.

Strategic-merge-patch (SMP) is never supported for CRDs, and our
aggregated API implementation can’t handle it either. When the spec
advertises SMP, kubectl picks that media-type by default and sends an
SMP body, which the apiserver then rejects with
unable to find api field in struct JSON for the json field ….

By dropping SMP from consumes / content:
* kubectl apply|patch … transparently falls back to
application/merge-patch+json or application/json-patch+json.
* Server-side-apply (kubectl apply --server-side …) keeps working via
application/apply-patch+yaml.

No changes are required on the handler side—only the advertised
media-types are updated.


### 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
[cozystack-api] Disable startegic-json-patch support
```
2025-07-09 18:34:43 +02:00
Andrei Kvapil
23a7281fbf [cozystack-api] Disable startegic-json-patch support
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2025-07-09 18:31:14 +02:00
Andrei Kvapil
f32c6426a9 [cozystack-api] Refactor OpenAPI Schema (#1173)
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>

<!-- 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
[cozystack-api] Fix updaing lists on cozystack objects
[cozystack-api] Refactor OpenAPI Schema
[cozystack-api] Support reading OpenAPI Schema from config
[cozystack-api] Disable startegic-json-patch support
```

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

* **New Features**
* Added support for dynamic OpenAPI schema post-processing for both
OpenAPI v2 and v3 specifications, enabling custom schema injection per
resource kind.
* Introduced a new configuration field to allow specifying a custom
OpenAPI schema.

* **Refactor**
* Streamlined OpenAPI schema handling by moving from inline logic to
modular post-processing functions.
* Implemented dynamic versioning for OpenAPI specs based on resource
configuration changes.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-07-09 18:30:13 +02:00
Andrei Kvapil
91583a4e1a [cozystack-api] Refactor OpenAPI Schema
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2025-07-09 18:28:06 +02:00