Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some OCI Optimizations #1764

Merged
merged 83 commits into from
Jun 14, 2023
Merged
Show file tree
Hide file tree
Changes from 67 commits
Commits
Show all changes
83 commits
Select commit Hold shift + click to select a range
6bf8449
wip
Noxsios Jun 1, 2023
2e47273
Merge branch 'main' into 1763-oci-layer-optimizations
Noxsios Jun 1, 2023
b070c48
deploying a single component via OCI is working
Noxsios Jun 1, 2023
9866b10
handle required components needing to be always pulled
Noxsios Jun 1, 2023
7c63e10
lint
Noxsios Jun 1, 2023
87b129f
Merge branch 'main' into 1763-oci-layer-optimizations
Noxsios Jun 1, 2023
7db7554
Merge branch 'main' into 1763-oci-layer-optimizations
Noxsios Jun 2, 2023
6da2fab
merge main
Noxsios Jun 3, 2023
b4d20e4
committing in case i lose power in a sec
Noxsios Jun 3, 2023
5e826a7
should be working now
Noxsios Jun 3, 2023
c81f1a7
naming
Noxsios Jun 3, 2023
1742243
simpler calculate size
Noxsios Jun 3, 2023
48c642f
fix deploy w/ components after refactor
Noxsios Jun 3, 2023
875b9a9
comments
Noxsios Jun 3, 2023
d55ac15
cleanup
Noxsios Jun 3, 2023
3e6826d
Merge branch 'main' into 1763-oci-layer-optimizations
Noxsios Jun 3, 2023
2290d4f
cleanup
Noxsios Jun 5, 2023
ef940f9
Merge branch 'main' into 1763-oci-layer-optimizations
Noxsios Jun 5, 2023
466ba62
feedback from review
Noxsios Jun 6, 2023
b182ab8
Merge branch 'main' into 1763-oci-layer-optimizations
Noxsios Jun 6, 2023
b32a74f
fetch if you specify an optional component
Noxsios Jun 6, 2023
8ded3dc
update ui to match
Noxsios Jun 6, 2023
b347e8e
update ui to match
Noxsios Jun 6, 2023
2f1d2b4
fix nonsense
Noxsios Jun 6, 2023
7aff506
fix ui api
Noxsios Jun 7, 2023
356054d
Merge branch 'main' into 1763-oci-layer-optimizations
Noxsios Jun 7, 2023
c2513bf
move publish code into oras.go
Noxsios Jun 7, 2023
44754b9
create inline publish functionality
Noxsios Jun 7, 2023
4539814
docs and schema
Noxsios Jun 7, 2023
ab7f207
remove leaking debug statement
Noxsios Jun 7, 2023
0e41e98
fix references
Noxsios Jun 7, 2023
6d5bb78
docs and schema
Noxsios Jun 7, 2023
9b50987
fix tests
Noxsios Jun 7, 2023
7dd5cce
break out oras.go into separate files
Noxsios Jun 7, 2023
9fcb0c3
fix compiler error
Noxsios Jun 7, 2023
1e5fae9
Merge branch 'main' into 1763-oci-layer-optimizations
Noxsios Jun 7, 2023
16bd86e
some minor tweaks
Noxsios Jun 7, 2023
de0711e
big improvements
Noxsios Jun 8, 2023
3ee8309
fix
Noxsios Jun 8, 2023
adca46b
fix inspect
Noxsios Jun 8, 2023
b9b220d
Merge branch 'main' into 1763-oci-layer-optimizations
Noxsios Jun 8, 2023
0ae675e
common remote
Noxsios Jun 8, 2023
dc3563d
Update src/pkg/packager/create.go
Noxsios Jun 8, 2023
47a47d1
common oci concurrency
Noxsios Jun 8, 2023
88b5bd7
common oci concurrency
Noxsios Jun 8, 2023
6f335d2
docs and schema
Noxsios Jun 8, 2023
d72337a
feedback from review
Noxsios Jun 8, 2023
1056387
feedback from review
Noxsios Jun 8, 2023
cdd3751
fix
Noxsios Jun 8, 2023
7213bd1
fix remove oci://
Noxsios Jun 8, 2023
cd03e7a
add remove oci:// to a test
Noxsios Jun 8, 2023
c109b5c
fix inspect
Noxsios Jun 8, 2023
1d21c3d
hide output-directory flag and alias
Noxsios Jun 8, 2023
bacfb7e
messaging
Noxsios Jun 8, 2023
5ec371f
add spinner to writing tarball
Noxsios Jun 8, 2023
2591ad3
docs and schema
Noxsios Jun 8, 2023
80103a5
lint
Noxsios Jun 8, 2023
ef9351d
fix tests
Noxsios Jun 10, 2023
85fa6ce
cleanup
Noxsios Jun 10, 2023
092fb1b
fix inspect test
Noxsios Jun 12, 2023
8421293
printing tweaks
Noxsios Jun 12, 2023
b18de26
fix test 50
Noxsios Jun 12, 2023
8b48fd5
message tweak
Noxsios Jun 12, 2023
ef5eb56
message tweak
Noxsios Jun 12, 2023
82b259b
message tweak
Noxsios Jun 12, 2023
d743f78
message tweak
Noxsios Jun 12, 2023
f6a4ae0
testing github group
Noxsios Jun 12, 2023
aadcfd5
feedback from review
Noxsios Jun 12, 2023
63ea4a5
Merge branch 'main' into 1763-oci-layer-optimizations
Noxsios Jun 12, 2023
9137417
Merge branch 'main' into 1763-oci-layer-optimizations
Racer159 Jun 12, 2023
7357b3e
Update src/pkg/oci/pull.go
Noxsios Jun 13, 2023
5740e81
Update src/internal/api/components/list.go
Noxsios Jun 13, 2023
1f357d5
Update src/pkg/oci/pull.go
Noxsios Jun 13, 2023
6e04b29
Update src/pkg/packager/common.go
Noxsios Jun 13, 2023
4a398da
Update src/pkg/utils/checksum.go
Noxsios Jun 13, 2023
a6a7a1b
feedback from review
Noxsios Jun 13, 2023
1e176f1
feedback from review
Noxsios Jun 13, 2023
d2588b1
Merge branch 'main' into 1763-oci-layer-optimizations
Noxsios Jun 13, 2023
2dbac28
feedback from review
Noxsios Jun 13, 2023
44611f0
verify agg checksums exist before validating
Noxsios Jun 13, 2023
d4e1bec
check agg checksum within validate
Noxsios Jun 13, 2023
4e76a6f
dont validate checksums on packages that do not have agg checksums
Noxsios Jun 13, 2023
06c5d04
lint
Noxsios Jun 14, 2023
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
3 changes: 2 additions & 1 deletion docs/2-the-zarf-cli/100-cli-commands/zarf_package.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ Zarf package commands for creating, deploying, and inspecting packages
## Options

