diff --git a/.golangci.yml b/.golangci.yml index 2f57e4941c..d77ffbc441 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -1,9 +1,12 @@ run: timeout: 5m + skip-files: + - cli/internal/message/logo.go linters: enable-all: true disable: - exhaustivestruct + - lll - stylecheck - wrapcheck - wsl diff --git a/.vscode/launch.json b/.vscode/launch.json index 15d1f0f187..0301470393 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -1,21 +1,17 @@ { - // Use IntelliSense to learn about possible attributes. - // Hover to view descriptions of existing attributes. - // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 - "version": "0.2.0", - "configurations": [ - { - "name": "Launch", - "type": "go", - "request": "launch", - "mode": "auto", - "program": "${workspaceFolder}/cli", - "env": {}, - "args": [ - "connect", - "doom" - ] - }, - - ] + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "name": "Launch", + "type": "go", + "request": "launch", + "mode": "auto", + "program": "${workspaceFolder}/cli", + "env": {}, + "args": ["init", "--confirm", "-l=trace"] + } + ] } diff --git a/README.md b/README.md index 37a71e091a..b3f21374e6 100644 --- a/README.md +++ b/README.md @@ -10,13 +10,11 @@ Zarf runs on [a bunch of operating systems](./docs/supported-oses.md) and aims t [![asciicast](https://asciinema.org/a/475530.svg)](https://asciinema.org/a/475530) - ## Why is Zarf Needed? Most of the software ecosystem assumes your systems have access to the internet. The world (for good reasons) has become more and more dependent upon Software as a Service (SaaS), which assumes a robust connection to the internet and a willingness to inherently trust 3rd party providers. Although this makes sense for most of the world, there are certain SECURE systems that must operate either fully disconnected, semi-disconnected, or might need the ability to disconnect in case of emergencies (like while under an active cyber attack). Although only a small percentage of systems, these SECURE systems make up some of the most vital systems in the world, such as Aerospace and Defense, Finance, Healthcare, Energy, Water, Sewage, and many Federal, Local, and State Government systems. These SECURE systems need a way to continuously and securely deliver software too. Zarf exists to make it easy for open-source, commercial, and organic software solutions to be delivered to secure and disconnected systems. Although such systems might be small in number, they represent many of the most important systems in the world. - ## Explain Zarf Like I'm Ten(ish) Zarf allows you to bundle portions of "the internet" into a single package to be installed later following specific instructions. A Zarf package is really just a single file that includes everything you would need to manage a system or capability while fully disconnected. Think of a disconnected system as a system that always is or sometimes is on airplane mode. @@ -27,7 +25,6 @@ Such packages also become highly distributable, as they can now run on edge, emb Zarf makes DevSecOps for air gap possible. - + +nsnszarf-statezarf-sta...NodePort31999NodePort...zarfzarfpvcpvcpvpvscscclusteripsvcclusteri...rsrsdeploydeployZarf Gitops ServiceZarf Gitops Servicepodpodnodeportsvcnodeport...Zarf InjectorZarf Injectorpodfrom existingimagepod...Dynamic configmaps: n = tarball size / 512 KBDynamic configmaps:...DynamicNodePortDynamic...nsnsnsnspodpodrsrsdeploydeployZarf-Managed DeploymentsZarf-Managed DeploymentsnsnsImages updated to use 127.0.0.1:31999 and the Registry NodePort serviceImages updated to use 127.0.0.1:3...4. (Optional) Deploy the Zarf Gitops Service4. (Optional) Deploy the Zarf Gitops Service1. Create the Zarf State in the cluster1. Create the Zarf State in the cluster3. Deploy the Zarf Registry3. Deploy the Zarf Registry5. Deploy the Helm/Kustomize/raw YAML to the cluster5. Deploy the Helm/Kustomize/raw YAML to the clusterpodpodpvcpvcpvpvscscnodeportsvcnodeport...rsrsdeploydeployZarf Registry Zarf Registry 2. Launch the injector system2. Launch the injector systemZarf ResourceZarf ResourceZarf Temporary ResourceZarf Temporary ResourceZarf-Managed ResourceZarf-Managed ResourceZarf CLI to Cluster CommsZarf CLI to Cluster CommsImage Pull From Zarf RegistryImage Pull From Zarf RegistryStandard K8s CommsStandard K8s CommsStandard K8s Controller CommsStandard K8s Controller Commsinitial image pulled from zarf-injector nodeportinitial image pulled from zarf-injector nodeportPost registry boot all images pull from the registry Post registry boot all images pull from the registry Text is not SVG - cannot display \ No newline at end of file diff --git a/examples/eks.yaml b/examples/eks.yaml new file mode 100644 index 0000000000..7600f28008 --- /dev/null +++ b/examples/eks.yaml @@ -0,0 +1,11 @@ +# eksctl create cluster --config-file=eks.yaml +apiVersion: eksctl.io/v1alpha5 +kind: ClusterConfig +metadata: + region: us-east-1 + version: "1.21" +managedNodeGroups: +- instanceType: t3.small + minSize: 3 + maxSize: 6 + spot: true \ No newline at end of file diff --git a/examples/tiny-kafka/zarf.yaml b/examples/tiny-kafka/zarf.yaml index 6d3b6526b0..6620544118 100644 --- a/examples/tiny-kafka/zarf.yaml +++ b/examples/tiny-kafka/zarf.yaml @@ -2,6 +2,8 @@ kind: ZarfPackageConfig metadata: name: kafka-strimzi-demo description: "Demo tiny Zarf Kafka deployment" + # Big Bang / Iron Bank are only amd64 + architecture: amd64 components: - name: baseline diff --git a/injector/README.md b/injector/README.md new file mode 100644 index 0000000000..9278a4fc65 --- /dev/null +++ b/injector/README.md @@ -0,0 +1,18 @@ +Also pushed to dockerhub and can be verified/pulled via: + +## Local Verification: + +``` +sha256sum -c sha256sum +``` + +## Remote download / verification using [cosign](https://github.com/sigstore/cosign) + +``` +cosign verify --key ../cosign.pub defenseunicorns/zarf-injector:0.1.0 + +cosign verify --key ../cosign.pub defenseunicorns/zarf-registry:0.1.0 + +sget --key ../cosign.pub defenseunicorns/zarf-injector:0.1.0 > zarf-injector +sget --key ../cosign.pub defenseunicorns/zarf-registry:0.1.0 > zarf-registry +``` diff --git a/injector/sha256sum b/injector/sha256sum new file mode 100644 index 0000000000..243d29d111 --- /dev/null +++ b/injector/sha256sum @@ -0,0 +1,2 @@ +0760333922391c66d6aed089f194d650c10a35ac33d9f4acdead4b3ba57e561f zarf-injector +d050219fd28bc8af313adeb0c9ca988c4ef826eb4fe0757fb3f8a4444bf8d554 zarf-registry diff --git a/injector/stage1/.gitignore b/injector/stage1/.gitignore new file mode 100644 index 0000000000..9f970225ad --- /dev/null +++ b/injector/stage1/.gitignore @@ -0,0 +1 @@ +target/ \ No newline at end of file diff --git a/injector/stage1/Cargo.lock b/injector/stage1/Cargo.lock new file mode 100644 index 0000000000..852e1ed151 --- /dev/null +++ b/injector/stage1/Cargo.lock @@ -0,0 +1,214 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 3 + +[[package]] +name = "adler" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" + +[[package]] +name = "autocfg" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" + +[[package]] +name = "bitflags" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" + +[[package]] +name = "block-buffer" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0bf7fe51849ea569fd452f37822f606a5cabb684dc918707a0193fd4664ff324" +dependencies = [ + "generic-array", +] + +[[package]] +name = "cfg-if" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" + +[[package]] +name = "cpufeatures" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95059428f66df56b63431fdb4e1947ed2190586af5c5a8a8b71122bdf5a7f469" +dependencies = [ + "libc", +] + +[[package]] +name = "crc32fast" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "crypto-common" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57952ca27b5e3606ff4dd79b0020231aaf9d6aa76dc05fd30137538c50bd3ce8" +dependencies = [ + "generic-array", + "typenum", +] + +[[package]] +name = "digest" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2fb860ca6fafa5552fb6d0e816a69c8e49f0908bf524e30a90d97c85892d506" +dependencies = [ + "block-buffer", + "crypto-common", +] + +[[package]] +name = "filetime" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "975ccf83d8d9d0d84682850a38c8169027be83368805971cc4f238c2b245bc98" +dependencies = [ + "cfg-if", + "libc", + "redox_syscall", + "winapi", +] + +[[package]] +name = "flate2" +version = "1.0.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e6988e897c1c9c485f43b47a529cef42fde0547f9d8d41a7062518f1d8fc53f" +dependencies = [ + "cfg-if", + "crc32fast", + "libc", + "miniz_oxide", +] + +[[package]] +name = "generic-array" +version = "0.14.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fd48d33ec7f05fbfa152300fdad764757cbded343c1aa1cff2fbaf4134851803" +dependencies = [ + "typenum", + "version_check", +] + +[[package]] +name = "glob" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b919933a397b79c37e33b77bb2aa3dc8eb6e165ad809e58ff75bc7db2e34574" + +[[package]] +name = "libc" +version = "0.2.119" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bf2e165bb3457c8e098ea76f3e3bc9db55f87aa90d52d0e6be741470916aaa4" + +[[package]] +name = "miniz_oxide" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a92518e98c078586bc6c934028adcca4c92a53d6a958196de835170a01d84e4b" +dependencies = [ + "adler", + "autocfg", +] + +[[package]] +name = "redox_syscall" +version = "0.2.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8383f39639269cde97d255a32bdb68c047337295414940c68bdd30c2e13203ff" +dependencies = [ + "bitflags", +] + +[[package]] +name = "sha2" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55deaec60f81eefe3cce0dc50bda92d6d8e88f2a27df7c5033b42afeb1ed2676" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest", +] + +[[package]] +name = "tar" +version = "0.4.38" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4b55807c0344e1e6c04d7c965f5289c39a8d94ae23ed5c0b57aabac549f871c6" +dependencies = [ + "filetime", + "libc", + "xattr", +] + +[[package]] +name = "typenum" +version = "1.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dcf81ac59edc17cc8697ff311e8f5ef2d99fcbd9817b34cec66f90b6c3dfd987" + +[[package]] +name = "version_check" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" + +[[package]] +name = "winapi" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" +dependencies = [ + "winapi-i686-pc-windows-gnu", + "winapi-x86_64-pc-windows-gnu", +] + +[[package]] +name = "winapi-i686-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" + +[[package]] +name = "winapi-x86_64-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" + +[[package]] +name = "xattr" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "244c3741f4240ef46274860397c7c74e50eb23624996930e484c16679633a54c" +dependencies = [ + "libc", +] + +[[package]] +name = "zarf-injector" +version = "0.1.0" +dependencies = [ + "flate2", + "glob", + "sha2", + "tar", +] diff --git a/injector/stage1/Cargo.toml b/injector/stage1/Cargo.toml new file mode 100644 index 0000000000..73f52594b0 --- /dev/null +++ b/injector/stage1/Cargo.toml @@ -0,0 +1,18 @@ +[profile.release] +opt-level = "z" # Optimize for size. +lto = true +codegen-units = 1 +panic = "abort" + +[package] +name = "zarf-injector" +version = "0.1.0" +edition = "2021" + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] +glob = "0.3.0" +flate2 = "1.0.22" +tar = "0.4.38" +sha2 = "0.10.2" diff --git a/injector/stage1/README.md b/injector/stage1/README.md new file mode 100644 index 0000000000..64bdacfed6 --- /dev/null +++ b/injector/stage1/README.md @@ -0,0 +1,5 @@ +## Compile must be statically-linked with musl in order to fit as a configmap +``` +CC=/usr/bin/musl-gcc cargo build --release --target=x86_64-unknown-linux-musl +strip target/x86_64-unknown-linux-musl/release/zarf-injector +``` diff --git a/injector/stage1/src/main.rs b/injector/stage1/src/main.rs new file mode 100644 index 0000000000..3cc71dfe9b --- /dev/null +++ b/injector/stage1/src/main.rs @@ -0,0 +1,81 @@ +use flate2::read::GzDecoder; +use glob::glob; +use sha2::{Digest, Sha256}; +use std::env; +use std::fs::File; +use std::io::Read; +use std::io::Write; +use std::path::PathBuf; +use tar::Archive; + +// Inspired by https://medium.com/@nlauchande/rust-coding-up-a-simple-concatenate-files-tool-and-first-impressions-a8cbe680e887 + +// read the binary contents of a file +fn get_file(path: &PathBuf) -> std::io::Result> { + // open the file + let mut f = File::open(path)?; + // create an empty buffer + let mut buffer = Vec::new(); + + // read the whole file + match f.read_to_end(&mut buffer) { + Ok(_) => Ok(buffer), + Err(e) => Err(e), + } +} + +// merge all given files into one buffer +fn collect_binary_data(paths: &Vec) -> std::io::Result> { + // create an empty buffer + let mut buffer = Vec::new(); + + // add contents of all files in paths to buffer + for path in paths { + println!("Processing {}", path.display()); + let new_content = get_file(&path); + buffer + .write(&new_content.unwrap()) + .expect("Could not add the file contents to the merged file buffer"); + } + + Ok(buffer) +} + +fn main() { + let args: Vec = env::args().collect(); + + // get the list of file matches to merge + let file_partials: Result, _> = glob("zarf-payload-*") + .expect("Failed to read glob pattern") + .collect(); + + let mut file_partials = file_partials.unwrap(); + + // ensure a default sort-order + file_partials.sort(); + + // get a buffer of the final merged file contents + let contents = collect_binary_data(&file_partials).unwrap(); + + // @todo: finish testing/use sha256sum + if args.len() > 1 { + let sha_sum = &args[1]; + + // create a Sha256 object + let mut hasher = Sha256::new(); + + // write input message + hasher.update(&contents); + + // read hash digest and consume hasher + let result = hasher.finalize(); + + assert_eq!(result[..], sha_sum.as_bytes()[..]); + } + + let tar = GzDecoder::new(&contents[..]); + let mut archive = Archive::new(tar); + archive + .unpack("/zarf-stage2") + .expect("Unable to unarchive the resulting tarball"); +} diff --git a/injector/stage2/Makefile b/injector/stage2/Makefile new file mode 100644 index 0000000000..49fc5f9b1f --- /dev/null +++ b/injector/stage2/Makefile @@ -0,0 +1,2 @@ +build-bootstrap-registry: + CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags="-s -w" -o zarf-registry registry.go diff --git a/injector/stage2/registry.go b/injector/stage2/registry.go new file mode 100644 index 0000000000..c15d1934bb --- /dev/null +++ b/injector/stage2/registry.go @@ -0,0 +1,106 @@ +package main + +import ( + "context" + "log" + "os" + "os/signal" + "runtime" + "syscall" + + "github.com/google/go-containerregistry/pkg/crane" + v1 "github.com/google/go-containerregistry/pkg/v1" + + "github.com/distribution/distribution/v3/configuration" + "github.com/distribution/distribution/v3/registry" + _ "github.com/distribution/distribution/v3/registry/auth/htpasswd" // used for embedded registry + _ "github.com/distribution/distribution/v3/registry/storage/driver/filesystem" // used for embedded registry +) + +const ( + Version = "0.1.0" + ZarfSeedReadPort = "5000" + ZarfSeedWriteTarget = "127.0.0.1:5001" +) + +func main() { + log.Printf("Zarf Injector Stage 2 version %s\n", Version) + + path, seedImage, targetImage := os.Args[1], os.Args[2], os.Args[3] + + // Launch the embedded registry to load the seed images (r/w mode) + startSeedRegistry(false) + + cranePlatform := crane.WithPlatform(&v1.Platform{OS: "linux", Architecture: runtime.GOARCH}) + + log.Printf("Updating image %s\n", seedImage) + img, err := crane.LoadTag(path, seedImage, cranePlatform) + if err != nil { + log.Fatalf("Unable to load the image from the update package: %s", err) + } + + err = crane.Push(img, targetImage, cranePlatform) + if err != nil { + log.Fatalf("Unable to push the image to the registry: %s", err) + } + + // Now start the registry read-only and wait for exit + startSeedRegistry(true) + + // Keep this open until an interrupt signal is received + c := make(chan os.Signal) + signal.Notify(c, os.Interrupt, syscall.SIGTERM) + go func() { + <-c + os.Exit(0) + }() + + for { + runtime.Gosched() + } +} + +func startSeedRegistry(readOnly bool) { + log.Printf("packager.startSeedRegistry(%v)\n", readOnly) + registryConfig := &configuration.Configuration{} + + registryConfig.Log.Level = "debug" + registryConfig.HTTP.DrainTimeout = 0 + + fileStorage := configuration.Parameters{ + "rootdirectory": ".zarf-registry", + } + + if readOnly { + // Read-only binds to all addresses + registryConfig.HTTP.Addr = ":" + ZarfSeedReadPort + registryConfig.Storage = configuration.Storage{ + "filesystem": fileStorage, + "maintenance": configuration.Parameters{ + "readonly": map[interface{}]interface{}{ + "enabled": true, + }, + }, + } + } else { + // Read-write only listen on localhost + registryConfig.HTTP.Addr = ZarfSeedWriteTarget + registryConfig.Storage = configuration.Storage{ + "filesystem": fileStorage, + } + } + + log.Print(registryConfig) + + embeddedRegistry, err := registry.NewRegistry(context.TODO(), registryConfig) + if err != nil { + log.Fatalf("Unable to start the embedded registry: %s", err) + } + + go func() { + if err := embeddedRegistry.ListenAndServe(); err != nil { + log.Fatalf("Unable to start the embedded registry: %s", err) + } + }() + +} diff --git a/injector/zarf-injector b/injector/zarf-injector new file mode 100755 index 0000000000..0bb0b3bf2b Binary files /dev/null and b/injector/zarf-injector differ diff --git a/injector/zarf-registry b/injector/zarf-registry new file mode 100755 index 0000000000..11e4e2652d Binary files /dev/null and b/injector/zarf-registry differ diff --git a/test/e2e/common.go b/test/e2e/common.go index 8cbaf61ad5..dd0b5e9f36 100644 --- a/test/e2e/common.go +++ b/test/e2e/common.go @@ -122,7 +122,7 @@ func (e2e *ZarfE2ETest) tearDownKind() error { // Delete the cluster and kubeconfig file provider := cluster.NewProvider(cluster.ProviderWithLogger(kindcmd.NewLogger())) err := provider.Delete(e2e.clusterName, e2e.kubeconfigPath) - os.Remove(e2e.kubeconfigPath) + _ = os.Remove(e2e.kubeconfigPath) return err } @@ -150,7 +150,7 @@ func (e2e *ZarfE2ETest) setUpK3D() error { func (e2e *ZarfE2ETest) tearDownK3D() error { deleteClusterCommand := k3dcluster.NewCmdClusterDelete() err := deleteClusterCommand.ExecuteContext(context.TODO()) - os.Remove(e2e.kubeconfigPath) + _ = os.Remove(e2e.kubeconfigPath) return err } @@ -161,7 +161,7 @@ func (e2e *ZarfE2ETest) setUpK3s() error { func (e2e *ZarfE2ETest) tearDownK3s() error { e2e.initWithK3s = false - os.Remove(e2e.kubeconfigPath) + _ = os.Remove(e2e.kubeconfigPath) return nil } diff --git a/test/e2e/e2e_general_cli_test.go b/test/e2e/e2e_general_cli_test.go index 539c0769a9..b37aaaddda 100644 --- a/test/e2e/e2e_general_cli_test.go +++ b/test/e2e/e2e_general_cli_test.go @@ -19,7 +19,7 @@ func TestGeneralCLI(t *testing.T) { testfile, _ := os.Create(shasumTestFilePath) cmd := exec.Command("echo", "random test data 🦄") cmd.Stdout = testfile - cmd.Run() + _ = cmd.Run() e2e.filesToRemove = append(e2e.filesToRemove, shasumTestFilePath) output, err := e2e.execZarfCommand("prepare", "sha256sum", shasumTestFilePath) diff --git a/test/e2e/main_test.go b/test/e2e/main_test.go index aaf572751a..6752539c28 100644 --- a/test/e2e/main_test.go +++ b/test/e2e/main_test.go @@ -16,7 +16,6 @@ type testSuite struct { var ( e2e ZarfE2ETest - static string distroTests = map[string]testSuite{ "k3d": { standard: true, @@ -78,6 +77,7 @@ func TestMain(m *testing.M) { // Setup the cluster err := testSuiteFunctions.setupFunction() + // nolint defer testSuiteFunctions.tearDownFunction() if err != nil { fmt.Printf("Unable to setup %s environment to run the e2e test because of err: %v\n", distroName, err) diff --git a/zarf.schema.json b/zarf.schema.json index 479f232e0d..87cbd967c2 100644 --- a/zarf.schema.json +++ b/zarf.schema.json @@ -119,6 +119,10 @@ "scripts": { "$schema": "http://json-schema.org/draft-04/schema#", "$ref": "#/definitions/ZarfComponentScripts" + }, + "import": { + "$schema": "http://json-schema.org/draft-04/schema#", + "$ref": "#/definitions/ZarfImport" } }, "additionalProperties": false, @@ -213,6 +217,18 @@ "additionalProperties": false, "type": "object" }, + "ZarfImport": { + "required": [ + "path" + ], + "properties": { + "path": { + "type": "string" + } + }, + "additionalProperties": false, + "type": "object" + }, "ZarfManifest": { "required": [ "name" @@ -295,10 +311,7 @@ "type": "array" }, "seed": { - "items": { - "type": "string" - }, - "type": "array" + "type": "string" } }, "additionalProperties": false, diff --git a/zarf.yaml b/zarf.yaml index 064405c469..377e412963 100644 --- a/zarf.yaml +++ b/zarf.yaml @@ -2,9 +2,9 @@ kind: ZarfInitConfig metadata: name: Zarf Official Init Package description: "Used to establish a new Zarf cluster" + architecture: amd64 -seed: - - library/registry:2.7.1 +seed: library/registry:2.7.1 components: - name: k3s @@ -24,10 +24,6 @@ components: # Configure K3s systemd service - "systemctl daemon-reload" - "systemctl enable --now k3s" - # Wait for the K3s node to come up - - "/usr/sbin/kubectl get nodes" - # Make sure things are really ready in k8s - - "/usr/sbin/kubectl wait --for=condition=available deployment/coredns -n kube-system" files: # Include the actual K3s binary - source: https://github.com/k3s-io/k3s/releases/download/v1.21.6+k3s1/k3s @@ -72,7 +68,7 @@ components: - name: container-registry required: true manifests: - - name: kep-1775-registry-annotation + - name: kep-1755-registry-annotation files: - assets/manifests/registry/configmap.yaml charts: