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

feat: integrated docs between uds and uds-cli #646

Merged
merged 26 commits into from
Jun 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
31 changes: 18 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,9 @@ There are 2 ways to create Bundles:
1. Inside an OCI registry: `uds create <dir> -o ghcr.io/defenseunicorns/dev`
1. Locally on your filesystem: `uds create <dir>`

> [!NOTE]
> The `--insecure` flag is necessary when interacting with a local registry, but not from secure, remote registries such as GHCR.
{{% alert-note %}}
The `--insecure` flag is necessary when interacting with a local registry, but not from secure, remote registries such as GHCR.
{{% /alert-note %}}

### Bundle Deploy

Expand Down Expand Up @@ -164,8 +165,9 @@ As an example: `uds remove uds-bundle-<name>.tar.zst --packages init,nginx`

### Logs

> [!NOTE]
> Only works with `uds deploy` for now, may work for other operations but isn't guaranteed.
{{% alert-note %}}
Only works with `uds deploy` for now, may work for other operations but isn't guaranteed.
{{% /alert-note %}}

The `uds logs` command can be used to view the most recent logs of a bundle operation. Note that depending on your OS temporary directory and file settings, recent logs are purged after a certain amount of time, so this command may return an error if the logs are no longer available.

Expand All @@ -186,8 +188,9 @@ UDS CLI supports multi-arch bundles. This means you can push bundles with differ

When deploying a local bundle, the bundle's architecture will be used for comparison against the cluster architecture to ensure compatibility. If deploying a remote bundle, by default the bundle is pulled based on system architecture, which is then checked against the cluster.

> [!NOTE]
> It is possible to override the bundle architecture used at validation time by using the `--architecture` / `-a` flag.
{{% alert-note %}}
It is possible to override the bundle architecture used at validation time by using the `--architecture` / `-a` flag.
{{% /alert-note %}}

If, for example, you have a multi-arch remote bundle that you want to deploy from an arm64 machine to an amd64 cluster, the validation with fail because the system arch does not match the cluster arch. However, you can pull the correct bundle version by specifying the arch with the command line architecture flag.

Expand Down Expand Up @@ -317,17 +320,19 @@ The naming conventions for deploying duplicate packages are as follows:
1. The duplicate packages must be deployed in different namespaces
1. In order to deploy duplicates of local packages, the `path` field must point to a Zarf package tarball instead of to a folder.

> [!NOTE]
> Today the duplicate packages feature is only supported for packages with Helm charts. This is because Helm charts' [namespaces can be overridden](docs/overrides.md#namespace) at deploy time.
{{% alert-note %}}
Today the duplicate packages feature is only supported for packages with Helm charts. This is because Helm charts' [namespaces can be overridden](docs/overrides.md#namespace) at deploy time.
{{% /alert-note %}}

## Zarf Integration

