Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
c55e885
introduce api conversions
AustinAbro321 Mar 13, 2026
52b264c
convert v1beta1 to v1alpha1
AustinAbro321 Mar 13, 2026
2d838b0
is git url
AustinAbro321 Mar 13, 2026
e7bb8a3
features
AustinAbro321 Mar 13, 2026
107d5f5
spell out names
AustinAbro321 Mar 13, 2026
537e1ec
convert corrections
AustinAbro321 Mar 13, 2026
86458e7
temporary convert command
AustinAbro321 Mar 13, 2026
bd42c1e
Merge branch 'update-v1beta1-schema' into introduce-api-conversions
AustinAbro321 Mar 13, 2026
e888fa7
allow namespace override
AustinAbro321 Mar 16, 2026
577a328
unnecessary path
AustinAbro321 Mar 16, 2026
888d51b
add healthchecks as on deploy actions
AustinAbro321 Mar 16, 2026
9c03bab
handle health checks
AustinAbro321 Mar 16, 2026
cc293fa
hide command
AustinAbro321 Mar 16, 2026
e6d477f
add default
AustinAbro321 Mar 16, 2026
9596b2a
merge
AustinAbro321 Mar 16, 2026
c78647e
error on removed fields
AustinAbro321 Mar 16, 2026
8269b75
Merge branch 'update-v1beta1-schema' into introduce-api-conversions
AustinAbro321 Mar 16, 2026
9521429
add api version
AustinAbro321 Mar 16, 2026
8340440
use require instead of assert
AustinAbro321 Mar 16, 2026
e5cea6c
Merge branch 'update-v1beta1-schema' into introduce-api-conversions
AustinAbro321 Apr 13, 2026
09d2f66
Merge branch 'update-v1beta1-schema' into introduce-api-conversions
AustinAbro321 May 28, 2026
b81f3dc
fix convert logic with latest for schema
AustinAbro321 May 28, 2026
e6967d3
Merge branch 'update-v1beta1-schema' into introduce-api-conversions
AustinAbro321 May 29, 2026
b1037aa
fix tests
AustinAbro321 May 29, 2026
8ed3b4c
cast
AustinAbro321 May 29, 2026
d9af6fd
Merge branch 'update-v1beta1-schema' into introduce-api-conversions
AustinAbro321 May 29, 2026
38bcbc8
original api verison
AustinAbro321 May 29, 2026
89bb116
test out coverpkg
AustinAbro321 May 29, 2026
10ac577
Merge branch 'update-v1beta1-schema' into introduce-api-conversions
AustinAbro321 Jun 3, 2026
7afa577
cleaner conversion logic
AustinAbro321 Jun 3, 2026
f6ea5a2
Merge branch 'update-v1beta1-schema' into introduce-api-conversions
AustinAbro321 Jun 4, 2026
4d4151f
fix name
AustinAbro321 Jun 4, 2026
d28c334
convert
AustinAbro321 Jun 8, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions src/api/convert/convert.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
// SPDX-License-Identifier: Apache-2.0
// SPDX-FileCopyrightText: 2021-Present The Zarf Authors

// Package convert provides functions for converting between Zarf package API versions.
package convert

import (
"github.com/zarf-dev/zarf/src/api/v1alpha1"
"github.com/zarf-dev/zarf/src/api/v1beta1"
internalv1alpha1 "github.com/zarf-dev/zarf/src/internal/api/v1alpha1"
internalv1beta1 "github.com/zarf-dev/zarf/src/internal/api/v1beta1"
)

// V1Alpha1PkgToV1Beta1 converts a v1alpha1 ZarfPackage to a v1beta1 Package.
func V1Alpha1PkgToV1Beta1(pkg v1alpha1.ZarfPackage) v1beta1.Package {
generic := internalv1alpha1.ConvertToGeneric(pkg)
v1beta1Pkg := internalv1beta1.ConvertFromGeneric(generic)
return v1beta1.SetDeprecatedFromGeneric(generic, v1beta1Pkg)
}

// V1Beta1PkgToV1Alpha1 converts a v1beta1 Package to a v1alpha1 ZarfPackage.
func V1Beta1PkgToV1Alpha1(pkg v1beta1.Package) v1alpha1.ZarfPackage {
generic := internalv1beta1.ConvertToGeneric(pkg)
return internalv1alpha1.ConvertFromGeneric(generic)
}
Loading
Loading