From fcc882bd6874a53234ba7f4de983d540f4e5da75 Mon Sep 17 00:00:00 2001 From: Andy Roth Date: Sat, 25 Mar 2023 17:44:41 -0700 Subject: [PATCH 1/6] Update CODEOWNERS (#1478) Remove myself from CODEOWNERS. I'm not as involved in the development of Zarf as I used to be. I'll still be able to add input and PRs as necessary just not as a codeowner. --- CODEOWNERS | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CODEOWNERS b/CODEOWNERS index f0c19fdc79..39ed6f0340 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -2,9 +2,9 @@ # Docs & examples /adr/ @jeff-mccoy @YrrepNoj @Racer159 -/docs/ @Madeline-UX @JasonvanBrackel @RothAndrew @jeff-mccoy @YrrepNoj @Racer159 @wirewc -/examples/ @JasonvanBrackel @RothAndrew @jeff-mccoy @YrrepNoj @Racer159 @wirewc -*.md @Madeline-UX @JasonvanBrackel @RothAndrew @jeff-mccoy @YrrepNoj @Racer159 @wirewc +/docs/ @Madeline-UX @JasonvanBrackel @jeff-mccoy @YrrepNoj @Racer159 @wirewc +/examples/ @JasonvanBrackel @jeff-mccoy @YrrepNoj @Racer159 @wirewc +*.md @Madeline-UX @JasonvanBrackel @jeff-mccoy @YrrepNoj @Racer159 @wirewc # Core code /src/ @jeff-mccoy @YrrepNoj @Racer159 From f5d73a7da6dcefbc2f36dff64037e938140e68a6 Mon Sep 17 00:00:00 2001 From: Danny Gershman Date: Mon, 27 Mar 2023 12:40:19 -0400 Subject: [PATCH 2/6] bigbang cert update (#1471) ## Description This updates the certificate for Big Bang which expired on February 25th. ## Related Issue No ticket was raised for this, but caught on the latest pull from `main` today. ## Type of change - [ ] Bug fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [x] Other (security config, docs update, etc) ## Checklist before merging - [X] Test, docs, adr added or updated as needed - [x] [Contributor Guide Steps](https://github.com/defenseunicorns/zarf/blob/main/CONTRIBUTING.md#developer-workflow) followed --- examples/big-bang/config/ingress.yaml | 79 ++++++++++++++++++--------- 1 file changed, 53 insertions(+), 26 deletions(-) diff --git a/examples/big-bang/config/ingress.yaml b/examples/big-bang/config/ingress.yaml index 733bb881d8..0ceaa53056 100644 --- a/examples/big-bang/config/ingress.yaml +++ b/examples/big-bang/config/ingress.yaml @@ -7,36 +7,63 @@ istio: tls: # certs for *.bigbang.dev key: | -----BEGIN PRIVATE KEY----- - MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgbI4SyUc4dXDvtm/x - PxxrC7qjmb2Kxit/ZphilhOoUF+hRANCAARBXS6lFbqcDFR5VUzihkUshJ7yX2s7 - cXFqUD0ChkmsDnT+igae9xg6hEnz83JaTr4YAqJhEpI2B0ZLcVa4kMkw + MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQDDvKUzWiZucm6/ + 8D2Nx4KVe8t6uHtARpw112f4yGv7xKcOJkbxLbVtor8pj/HS5tRSZq2ziIQl9y98 + 8TVAOBezgzPPMDxOqDeyHl5gAtqzpK/eSPmueZIhR88BH2+SMYqa5kxmjn752Rf0 + jVeCrVdQ5MD9rqA00oQi/zO+gQQoz6QSuiEQ2pSKYB3gv9oIoJorIU1n4qLYAezn + TvFwjmKWPPhRdyslpcAi1rVO+mVX3Y2DKU/CfpWNFVVT+H788Srn4yP6iWUymfQU + vHOXII1erMnES2H9BDffumrRf3m3IpgueQ3vPhB8ftjFZozURj2t/WSeaKsyQSoZ + Wr99DWxpAgMBAAECggEAAW8ARsACSAzOgtlfmgo8Cpw9gUiYnn/l5P8O4+OT5uQp + 1RCytFGBYqwuej9zpffK1k+qNgZp8V0+G8wod6/xfH8Zggr4ZhsVTVirmEhtEaPD + Jf2i1oRNbbD48yknyApU2Y2WQaoJhArzAfeHDI34db83KqR8x+ZC0X7NAjgvr5zS + b0OfY2tht4oxEWh2m67FzlFgF+cWyszRYyfvHfOFBqLesuCnSfMoOzmbT3SlnxHo + 6GSa1e/kCJVzFJ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ERTIFICATE----- MIIFFjCCAv6gAwIBAgIRAJErCErPDBinU/bWLiWnX1owDQYJKoZIhvcNAQELBQAw From c20f611568b6e3fe159fa35891c26e0d302367f4 Mon Sep 17 00:00:00 2001 From: Jessy-Morris <123977818+Jessy-Morris@users.noreply.github.com> Date: Mon, 27 Mar 2023 13:00:09 -0400 Subject: [PATCH 3/6] Docs edits for "Understand the Basics" (#1485) ## Description Editing the "Understand the Basics" page to align with the updated style-guide. - Ensure title headings are consistent - Fix formatting when using a "/" - Fix text linking for air-gapped systems under "Terms Used" - Remove "&", and replace with "and" ## Related Issue Fixes #1484 ## Type of change - [ ] Bug fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [X] Other (security config, docs update, etc) ## Checklist before merging - [X] Test, docs, adr added or updated as needed - [X] [Contributor Guide Steps](https://github.com/defenseunicorns/zarf/blob/main/CONTRIBUTING.md#developer-workflow) followed Co-authored-by: Wayne Starr --- docs/1-understand-the-basics.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/1-understand-the-basics.md b/docs/1-understand-the-basics.md index a4867f7620..614ff64d67 100644 --- a/docs/1-understand-the-basics.md +++ b/docs/1-understand-the-basics.md @@ -1,4 +1,4 @@ -# Understand The Basics +# Understand the Basics Before you can effectively use Zarf, it is useful to have an understanding of the technology Zarf is built on and around. The sections below provide some helpful links to start building up this foundation as well as a glossary of the terms used in this project. @@ -18,7 +18,7 @@ Before you can effectively use Zarf, it is useful to have an understanding of th - [What is AirGap](https://ibm.github.io/kubernetes-networking/vpc/airgap/) - AirGap Kubernetes Course - Coming Soon! -## GitOps Basics +### GitOps Basics - [CloudBees GitOps Definition](https://www.cloudbees.com/gitops/what-is-gitops) - [Understanding Git](https://hackernoon.com/understanding-git-fcffd87c15a3) @@ -31,9 +31,9 @@ Before you can effectively use Zarf, it is useful to have an understanding of th ## Terms Used -- **Declarative**: A user states (via configuration file) which resources are needed and Zarf locates & packages them. A user does not have to know _how_ to download, collect, roll, and unroll dependencies for transport, they only have to know _what_ they need. -- **Package**: A well-defined, tool-generated, versioned, and compressed collection of software intended for movement (and later use) across a network / administrative boundary. -- **Remote systems**: Systems that are organized such that development & maintenance actions occur _primarily_ in locations physically & logically separate from where operations occur. -- **Constrained systems**: Systems with explicit resource / administrative / capability limitations. +- **Declarative**: A user states (via configuration file) which resources are needed and Zarf locates and packages them. A user does not have to know _how_ to download, collect, roll, and unroll dependencies for transport, they only have to know _what_ they need. +- **Package**: A well-defined, tool-generated, versioned, and compressed collection of software intended for movement (and later use) across a network/administrative boundary. +- **Remote systems**: Systems that are organized such that development and maintenance actions occur _primarily_ in locations physically and logically separate from where operations occur. +- **Constrained systems**: Systems with explicit resource/administrative/capability limitations. - **Independent systems**: Systems are organized such that continued operation is possible even when disconnected (temporarily or otherwise) from external systems dependencies. -- **Air-gapped systems**: Systems are designed to operate while _physically disconnected_ from "unsecured" networks like the internet. More on that [here](). +- **Air-gapped systems**: Systems are designed to operate while _physically disconnected_ from "unsecured" networks like the internet. For more information, see [Air Gap Networking](). From fb59f0b24987e7e92a5d96011de487d18fab675b Mon Sep 17 00:00:00 2001 From: Lucas Rodriguez Date: Mon, 27 Mar 2023 12:50:35 -0500 Subject: [PATCH 4/6] Update schema docs to include information about OCI registries for helm charts (#1464) ## Description - Updates schema docs to include information about OCI registries for helm charts - Updates contributing guide to include information about regenerating schema and docs when an update to the docs is made ## Related Issue Fixes #1463 ## Type of change - [x] Other (security config, docs update, etc) ## Checklist before merging - [x] Test, docs, adr added or updated as needed - [x] [Contributor Guide Steps](https://github.com/defenseunicorns/zarf/blob/main/CONTRIBUTING.md#developer-workflow) followed --------- Co-authored-by: Wayne Starr --- CONTRIBUTING.md | 6 ++++++ docs/4-user-guide/3-zarf-schema.md | 7 ++++++- src/types/component.go | 2 +- src/ui/lib/api-types.ts | 3 +-- zarf.schema.json | 7 ++++++- 5 files changed, 20 insertions(+), 5 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 8406d23de0..127dced861 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -46,6 +46,12 @@ You can learn more about the testing of Zarf [here](docs/6-developer-guide/2-tes ## Documentation +### Updating Our Documentation + +Our documentation is auto-generated from the `src/types` and `src/cmd` go packages. This includes the [Zarf package jsonschema](https://github.com/defenseunicorns/zarf/blob/main/zarf.schema.json), the [Zarf schema docs](https://docs.zarf.dev/docs/user-guide/zarf-schema), the [Zarf CLI docs](https://docs.zarf.dev/docs/user-guide/the-zarf-cli/), and our [front-end API types](https://github.com/defenseunicorns/zarf/blob/main/src/ui/lib/api-types.ts). When an update to types or the CLI commands is made you will need to run `make docs-and-schema` locally to regenerate the schema and documentation. CI checks if this was ran, and will fail if it wasn't. + +We do this so that there is a git commit signature from a person on the commit for better traceability, rather than a non-person entity (e.g. GitHub CI token). + ### Architecture Decision Records (ADR) We've chosen to use ADRs to document architecturally significant decisions. We primarily use the guidance found in [this article by Michael Nygard](http://thinkrelevance.com/blog/2011/11/15/documenting-architecture-decisions) with a couple of tweaks: diff --git a/docs/4-user-guide/3-zarf-schema.md b/docs/4-user-guide/3-zarf-schema.md index b8b01d7132..d84d5ddeac 100644 --- a/docs/4-user-guide/3-zarf-schema.md +++ b/docs/4-user-guide/3-zarf-schema.md @@ -1748,12 +1748,17 @@ Must be one of:  
-**Description:** The URL of the chart repository or git url if the chart is using a git repo instead of helm repo +**Description:** The URL of the OCI registry, chart repository, or git repo where the helm chart is stored | | | | -------- | -------- | | **Type** | `string` | +**Examples:** + + +"OCI registry: oci://ghcr.io/stefanprodan/charts/podinfo", "helm chart repo: https://stefanprodan.github.io/podinfo", "git repo: https://github.com/stefanprodan/podinfo" +
diff --git a/src/types/component.go b/src/types/component.go index af367dcacf..61a6d7c356 100644 --- a/src/types/component.go +++ b/src/types/component.go @@ -86,7 +86,7 @@ type ZarfFile struct { type ZarfChart struct { Name string `json:"name" jsonschema:"description=The name of the chart to deploy; this should be the name of the chart as it is installed in the helm repo"` ReleaseName string `json:"releaseName,omitempty" jsonschema:"description=The name of the release to create; defaults to the name of the chart"` - URL string `json:"url,omitempty" jsonschema:"oneof_required=url,description=The URL of the chart repository or git url if the chart is using a git repo instead of helm repo"` + URL string `json:"url,omitempty" jsonschema:"oneof_required=url,example=OCI registry: oci://ghcr.io/stefanprodan/charts/podinfo,example=helm chart repo: https://stefanprodan.github.io/podinfo,example=git repo: https://github.com/stefanprodan/podinfo" jsonschema_description:"The URL of the OCI registry, chart repository, or git repo where the helm chart is stored"` Version string `json:"version" jsonschema:"description=The version of the chart to deploy; for git-based charts this is also the tag of the git repo"` Namespace string `json:"namespace" jsonschema:"description=The namespace to deploy the chart to"` ValuesFiles []string `json:"valuesFiles,omitempty" jsonschema:"description=List of values files to include in the package; these will be merged together"` diff --git a/src/ui/lib/api-types.ts b/src/ui/lib/api-types.ts index 0aa26054f3..b3fc348faa 100644 --- a/src/ui/lib/api-types.ts +++ b/src/ui/lib/api-types.ts @@ -490,8 +490,7 @@ export interface ZarfChart { */ releaseName?: string; /** - * The URL of the chart repository or git url if the chart is using a git repo instead of - * helm repo + * The URL of the OCI registry, chart repository, or git repo where the helm chart is stored */ url?: string; /** diff --git a/zarf.schema.json b/zarf.schema.json index 45160499c1..92a2260ac9 100644 --- a/zarf.schema.json +++ b/zarf.schema.json @@ -127,7 +127,12 @@ }, "url": { "type": "string", - "description": "The URL of the chart repository or git url if the chart is using a git repo instead of helm repo" + "description": "The URL of the OCI registry, chart repository, or git repo where the helm chart is stored", + "examples": [ + "OCI registry: oci://ghcr.io/stefanprodan/charts/podinfo", + "helm chart repo: https://stefanprodan.github.io/podinfo", + "git repo: https://github.com/stefanprodan/podinfo" + ] }, "version": { "type": "string", From ff8b5d617040ff429dac105dd0afe41b6ee9cc32 Mon Sep 17 00:00:00 2001 From: Danny Gershman Date: Mon, 27 Mar 2023 14:32:24 -0400 Subject: [PATCH 5/6] Adding Gitea Virtual Service to Big Bang example (#1475) ## Description I thought I would expand the example by showing a relevant and useful addition. Since Gitlab is typically deployed with Big Bang, this would give somewhat of an equivalent feel to be able to not have to worry about setting up a proxy forward for the service for Gitea. ## Related Issue N/A ## Type of change - [ ] Bug fix (non-breaking change which fixes an issue) - [x] New feature (non-breaking change which adds functionality) - [ ] Other (security config, docs update, etc) ## Checklist before merging - [ ] Test, docs, adr added or updated as needed - [ ] [Contributor Guide Steps](https://github.com/defenseunicorns/zarf/blob/main/CONTRIBUTING.md#developer-workflow) followed --- examples/big-bang/virtualservices/gitea.yaml | 16 ++++++++++++++++ examples/big-bang/zarf.yaml | 9 +++++++++ 2 files changed, 25 insertions(+) create mode 100644 examples/big-bang/virtualservices/gitea.yaml diff --git a/examples/big-bang/virtualservices/gitea.yaml b/examples/big-bang/virtualservices/gitea.yaml new file mode 100644 index 0000000000..713d683055 --- /dev/null +++ b/examples/big-bang/virtualservices/gitea.yaml @@ -0,0 +1,16 @@ +apiVersion: networking.istio.io/v1alpha3 +kind: VirtualService +metadata: + name: gitea + namespace: zarf +spec: + gateways: + - istio-system/public + hosts: + - gitea.###ZARF_VAR_DOMAIN### + http: + - route: + - destination: + host: zarf-gitea-http.zarf.svc.cluster.local + port: + number: 3000 diff --git a/examples/big-bang/zarf.yaml b/examples/big-bang/zarf.yaml index e1591dd85d..efaa4b7b40 100644 --- a/examples/big-bang/zarf.yaml +++ b/examples/big-bang/zarf.yaml @@ -27,3 +27,12 @@ components: - config/loki.yaml # Values are merged in order, so this would override the above and disable everything if uncommented # - config/disable-all.yaml + - name: gitea-virtual-service + description: > + Expose the internal Zarf Gitea server through the Big Bang Istio deployment via a virtual service. + (only applies if you are using the Zarf-provided Gitea deployment - not an externally configured git host) + manifests: + - name: gitea + namespace: zarf + files: + - virtualservices/gitea.yaml From d9d0dc6a4e054f3859ab734bf6fd02938353129d Mon Sep 17 00:00:00 2001 From: Jonathan Perry Date: Mon, 27 Mar 2023 14:58:24 -0400 Subject: [PATCH 6/6] update calculation for the expected bytes during image layer pulls (#1489) ## Description The progress bar 'expected bytes' now takes duplicate layers into account Fixes #1488 Signed-off-by: Jon Perry Co-authored-by: Wayne Starr --- src/internal/packager/images/pull.go | 17 ++++++++++++++--- src/pkg/packager/network.go | 7 ++++++- 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/src/internal/packager/images/pull.go b/src/internal/packager/images/pull.go index 28ee34b61f..0e697a5826 100644 --- a/src/internal/packager/images/pull.go +++ b/src/internal/packager/images/pull.go @@ -70,6 +70,7 @@ func (i *ImgConfig) PullAll() error { } totalBytes := int64(0) + processedLayers := make(map[string]bool) for src, img := range imageMap { tag, err := name.NewTag(src, name.WeakValidation) if err != nil { @@ -82,11 +83,21 @@ func (i *ImgConfig) PullAll() error { return fmt.Errorf("unable to get layers for image %s: %w", src, err) } for _, layer := range layers { - size, err := layer.Size() + layerDigest, err := layer.Digest() if err != nil { - return fmt.Errorf("unable to get size of layer: %w", err) + return fmt.Errorf("unable to get digest for image layer: %w", err) } - totalBytes += size + + // Only calculate this layer size if we haven't already looked at it + if !processedLayers[layerDigest.Hex] { + size, err := layer.Size() + if err != nil { + return fmt.Errorf("unable to get size of layer: %w", err) + } + totalBytes += size + processedLayers[layerDigest.Hex] = true + } + } } spinner.Updatef("Preparing image sources and cache for image pulling") diff --git a/src/pkg/packager/network.go b/src/pkg/packager/network.go index 4ddb688a75..b9eb25dca2 100644 --- a/src/pkg/packager/network.go +++ b/src/pkg/packager/network.go @@ -252,8 +252,13 @@ func getOCIPackageSize(src *utils.OrasRemote, ref registry.Reference) (int64, er layers = manifest.Layers } + processedLayers := make(map[string]bool) for _, layer := range layers { - total += layer.Size + // Only include this layer's size if we haven't already processed it + if !processedLayers[layer.Digest.String()] { + total += layer.Size + processedLayers[layer.Digest.String()] = true + } } return total, nil