```
-h, --help help for package
-h, --help help for package
--oci-concurrency int Number of concurrent layer operations to perform when interacting with a remote package. (default 3)
```

## Options inherited from parent commands
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ zarf package create [DIRECTORY] [flags]
-k, --key string Path to private key file for signing packages
--key-pass string Password to the private key file used for signing packages
-m, --max-package-size int Specify the maximum size of the package in megabytes, packages larger than this will be split into multiple parts. Use 0 to disable splitting.
-o, --output-directory string Specify the output directory for the created Zarf package
-o, --output string Specify the output (either a directory or an oci:// URL) for the created Zarf package
--registry-override stringToString Specify a map of domains to override on package create when pulling images (e.g. --registry-override docker.io=dockerio-reg.enterprise.intranet) (default [])
-s, --sbom View SBOM contents after creating the package
--sbom-out string Specify an output directory for the SBOMs from the created Zarf package
Expand All @@ -38,6 +38,7 @@ zarf package create [DIRECTORY] [flags]
-l, --log-level string Log level when running Zarf. Valid options are: warn, info, debug, trace (default "info")
--no-log-file Disable log file creation
--no-progress Disable fancy UI progress bars, spinners, logos, etc
--oci-concurrency int Number of concurrent layer operations to perform when interacting with a remote package. (default 3)
--tmpdir string Specify the temporary directory to use for intermediate files
--zarf-cache string Specify the location of the Zarf cache directory (default "~/.zarf-cache")
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ zarf package deploy [PACKAGE] [flags]
--confirm Confirms package deployment without prompting. ONLY use with packages you trust. Skips prompts to review SBOM, configure variables, select optional components and review potential breaking changes.
-h, --help help for deploy
-k, --key string Path to public key file for validating signed packages
--oci-concurrency int Number of concurrent layer operations to perform when interacting with a remote package. (default 3)
--set stringToString Specify deployment variables to set on the command line (KEY=value) (default [])
--sget string Path to public sget key file for remote packages signed via cosign
--shasum string Shasum of the package to deploy. Required if deploying a remote package and "--insecure" is not provided
Expand All @@ -33,6 +32,7 @@ zarf package deploy [PACKAGE] [flags]
-l, --log-level string Log level when running Zarf. Valid options are: warn, info, debug, trace (default "info")
--no-log-file Disable log file creation
--no-progress Disable fancy UI progress bars, spinners, logos, etc
--oci-concurrency int Number of concurrent layer operations to perform when interacting with a remote package. (default 3)
--tmpdir string Specify the temporary directory to use for intermediate files
--zarf-cache string Specify the location of the Zarf cache directory (default "~/.zarf-cache")
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ zarf package inspect [PACKAGE] [flags]
-l, --log-level string Log level when running Zarf. Valid options are: warn, info, debug, trace (default "info")
--no-log-file Disable log file creation
--no-progress Disable fancy UI progress bars, spinners, logos, etc
--oci-concurrency int Number of concurrent layer operations to perform when interacting with a remote package. (default 3)
--tmpdir string Specify the temporary directory to use for intermediate files
--zarf-cache string Specify the location of the Zarf cache directory (default "~/.zarf-cache")
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ zarf package list [flags]
-l, --log-level string Log level when running Zarf. Valid options are: warn, info, debug, trace (default "info")
--no-log-file Disable log file creation
--no-progress Disable fancy UI progress bars, spinners, logos, etc
--oci-concurrency int Number of concurrent layer operations to perform when interacting with a remote package. (default 3)
--tmpdir string Specify the temporary directory to use for intermediate files
--zarf-cache string Specify the location of the Zarf cache directory (default "~/.zarf-cache")
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,9 @@ zarf package publish ./path/to/dir oci://my-registry.com/my-namespace
## Options

```
-h, --help help for publish
-k, --key string Path to private key file for signing packages
--key-pass string Password to the private key file used for publishing packages
--oci-concurrency int Number of concurrent layer operations to perform when interacting with a remote package. (default 3)
-h, --help help for publish
-k, --key string Path to private key file for signing packages
--key-pass string Password to the private key file used for publishing packages
```

## Options inherited from parent commands
Expand All @@ -36,6 +35,7 @@ zarf package publish ./path/to/dir oci://my-registry.com/my-namespace
-l, --log-level string Log level when running Zarf. Valid options are: warn, info, debug, trace (default "info")
--no-log-file Disable log file creation
--no-progress Disable fancy UI progress bars, spinners, logos, etc
--oci-concurrency int Number of concurrent layer operations to perform when interacting with a remote package. (default 3)
--tmpdir string Specify the temporary directory to use for intermediate files
--zarf-cache string Specify the location of the Zarf cache directory (default "~/.zarf-cache")
```
Expand Down
4 changes: 2 additions & 2 deletions docs/2-the-zarf-cli/100-cli-commands/zarf_package_pull.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ zarf package pull [REFERENCE] [flags]
```
-h, --help help for pull
-k, --key string Path to public key file for validating signed packages
--oci-concurrency int Number of concurrent layer operations to perform when interacting with a remote package. (default 3)
-o, --output-directory string Specify the output directory for the created Zarf package
-o, --output-directory string Specify the output directory for the pulled Zarf package
```

## Options inherited from parent commands
Expand All @@ -30,6 +29,7 @@ zarf package pull [REFERENCE] [flags]
-l, --log-level string Log level when running Zarf. Valid options are: warn, info, debug, trace (default "info")
--no-log-file Disable log file creation
--no-progress Disable fancy UI progress bars, spinners, logos, etc
--oci-concurrency int Number of concurrent layer operations to perform when interacting with a remote package. (default 3)
--tmpdir string Specify the temporary directory to use for intermediate files
--zarf-cache string Specify the location of the Zarf cache directory (default "~/.zarf-cache")
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ zarf package remove {PACKAGE_NAME|PACKAGE_FILE} [flags]
-l, --log-level string Log level when running Zarf. Valid options are: warn, info, debug, trace (default "info")
--no-log-file Disable log file creation
--no-progress Disable fancy UI progress bars, spinners, logos, etc
--oci-concurrency int Number of concurrent layer operations to perform when interacting with a remote package. (default 3)
--tmpdir string Specify the temporary directory to use for intermediate files
--zarf-cache string Specify the location of the Zarf cache directory (default "~/.zarf-cache")
```
Expand Down
38 changes: 24 additions & 14 deletions src/cmd/package.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,6 @@ var packageDeployCmd = &cobra.Command{
pkgClient := packager.NewOrDie(&pkgConfig)
defer pkgClient.ClearTempPaths()

pterm.Println()
Noxsios marked this conversation as resolved.
Show resolved Hide resolved

// Deploy the package
if err := pkgClient.Deploy(); err != nil {
message.Fatalf(err, "Failed to deploy package: %s", err.Error())
Expand Down Expand Up @@ -197,7 +195,7 @@ var packageRemoveCmd = &cobra.Command{
defer pkgClient.ClearTempPaths()

if err := pkgClient.Remove(pkgName); err != nil {
message.Fatalf(err, "Unable to remove the package with an error of: %#v", err)
message.Fatalf(err, "Unable to remove the package with an error of: %s", err.Error())
}
},
}
Expand All @@ -220,10 +218,16 @@ zarf package publish ./path/to/dir oci://my-registry.com/my-namespace
message.Fatalf(nil, "Registry must be prefixed with 'oci://'")
}
parts := strings.Split(strings.TrimPrefix(args[1], "oci://"), "/")
pkgConfig.PublishOpts.Reference = registry.Reference{
ref := registry.Reference{
Registry: parts[0],
Repository: strings.Join(parts[1:], "/"),
}
err := ref.ValidateRegistry()
if err != nil {
message.Fatalf(nil, "%s", err.Error())
}

pkgConfig.PublishOpts.PackageDestination = ref.String()

// Configure the packager
pkgClient := packager.NewOrDie(&pkgConfig)
Expand All @@ -245,7 +249,8 @@ var packagePullCmd = &cobra.Command{
if !utils.IsOCIURL(args[0]) {
message.Fatalf(nil, "Registry must be prefixed with 'oci://'")
}
pkgConfig.DeployOpts.PackagePath = choosePackage(args)

pkgConfig.PullOpts.PackageSource = args[0]

// Configure the packager
pkgClient := packager.NewOrDie(&pkgConfig)
Expand Down Expand Up @@ -295,6 +300,7 @@ func init() {
packageCmd.AddCommand(packagePublishCmd)
packageCmd.AddCommand(packagePullCmd)

bindPackageFlags()
bindCreateFlags()
bindDeployFlags()
bindInspectFlags()
Expand All @@ -303,14 +309,20 @@ func init() {
bindPullFlags()
}

func bindPackageFlags() {
packageFlags := packageCmd.PersistentFlags()
v.SetDefault(V_PKG_OCI_CONCURRENCY, 3)
packageFlags.IntVar(&config.CommonOptions.OCIConcurrency, "oci-concurrency", v.GetInt(V_PKG_OCI_CONCURRENCY), lang.CmdPackageFlagConcurrency)
}

func bindCreateFlags() {
createFlags := packageCreateCmd.Flags()

// Always require confirm flag (no viper)
createFlags.BoolVar(&config.CommonOptions.Confirm, "confirm", false, lang.CmdPackageCreateFlagConfirm)

v.SetDefault(V_PKG_CREATE_SET, map[string]string{})
v.SetDefault(V_PKG_CREATE_OUTPUT_DIR, "")
v.SetDefault(V_PKG_CREATE_OUTPUT, "")
v.SetDefault(V_PKG_CREATE_SBOM, false)
v.SetDefault(V_PKG_CREATE_SBOM_OUTPUT, "")
v.SetDefault(V_PKG_CREATE_SKIP_SBOM, false)
Expand All @@ -319,14 +331,17 @@ func bindCreateFlags() {

createFlags.StringVar(&pkgConfig.CreateOpts.DifferentialData.DifferentialPackagePath, "differential", v.GetString(V_PKG_CREATE_DIFFERENTIAL), lang.CmdPackageCreateFlagDifferential)
createFlags.StringToStringVar(&pkgConfig.CreateOpts.SetVariables, "set", v.GetStringMapString(V_PKG_CREATE_SET), lang.CmdPackageCreateFlagSet)
createFlags.StringVarP(&pkgConfig.CreateOpts.OutputDirectory, "output-directory", "o", v.GetString(V_PKG_CREATE_OUTPUT_DIR), lang.CmdPackageCreateFlagOutputDirectory)
createFlags.StringVarP(&pkgConfig.CreateOpts.Output, "output", "o", v.GetString(V_PKG_CREATE_OUTPUT), lang.CmdPackageCreateFlagOutput)
createFlags.StringVar(&pkgConfig.CreateOpts.Output, "output-directory", v.GetString(V_PKG_CREATE_OUTPUT), lang.CmdPackageCreateFlagOutput)
createFlags.BoolVarP(&pkgConfig.CreateOpts.ViewSBOM, "sbom", "s", v.GetBool(V_PKG_CREATE_SBOM), lang.CmdPackageCreateFlagSbom)
createFlags.StringVar(&pkgConfig.CreateOpts.SBOMOutputDir, "sbom-out", v.GetString(V_PKG_CREATE_SBOM_OUTPUT), lang.CmdPackageCreateFlagSbomOut)
createFlags.BoolVar(&pkgConfig.CreateOpts.SkipSBOM, "skip-sbom", v.GetBool(V_PKG_CREATE_SKIP_SBOM), lang.CmdPackageCreateFlagSkipSbom)
createFlags.IntVarP(&pkgConfig.CreateOpts.MaxPackageSizeMB, "max-package-size", "m", v.GetInt(V_PKG_CREATE_MAX_PACKAGE_SIZE), lang.CmdPackageCreateFlagMaxPackageSize)
createFlags.StringVarP(&pkgConfig.CreateOpts.SigningKeyPath, "key", "k", v.GetString(V_PKG_CREATE_SIGNING_KEY), lang.CmdPackageCreateFlagSigningKey)
createFlags.StringVar(&pkgConfig.CreateOpts.SigningKeyPassword, "key-pass", v.GetString(V_PKG_CREATE_SIGNING_KEY_PASSWORD), lang.CmdPackageCreateFlagSigningKeyPassword)
createFlags.StringToStringVar(&pkgConfig.CreateOpts.RegistryOverrides, "registry-override", v.GetStringMapString(V_PKG_CREATE_REGISTRY_OVERRIDE), lang.CmdPackageCreateFlagRegistryOverride)

createFlags.MarkHidden("output-directory")
}

func bindDeployFlags() {
Expand All @@ -342,14 +357,12 @@ func bindDeployFlags() {
v.SetDefault(V_PKG_DEPLOY_COMPONENTS, "")
v.SetDefault(V_PKG_DEPLOY_SHASUM, "")
v.SetDefault(V_PKG_DEPLOY_SGET, "")
v.SetDefault(V_PKG_PUBLISH_OCI_CONCURRENCY, 3)
v.SetDefault(V_PKG_DEPLOY_PUBLIC_KEY, "")

deployFlags.StringToStringVar(&pkgConfig.DeployOpts.SetVariables, "set", v.GetStringMapString(V_PKG_DEPLOY_SET), lang.CmdPackageDeployFlagSet)
deployFlags.StringVar(&pkgConfig.DeployOpts.Components, "components", v.GetString(V_PKG_DEPLOY_COMPONENTS), lang.CmdPackageDeployFlagComponents)
deployFlags.StringVar(&pkgConfig.DeployOpts.Shasum, "shasum", v.GetString(V_PKG_DEPLOY_SHASUM), lang.CmdPackageDeployFlagShasum)
deployFlags.StringVar(&pkgConfig.DeployOpts.SGetKeyPath, "sget", v.GetString(V_PKG_DEPLOY_SGET), lang.CmdPackageDeployFlagSget)
deployFlags.IntVar(&pkgConfig.PublishOpts.CopyOptions.Concurrency, "oci-concurrency", v.GetInt(V_PKG_PUBLISH_OCI_CONCURRENCY), lang.CmdPackagePublishFlagConcurrency)
deployFlags.StringVarP(&pkgConfig.DeployOpts.PublicKeyPath, "key", "k", v.GetString(V_PKG_DEPLOY_PUBLIC_KEY), lang.CmdPackageDeployFlagPublicKey)
}

Expand All @@ -369,16 +382,13 @@ func bindRemoveFlags() {

func bindPublishFlags() {
publishFlags := packagePublishCmd.Flags()
publishFlags.IntVar(&pkgConfig.PublishOpts.CopyOptions.Concurrency, "oci-concurrency", v.GetInt(V_PKG_PUBLISH_OCI_CONCURRENCY), lang.CmdPackagePublishFlagConcurrency)
publishFlags.StringVarP(&pkgConfig.PublishOpts.SigningKeyPath, "key", "k", v.GetString(V_PKG_PUBLISH_SIGNING_KEY), lang.CmdPackagePublishFlagSigningKey)
publishFlags.StringVar(&pkgConfig.PublishOpts.SigningKeyPassword, "key-pass", v.GetString(V_PKG_PUBLISH_SIGNING_KEY_PASSWORD), lang.CmdPackagePublishFlagSigningKeyPassword)
}

func bindPullFlags() {
pullFlags := packagePullCmd.Flags()
v.SetDefault(V_PKG_PULL_OUTPUT_DIR, "")
v.SetDefault(V_PKG_PULL_OCI_CONCURRENCY, 3)
pullFlags.StringVarP(&pkgConfig.PullOpts.OutputDirectory, "output-directory", "o", v.GetString(V_PKG_PULL_OUTPUT_DIR), lang.CmdPackageCreateFlagOutputDirectory)
pullFlags.IntVar(&pkgConfig.PullOpts.CopyOptions.Concurrency, "oci-concurrency", v.GetInt(V_PKG_PULL_OCI_CONCURRENCY), lang.CmdPackagePublishFlagConcurrency)
pullFlags.StringVarP(&pkgConfig.PullOpts.PublicKeyPath, "key", "k", v.GetString(V_PKG_PULL_PUBLIC_KEY), lang.CmdPackagePullPublicKey)
pullFlags.StringVarP(&pkgConfig.PullOpts.OutputDirectory, "output-directory", "o", v.GetString(V_PKG_PULL_OUTPUT_DIR), lang.CmdPackagePullFlagOutputDirectory)
pullFlags.StringVarP(&pkgConfig.PullOpts.PublicKeyPath, "key", "k", v.GetString(V_PKG_PULL_PUBLIC_KEY), lang.CmdPackagePullFlagPublicKey)
}
2 changes: 1 addition & 1 deletion src/cmd/tools/archiver.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ var archiverDecompressCmd = &cobra.Command{
sourceArchive, destinationPath := args[0], args[1]
err := archiver.Unarchive(sourceArchive, destinationPath)
if err != nil {
message.Fatal(err, lang.CmdToolsArchiverDecompressErr)
message.Fatalf(err, lang.CmdToolsArchiverDecompressErr, err.Error())
}

if unarchiveAll {
Expand Down
11 changes: 6 additions & 5 deletions src/cmd/viper.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,12 @@ const (
V_INIT_ARTIFACT_PUSH_USER = "init.artifact.push_username"
V_INIT_ARTIFACT_PUSH_TOKEN = "init.artifact.push_token"

// Package config keys
V_PKG_OCI_CONCURRENCY = "package.oci_concurrency"

// Package create config keys
V_PKG_CREATE_SET = "package.create.set"
V_PKG_CREATE_OUTPUT_DIR = "package.create.output_directory"
V_PKG_CREATE_OUTPUT = "package.create.output"
V_PKG_CREATE_SBOM = "package.create.sbom"
V_PKG_CREATE_SBOM_OUTPUT = "package.create.sbom_output"
V_PKG_CREATE_SKIP_SBOM = "package.create.skip_sbom"
Expand All @@ -69,14 +72,12 @@ const (
V_PKG_DEPLOY_PUBLIC_KEY = "package.deploy.public_key"

// Package publish config keys
V_PKG_PUBLISH_OCI_CONCURRENCY = "package.publish.oci_concurrency"
V_PKG_PUBLISH_SIGNING_KEY = "package.publish.signing_key"
V_PKG_PUBLISH_SIGNING_KEY_PASSWORD = "package.publish.signing_key_password"

// Package pull config keys
V_PKG_PULL_OCI_CONCURRENCY = "package.pull.oci_concurrency"
V_PKG_PULL_OUTPUT_DIR = "package.pull.output_directory"
V_PKG_PULL_PUBLIC_KEY = "package.pull.public_key"
V_PKG_PULL_OUTPUT_DIR = "package.pull.output_directory"
V_PKG_PULL_PUBLIC_KEY = "package.pull.public_key"
Noxsios marked this conversation as resolved.
Show resolved Hide resolved
)

func initViper() {
Expand Down
23 changes: 2 additions & 21 deletions src/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ const (
ZarfSBOMTar = "sboms.tar"
ZarfPackagePrefix = "zarf-package-"

ZarfComponentsDir = "components"

ZarfInClusterContainerRegistryNodePort = 31999

ZarfInClusterGitServiceURL = "http://zarf-gitea-http.zarf.svc.cluster.local:3000"
Expand All @@ -77,9 +79,6 @@ var (
// ZarfSeedPort is the NodePort Zarf uses for the 'seed registry'
ZarfSeedPort string

// Dirty Solution to getting the real time deployedComponents components.
deployedComponents []types.DeployedComponent

// SkipLogFile is a flag to skip logging to a file
SkipLogFile bool

Expand Down Expand Up @@ -155,24 +154,6 @@ func GetCraneAuthOption(username string, secret string) crane.Option {
}))
}

// GetDeployingComponents returns the list of deploying components.
// TODO: (@jeff-mccoy) this should be moved out of config.
func GetDeployingComponents() []types.DeployedComponent {
return deployedComponents
}

// SetDeployingComponents sets the list of deploying components.
// TODO: (@jeff-mccoy) this should be moved out of config.
func SetDeployingComponents(components []types.DeployedComponent) {
deployedComponents = components
}

// ClearDeployingComponents clears the list of deploying components.
// TODO: (@jeff-mccoy) this should be moved out of config.
func ClearDeployingComponents() {
deployedComponents = []types.DeployedComponent{}
}

// GetValidPackageExtensions returns the valid package extensions.
func GetValidPackageExtensions() [3]string {
return [...]string{".tar.zst", ".tar", ".zip"}
Expand Down
Loading