Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
117 commits
Select commit Hold shift + click to select a range
bc2a001
update for v1beta1
AustinAbro321 Mar 4, 2026
529e381
update for v1beta1
AustinAbro321 Mar 4, 2026
f244966
include data injections
AustinAbro321 Mar 11, 2026
429411c
add in missing fields
AustinAbro321 Mar 11, 2026
58fdf69
Merge branch 'main' into update-v1beta1-schema
AustinAbro321 Mar 11, 2026
73a519e
generate schema and move out of internal
AustinAbro321 Mar 11, 2026
3b390c3
generate v1beta1
AustinAbro321 Mar 11, 2026
05aed51
Merge branch 'main' into update-v1beta1-schema
AustinAbro321 Mar 12, 2026
3a424b0
add server side apply
AustinAbro321 Mar 12, 2026
8656244
Merge branch 'main' into update-v1beta1-schema
AustinAbro321 Mar 13, 2026
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
3318a5d
make allow namespace overrides a boolptr field
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
c2098ef
update v1beta1 with default
AustinAbro321 Mar 16, 2026
0bbd048
add get images
AustinAbro321 Mar 16, 2026
9596b2a
merge
AustinAbro321 Mar 16, 2026
c78647e
error on removed fields
AustinAbro321 Mar 16, 2026
288c31a
build api version
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
6f04230
Merge branch 'main' into update-v1beta1-schema
AustinAbro321 Apr 13, 2026
e5cea6c
Merge branch 'update-v1beta1-schema' into introduce-api-conversions
AustinAbro321 Apr 13, 2026
a2848a2
v1beta1 changes
AustinAbro321 May 28, 2026
e23b294
Merge branch 'main' into update-v1beta1-schema
AustinAbro321 May 28, 2026
2894b0b
add deprecated fields
AustinAbro321 May 28, 2026
b2eb1d2
add in missing fields
AustinAbro321 May 28, 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
081a9f2
docs and schema
AustinAbro321 May 29, 2026
6cd42e3
component spec
AustinAbro321 May 29, 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
9bcc98a
original API version
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
7498a0d
yolo and group
AustinAbro321 Jun 1, 2026
d50c81e
stop importing v1alpha1
AustinAbro321 Jun 2, 2026
43f70c2
package schema
AustinAbro321 Jun 2, 2026
5c0be33
snake case
AustinAbro321 Jun 2, 2026
d5ba3bc
value was unused
AustinAbro321 Jun 2, 2026
c24f772
omit empty
AustinAbro321 Jun 2, 2026
52b0406
Merge branch 'main' into update-v1beta1-schema
AustinAbro321 Jun 3, 2026
10ac577
Merge branch 'update-v1beta1-schema' into introduce-api-conversions
AustinAbro321 Jun 3, 2026
7afa577
cleaner conversion logic
AustinAbro321 Jun 3, 2026
ce2f4a4
inline
AustinAbro321 Jun 4, 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
0a3446d
add deprecated static text
AustinAbro321 Jun 9, 2026
169ae15
enable templating
AustinAbro321 Jun 9, 2026
3918717
Merge branch 'main' into update-v1beta1-schema
AustinAbro321 Jun 24, 2026
30bafea
add state access and change repos
AustinAbro321 Jun 24, 2026
5a91521
Merge branch 'update-v1beta1-schema' into introduce-api-conversions
AustinAbro321 Jun 24, 2026
030ed1a
fix tests
AustinAbro321 Jun 24, 2026
2ac9c8a
mark lint
AustinAbro321 Jun 24, 2026
cf8ad31
change convert function names
AustinAbro321 Jun 24, 2026
3a16493
service conversion logic
AustinAbro321 Jun 24, 2026
02ac5c0
WIP, being loading v1beta1
AustinAbro321 Jun 24, 2026
a2956e5
work with multi doc files
AustinAbro321 Jun 24, 2026
da5cc97
introduce generic parse as
AustinAbro321 Jun 24, 2026
1770959
improve convert functionality
AustinAbro321 Jun 25, 2026
ab0d0d8
cleaner
AustinAbro321 Jun 25, 2026
3eb32d9
move migrate functionality
AustinAbro321 Jun 25, 2026
fc56e78
WIP
AustinAbro321 Jun 25, 2026
2667398
round trip updates to package
AustinAbro321 Jun 25, 2026
9f00226
roundtrip test
AustinAbro321 Jun 25, 2026
b06aee0
better convert
AustinAbro321 Jun 25, 2026
17e45fe
improve convert
AustinAbro321 Jun 25, 2026
6369e21
fixme
AustinAbro321 Jun 25, 2026
b04ab10
merge
AustinAbro321 Jun 25, 2026
b059fd8
package config:
AustinAbro321 Jun 26, 2026
dba6a93
remove api version
AustinAbro321 Jun 26, 2026
8101dce
combine everything into convertFromGeneric
AustinAbro321 Jun 26, 2026
510a679
Merge branch 'introduce-api-conversions' into new-load-v1beta1
AustinAbro321 Jun 26, 2026
7c298fe
load once
AustinAbro321 Jun 26, 2026
0dde743
implement imports
AustinAbro321 Jun 26, 2026
ce429c0
merge
AustinAbro321 Jul 8, 2026
5ba8bca
updates
AustinAbro321 Jul 8, 2026
d10b266
generic
AustinAbro321 Jul 8, 2026
0e5676e
Merge branch 'introduce-api-conversions' into new-load-v1beta1
AustinAbro321 Jul 13, 2026
c2cd404
target to selector
AustinAbro321 Jul 13, 2026
9bafba4
fix tests
AustinAbro321 Jul 13, 2026
82cf157
send package path
AustinAbro321 Jul 13, 2026
904e7a1
fix name
AustinAbro321 Jul 13, 2026
31a8136
comment
AustinAbro321 Jul 13, 2026
63a8085
fix original api version
AustinAbro321 Jul 13, 2026
58eeed5
expected zarf.yaml
AustinAbro321 Jul 13, 2026
3a3d8a1
v1beta1 validate
AustinAbro321 Jul 14, 2026
e5460bd
Merge branch 'introduce-api-conversions' into new-load-v1beta1
AustinAbro321 Jul 15, 2026
887f7fa
paths
AustinAbro321 Jul 15, 2026
d3f31e1
fix values files
AustinAbro321 Jul 15, 2026
9ffc488
filepath to slash in test
AustinAbro321 Jul 15, 2026
c78c0ee
duplicates and comments
AustinAbro321 Jul 15, 2026
ea225f7
fixme
AustinAbro321 Jul 16, 2026
a0a37ab
change to new strategy
AustinAbro321 Jul 20, 2026
76a67b3
convert test
AustinAbro321 Jul 20, 2026
ebe112f
add tests
AustinAbro321 Jul 20, 2026
40f4c92
Merge branch 'introduce-api-conversions-new-strategy' into new-load-v…
AustinAbro321 Jul 20, 2026
f6142d1
package accessor load
AustinAbro321 Jul 20, 2026
a0c9612
refactor pkgcfg
AustinAbro321 Jul 20, 2026
e7d4bc7
to generic encoder
AustinAbro321 Jul 20, 2026
9cbd1c8
package api
AustinAbro321 Jul 29, 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
16 changes: 16 additions & 0 deletions src/api/api.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// SPDX-License-Identifier: Apache-2.0
// SPDX-FileCopyrightText: 2021-Present The Zarf Authors

