fix(installer): handle parsePlatformSourceURL error, restore variant validation
Check error from parsePlatformSourceURL instead of discarding it, preventing silent fallback to OCIRepository on invalid URLs. Move variant validation from deleted packagesource.yaml to cozystack-operator.yaml template so invalid cozystackOperator.variant values still fail at helm template/install time. Co-Authored-By: Claude <noreply@anthropic.com> Signed-off-by: Aleksei Sviridkin <f@lex.la>
This commit is contained in:
parent
655133b81c
commit
0e8b6515af
2 changed files with 9 additions and 1 deletions
|
|
@ -225,7 +225,11 @@ func main() {
|
|||
|
||||
// Create platform PackageSource that references the source resource
|
||||
setupLog.Info("Creating platform PackageSource", "platformSourceName", platformSourceName)
|
||||
sourceType, _, _ := parsePlatformSourceURL(platformSourceURL)
|
||||
sourceType, _, err := parsePlatformSourceURL(platformSourceURL)
|
||||
if err != nil {
|
||||
setupLog.Error(err, "failed to parse platform source URL for PackageSource creation")
|
||||
os.Exit(1)
|
||||
}
|
||||
sourceRefKind := "OCIRepository"
|
||||
if sourceType == "git" {
|
||||
sourceRefKind = "GitRepository"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue