You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit fdca498
Browse filesBrowse the repository at this point in the historyBrowse files
[registry] Add application labels and update filtering mechanism
- Add three application metadata labels to HelmRelease:
- apps.cozystack.io/application.kind
- apps.cozystack.io/application.group
- apps.cozystack.io/application.name
- Replace shouldIncludeHelmRelease filtering with label-based filtering
in Get, List, and Update methods
- Always add kind and group label requirements in List for precise filtering
- Update CozystackResourceDefinitionController to watch only HelmReleases
with cozystack.io/ui=true label
- Update LineageControllerWebhook to extract metadata directly from
HelmRelease labels instead of using mapping configuration
- Add functionality to update HelmRelease chart from CozystackResourceDefinition
using label selectors
Signed-off-by: Andrei Kvapil <[email protected]>
// Extract prefix from HelmRelease name by removing the application name
63
+
// HelmRelease name format: <prefix><application-name>
64
+
prefix:=strings.TrimSuffix(hr.Name, appName)
65
+
66
+
// Validate the derived prefix
67
+
// This ensures correctness when appName appears multiple times in hr.Name
68
+
ifprefix+appName!=hr.Name {
69
+
return"", "", "", fmt.Errorf("cannot derive prefix from helm release %s/%s: name does not end with application name %s", hr.Namespace, hr.Name, appName)
0 commit comments