Skip to content

Commit 1c059b3

Browse files
kvapsclaude
andcommitted
chore(platform): drop dashboard.cozystack.io CRDs via migration 40
Existing clusters still have the legacy dashboard.cozystack.io CRDs installed even after the dashboard controller has been removed. Add a platform migration that deletes them and bump targetVersion to 41. Co-Authored-By: Claude <[email protected]> Signed-off-by: Andrei Kvapil <[email protected]>
1 parent 4d5486c commit 1c059b3

2 files changed

Lines changed: 43 additions & 1 deletion

File tree

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
#!/bin/sh
2+
# Migration 40 --> 41
3+
# Remove obsolete dashboard.cozystack.io CRDs left over from the dashboard
4+
# controller, which is no longer part of Cozystack.
5+
#
6+
# The dashboard controller used to project ApplicationDefinitions into a set
7+
# of dashboard.cozystack.io CRs (Sidebar, Factory, Navigation, Breadcrumb,
8+
# CustomFormsOverride, CustomFormsPrefill, CustomColumnsOverride,
9+
# MarketplacePanel, TableUriMapping, CFOMapping, BreadcrumbInside) consumed
10+
# by the legacy UI. cozystack-ui now reads ApplicationDefinitions directly,
11+
# so both the controller and the CRDs are dead. The chart no longer ships
12+
# these CRDs, but existing clusters still have them installed — delete them
13+
# explicitly here so they do not stay around as orphans.
14+
15+
set -euo pipefail
16+
17+
CRDS="
18+
breadcrumbs.dashboard.cozystack.io
19+
breadcrumbsinside.dashboard.cozystack.io
20+
cfomappings.dashboard.cozystack.io
21+
customcolumnsoverrides.dashboard.cozystack.io
22+
customformsoverrides.dashboard.cozystack.io
23+
customformsprefills.dashboard.cozystack.io
24+
factories.dashboard.cozystack.io
25+
marketplacepanels.dashboard.cozystack.io
26+
navigations.dashboard.cozystack.io
27+
sidebars.dashboard.cozystack.io
28+
tableurimappings.dashboard.cozystack.io
29+
"
30+
31+
for CRD in $CRDS; do
32+
if kubectl get crd "$CRD" >/dev/null 2>&1; then
33+
echo "Deleting CRD $CRD"
34+
kubectl delete crd "$CRD" --ignore-not-found=true --wait=false
35+
else
36+
echo "CRD $CRD not found, skipping"
37+
fi
38+
done
39+
40+
# Stamp version
41+
kubectl create configmap -n cozy-system cozystack-version \
42+
--from-literal=version=41 --dry-run=client -o yaml | kubectl apply -f-

‎packages/core/platform/values.yaml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ sourceRef:
66
migrations:
77
enabled: false
88
image: ghcr.io/cozystack/cozystack/platform-migrations:v1.4.0-rc.2@sha256:17390197a9b11d76a8dd1b24c6d1512adb7d3226b28b5bcba8551b14b1ec4be0
9-
targetVersion: 40
9+
targetVersion: 41
1010
# Bundle deployment configuration
1111
bundles:
1212
system:

0 commit comments

Comments
 (0)