UDS CLI includes a vendored version of Zarf inside of its binary. To use Zarf, simply run `uds zarf <command>`. For example, to create a Zarf package, run `uds zarf create <dir>`, or to use the [airgap tooling](https://docs.zarf.dev/docs/the-zarf-cli/cli-commands/zarf_tools) that Zarf provides, run `uds zarf tools <cmd>`.

## Dev Mode

> [!NOTE]
> Dev mode is a BETA feature
{{% alert-note %}}
Dev mode is a BETA feature
{{% /alert-note %}}

Dev mode facilitates faster dev cycles when developing and testing bundles

Expand All @@ -350,9 +355,9 @@ The `dev deploy` command performs the following operations:

## Scan

> [!NOTE]
> Scan is an ALPHA feature.
> Trivy is a prerequisite for scanning container images and filesystem for vulnerabilities. You can find more information and installation instructions at [Trivy's official documentation](https://aquasecurity.github.io/trivy).
{{% alert-note %}}> Scan is an ALPHA feature.
Trivy is a prerequisite for scanning container images and filesystem for vulnerabilities. You can find more information and installation instructions at [Trivy's official documentation](https://aquasecurity.github.io/trivy).
{{% /alert-note %}}

The `scan` command is used to scan a Zarf package for vulnerabilities and generate a report. This command is currently in ALPHA.

Expand Down
12 changes: 12 additions & 0 deletions docs/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
title: Overview
linkTitle: UDS CLI
type: docs
menu:
main:
weight: 30
---

The [UDS CLI](https://github.com/defenseunicorns/uds-cli) is the primary interface for users to interact with various components within the UDS landscape. It streamlines the deployment process of mission applications and secure infrastructure, simplifying tasks involved in running mission applications while maintaining regulatory compliance in a unified and efficient manner.

The UDS CLI simplifies deployment by bundling multiple Zarf Packages into a single deployable artifact. This process ensures that UDS Bundles, which encompass infrastructure, platform, and mission applications, can be efficiently deployed within any Mission Hero's system environment. Additionally, the UDS CLI extends its capabilities to Pepr, where multiple Pepr applications are bundled and deployed as a single Pepr Module to support UDS Bundles during runtime.
4 changes: 0 additions & 4 deletions docs/anatomy.md

This file was deleted.

10 changes: 10 additions & 0 deletions docs/bundle-anatomy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
title: Bundle Anatomy
type: docs
weight: 6
---

## Bunble Anatomy
A UDS Bundle is an OCI artifact with the following form:

![](https://github.com/defenseunicorns/uds-cli/blob/main/docs/.images/uds-bundle.png?raw=true)
36 changes: 17 additions & 19 deletions docs/overrides.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,10 @@
# Bundle Overrides

---
title: Bundle Overrides
type: docs
weight: 5
---
Bundle overrides provide a mechanism to customize Helm charts inside of Zarf packages.

## Table of Contents

1. [Quickstart](#quickstart)
1. [Overrides](#variables)
- [Syntax](#syntax)
- [Values](#values)
- [Variables](#variables)
- [Namespace](#namespace)

## Quickstart

Consider the following `zarf.yaml` and `values.yaml` which deploys [podinfo](https://github.com/stefanprodan/podinfo)
Expand Down Expand Up @@ -152,6 +146,7 @@ The `value` is the value to set at the `path`. Values can be simple values such
```

#### Bundle Variables as Values

Bundle and Zarf variables can be used to set override values by using the syntax `${...}`. For example:
```yaml
# uds-config.yaml
Expand Down Expand Up @@ -242,8 +237,9 @@ There are 3 ways to override the `UI_COLOR` variable:

> **:warning: Warning**: Because Helm override variables and Zarf variables share the same --set syntax, be careful with variable names to avoid conflicts.

> [!NOTE]
> A variable that is not overridden by any of the methods above and has no default will be ignored.
{{% alert-note %}}
A variable that is not overridden by any of the methods above and has no default will be ignored.
{{% /alert-note %}}

#### Variable Precedence
Variable precedence is as follows:
Expand All @@ -255,8 +251,9 @@ Variable precedence is as follows:
#### Variable Types
Variables can be of either type `raw` or `file`. The type will default to raw if not set explicitly.

> [!WARNING]
> If a variable is set to accept a file as its value, but is missing the `file` type, then the file will not be processed.
{{% alert-caution %}}
If a variable is set to accept a file as its value, but is missing the `file` type, then the file will not be processed.
{{% /alert-caution %}}

```yaml
kind: UDSBundle
Expand Down Expand Up @@ -286,7 +283,7 @@ packages:

If a file path is not absolute, it will be set as relative to the `uds-config.yaml` directory.

e.g. the following `uds-config.yaml` is in [`src/test/bundles/07-helm-overrides/variable-files/`](../src/test/bundles/07-helm-overrides/variable-files/uds-config.yaml)
e.g. the following `uds-config.yaml` is in [`src/test/bundles/07-helm-overrides/variable-files/`](https://github.com/defenseunicorns/uds-cli/blob/main/src/test/bundles/07-helm-overrides/uds-config.yaml)
```yaml
variables:
helm-overrides:
Expand All @@ -297,10 +294,11 @@ This means when `test.cert` is evaluated it will first be appended to the config

If the file path is already set to the same relative path as the config, then no merging will take place.

> [!NOTE]
> UDS CLI does not encrypt or base64 encode any file contents before passing said data to Zarf or Helm.
> For example, if the file contains a key to be used in a Kubernetes secret, it must be base64 encoded before being ingested by UDS CLI.
{{% alert-note %}}
UDS CLI does not encrypt or base64 encode any file contents before passing said data to Zarf or Helm.

For example, if the file contains a key to be used in a Kubernetes secret, it must be base64 encoded before being ingested by UDS CLI.
{{% /alert-note %}}

### Namespace
It's also possible to specify a namespace for a packaged Helm chart to be installed in. For example, to deploy the a chart in the `custom-podinfo` namespace, you can specify the `namespace` in the `overrides` block:
Expand Down
Loading
Loading