// Package api supplies helpers for working generically with the different API versions
package api

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

// PackageAccessor is the read contract for a package source, exposing a per-version definition.
type PackageAccessor interface {
AsV1alpha1() (v1alpha1.ZarfPackage, error)
AsV1beta1() (v1beta1.Package, error)
}
8 changes: 8 additions & 0 deletions src/api/convert/convert.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,18 @@ package convert
import (
"github.com/zarf-dev/zarf/src/api/v1alpha1"
"github.com/zarf-dev/zarf/src/api/v1beta1"
"github.com/zarf-dev/zarf/src/internal/api/types"
internalv1alpha1 "github.com/zarf-dev/zarf/src/internal/api/v1alpha1"
internalv1beta1 "github.com/zarf-dev/zarf/src/internal/api/v1beta1"
)

// GenericToCanonicalAPIVersion takes a generic Package and converts it to the API version
// that package layout is currently using.
// Intentionally only callable internally since it uses the generic type
func GenericToCanonicalAPIVersion(gen types.Package) v1alpha1.ZarfPackage {
return internalv1alpha1.ConvertFromGeneric(gen)
}

// PackageV1alpha1ToV1beta1 converts a v1alpha1 ZarfPackage to a v1beta1 Package.
func PackageV1alpha1ToV1beta1(pkg v1alpha1.ZarfPackage) v1beta1.Package {
generic := internalv1alpha1.ConvertToGeneric(pkg)
Expand Down
Loading