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

1168 review docs examples #1741

Merged
merged 87 commits into from
Jun 1, 2023
Merged
Show file tree
Hide file tree
Changes from 74 commits
Commits
Show all changes
87 commits
Select commit Hold shift + click to select a range
d8d3856
update bb yolo example
Noxsios May 22, 2023
77b4bc2
add wait-for to zarf init pkg
Noxsios May 22, 2023
5eb23e9
more waits
Noxsios May 22, 2023
8cdd095
Merge branch 'main' into 1168-review-docs-examples
Noxsios May 22, 2023
17cbe0b
more waits
Noxsios May 22, 2023
d9eb91a
lint
Noxsios May 22, 2023
9393b44
consistent quoting
Noxsios May 22, 2023
f0191e8
better calling of zarf cli in upgrade_test
Noxsios May 22, 2023
27c67b4
update examples
Noxsios May 22, 2023
25fee89
Merge branch 'main' into 1168-review-docs-examples
Noxsios May 22, 2023
ab49d8d
o boi
Noxsios May 23, 2023
857aa35
e2e.ZarfWithConfirm
Noxsios May 23, 2023
a1dc7a4
tests
Noxsios May 23, 2023
e307fca
remove test from dir name
Noxsios May 23, 2023
c7f123c
tests
Noxsios May 23, 2023
c7bcc7b
tests
Noxsios May 23, 2023
950555e
tests
Noxsios May 23, 2023
1f5f5db
merge 03 w/ 00
Noxsios May 23, 2023
161a8f9
remove e2e.cleanup
Noxsios May 23, 2023
8e51487
v1.0.0 --> 1.0.0
Noxsios May 23, 2023
5f77493
parallelize test 00
Noxsios May 23, 2023
cbfaa50
tets
Noxsios May 23, 2023
66508b5
move 40 and 41 to 02
Noxsios May 23, 2023
c3b4000
tests
Noxsios May 23, 2023
c32745c
zarf tools kubectl --> e2e.Kubectl
Noxsios May 23, 2023
b10dc9d
parallelize test 20
Noxsios May 24, 2023
9c4e4db
fix kubectl describe
Noxsios May 24, 2023
3e18f6f
use the correct ns
Noxsios May 24, 2023
938ecc5
more name corrections
Noxsios May 24, 2023
f01c8a6
cleanup mismatched arch test duplication of init error check
Noxsios May 24, 2023
3462b58
remove uneeded trace
Noxsios May 24, 2023
4af1dbc
change refs to helm-charts
Noxsios May 24, 2023
f98ca23
fix suite tests to use require and not assert
Noxsios May 24, 2023
430da8a
use T tempdir
Noxsios May 24, 2023
44d87fa
use T tempdir
Noxsios May 24, 2023
dc8c6f9
remove ZarfWithConfirm
Noxsios May 24, 2023
f3c811d
fix test 02
Noxsios May 24, 2023
8b315af
fix test 22
Noxsios May 24, 2023
3c05b1b
fix test 22
Noxsios May 24, 2023
9fde85b
fix test 52
Noxsios May 25, 2023
69dcf3b
update tests
Noxsios May 25, 2023
2235753
update tests
Noxsios May 25, 2023
e8c15d5
faster 08
Noxsios May 25, 2023
8516b50
faster 25
Noxsios May 25, 2023
cb499a2
faster 25
Noxsios May 25, 2023
2c6efec
faster 25
Noxsios May 25, 2023
0a421ae
Merge branch 'main' into 1168-review-docs-examples
Noxsios May 25, 2023
490c021
cleaner 28
Noxsios May 25, 2023
876079b
hopefully fix 52
Noxsios May 25, 2023
02904bf
fix nil pointer?
Noxsios May 25, 2023
54b2150
lets see what this does
Noxsios May 25, 2023
cdb6b6f
fix test 52
Noxsios May 25, 2023
2b144aa
fix test 52
Noxsios May 26, 2023
419a863
Merge branch 'main' into 1168-review-docs-examples
Noxsios May 26, 2023
53c4865
speed up 02
Noxsios May 26, 2023
b11ed02
update examples
Noxsios May 26, 2023
8d809ae
update examples
Noxsios May 26, 2023
bb498c3
fix cleanup on 20
Noxsios May 26, 2023
f1d640e
handle cleanup of 20
Noxsios May 26, 2023
a988315
handle cleanup of 20
Noxsios May 26, 2023
b6ac8c5
Merge branch 'main' into 1168-review-docs-examples
Noxsios May 26, 2023
eaf9610
update examples
Noxsios May 26, 2023
99559a6
properly test config file multiline
Noxsios May 30, 2023
72634e8
Apply suggestions from code review
Noxsios May 31, 2023
a676b13
changes from review
Noxsios May 31, 2023
521f559
changes from review
Noxsios May 31, 2023
94e733f
changes from review
Noxsios May 31, 2023
d847c54
changes from review
Noxsios May 31, 2023
f3c5e23
update example local chart to use podinfo
Noxsios May 31, 2023
c6072e6
re-index tests
Noxsios May 31, 2023
c47ca81
merge bb yolo example into bb example
Noxsios May 31, 2023
82d0416
merge main
Noxsios May 31, 2023
faf3762
fix test 00
Noxsios May 31, 2023
8558d24
fix test 08
Noxsios May 31, 2023
7fa213a
Update examples/big-bang/README.md
Noxsios May 31, 2023
0a4add2
fix test 28
Noxsios May 31, 2023
ffa54b7
fix test 51
Noxsios Jun 1, 2023
f588949
fix test 51
Noxsios Jun 1, 2023
8451888
cleaner 51
Noxsios Jun 1, 2023
2edd291
Merge branch 'main' into 1168-review-docs-examples
Noxsios Jun 1, 2023
76ebcb0
fix 51
Noxsios Jun 1, 2023
5b6b27f
fix 28 on windows
Noxsios Jun 1, 2023
a737759
fix yolo example
Noxsios Jun 1, 2023
98bc904
faster 29
Noxsios Jun 1, 2023
2a358fe
fix docs
Noxsios Jun 1, 2023
254f613
revert
Noxsios Jun 1, 2023
8a27b01
lint
Noxsios Jun 1, 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
4 changes: 2 additions & 2 deletions .github/workflows/test-upgrade.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ jobs:
# in a previous step. This test run will the current release to create a K3s cluster.
# chown the logs since they were originally created as root
run: |
zarf package create src/test/upgrade-test --set PODINFO_VERSION=6.3.3 --confirm
zarf package create src/test/upgrade-test --set PODINFO_VERSION=6.3.4 --confirm
zarf package create src/test/upgrade --set PODINFO_VERSION=6.3.3 --confirm
zarf package create src/test/upgrade --set PODINFO_VERSION=6.3.4 --confirm
sudo env "PATH=$PATH" CI=true zarf package deploy zarf-package-test-upgrade-package-amd64-6.3.3.tar.zst --confirm
sudo chown $USER /tmp/zarf-*.log

Expand Down
16 changes: 5 additions & 11 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -132,18 +132,12 @@ build-examples: ## Build all of the example packages

@test -s ./build/zarf-package-data-injection-$(ARCH).tar || $(ZARF_BIN) package create examples/data-injection -o build -a $(ARCH) --confirm

@test -s ./build/zarf-package-git-data-$(ARCH)-v1.0.0.tar.zst || $(ZARF_BIN) package create examples/git-data -o build -a $(ARCH) --confirm
@test -s ./build/zarf-package-git-data-$(ARCH)-0.0.1.tar.zst || $(ZARF_BIN) package create examples/git-data -o build -a $(ARCH) --confirm

@test -s ./build/zarf-package-helm-alt-release-name-$(ARCH).tar.zst || $(ZARF_BIN) package create examples/helm-alt-release-name -o build -a $(ARCH) --confirm

@test -s ./build/zarf-package-helm-local-chart-$(ARCH)-0.0.1.tar.zst || $(ZARF_BIN) package create examples/helm-local-chart -o build -a $(ARCH) --confirm
@test -s ./build/zarf-package-helm-charts-$(ARCH)-0.0.1.tar.zst || $(ZARF_BIN) package create examples/helm-charts -o build -a $(ARCH) --confirm

@test -s ./build/zarf-package-podinfo-flux-$(ARCH).tar.zst || $(ZARF_BIN) package create examples/podinfo-flux -o build -a $(ARCH) --confirm

@test -s ./build/zarf-package-helm-no-wait-$(ARCH).tar.zst || $(ZARF_BIN) package create examples/helm-no-wait -o build -a $(ARCH) --confirm

@test -s ./build/zarf-package-helm-oci-chart-$(ARCH)-0.0.1.tar.zst || $(ZARF_BIN) package create examples/helm-oci-chart -o build -a $(ARCH) --confirm

@test -s ./build/zarf-package-yolo-$(ARCH).tar.zst || $(ZARF_BIN) package create examples/yolo -o build -a $(ARCH) --confirm

## NOTE: Requires an existing cluster or the env var APPLIANCE_MODE=true
Expand All @@ -158,16 +152,16 @@ test-external: ## Run the Zarf CLI E2E tests for an external registry and cluste
@test -s $(ZARF_BIN) || $(MAKE) build-cli
@test -s ./build/zarf-init-$(ARCH)-$(CLI_VERSION).tar.zst || $(MAKE) init-package
@test -s ./build/zarf-package-podinfo-flux-$(ARCH).tar.zst || $(ZARF_BIN) package create examples/podinfo-flux -o build -a $(ARCH) --confirm
cd src/test/external-test && go test -failfast -v -timeout 30m
cd src/test/external && go test -failfast -v -timeout 30m

## NOTE: Requires an existing cluster and
.PHONY: test-upgrade
test-upgrade: ## Run the Zarf CLI E2E tests for an external registry and cluster
@test -s $(ZARF_BIN) || $(MAKE) build-cli
[ -n "$(shell zarf version)" ] || (echo "Zarf must be installed prior to the upgrade test" && exit 1)
[ -n "$(shell zarf package list 2>&1 | grep test-upgrade-package)" ] || (echo "Zarf must be initialized and have the 6.3.3 upgrade-test package installed prior to the upgrade test" && exit 1)
@test -s "zarf-package-test-upgrade-package-amd64-6.3.4.tar.zst" || zarf package create src/test/upgrade-test/ --set PODINFO_VERSION=6.3.4 --confirm
cd src/test/upgrade-test && go test -failfast -v -timeout 30m
@test -s "zarf-package-test-upgrade-package-amd64-6.3.4.tar.zst" || zarf package create src/test/upgrade/ --set PODINFO_VERSION=6.3.4 --confirm
cd src/test/upgrade && go test -failfast -v -timeout 30m

.PHONY: test-unit
test-unit: ensure-ui-build-dir ## Run unit tests within the src/pkg and the bigbang extension directory
Expand Down
6 changes: 3 additions & 3 deletions docs/3-create-a-zarf-package/2-zarf-components.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,13 @@ Can be when using the `url` key:

<Tabs queryString="chart-examples">
<TabItem value="localPath">
<ExampleYAML example="helm-local-chart" component="demo-helm-local-chart" />
<ExampleYAML example="helm-charts" component="demo-helm-local-chart" />
</TabItem>
<TabItem value="URL (git)">
<ExampleYAML example="helm-git-chart" component="demo-helm-git-chart" />
<ExampleYAML example="helm-charts" component="demo-helm-git-chart" />
</TabItem>
<TabItem value="URL (oci)">
<ExampleYAML example="helm-oci-chart" component="helm-oci-chart" />
<ExampleYAML example="helm-charts" component="demo-helm-oci-chart" />
</TabItem>
</Tabs>

Expand Down
2 changes: 1 addition & 1 deletion examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ The Zarf examples demonstrate different ways to utilize Zarf in your environment

To build and deploy a demo, change directories to the example you want to try and run:

``` bash
```bash
cd <directory> # This should be whatever example you want to try (i.e. game)
zarf package create # This will create the zarf package
zarf package deploy # This will prompt you to deploy the created zarf package
Expand Down
26 changes: 0 additions & 26 deletions examples/big-bang-yolo-mode/README.md
Noxsios marked this conversation as resolved.
Outdated
Show resolved Hide resolved

This file was deleted.

128 changes: 0 additions & 128 deletions examples/big-bang-yolo-mode/config/ingress.yaml

This file was deleted.

27 changes: 0 additions & 27 deletions examples/big-bang-yolo-mode/config/kyverno.yaml

This file was deleted.

15 changes: 0 additions & 15 deletions examples/big-bang-yolo-mode/config/loki.yaml

This file was deleted.

16 changes: 16 additions & 0 deletions examples/big-bang/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,19 @@ To view the example in its entirety, select the `Edit this page` link below the
:::

<ExampleYAML example="big-bang" showLink={false} />

## YOLO Mode

You can learn about YOLO mode [here](https://docs.zarf.dev/docs/faq#what-is-yolo-mode-and-why-would-i-use-it).

The `provision-flux-credentials` component is required to create the necessary secret to pull flux images from [registry1.dso.mil](https://registry1.dso.mil). In the provided `zarf.yaml` for this example, we demonstrate providing account credentials via Zarf Variables, although there are other ways to populate the data in `private-registry.yaml`.

### Big Bang YOLO `zarf.yaml`

:::info

To view the example in its entirety, select the `Edit this page` link below the article and select the parent folder, then select the `yolo` folder.

:::
Noxsios marked this conversation as resolved.
Show resolved Hide resolved

<ExampleYAML example="big-bang/yolo" showLink={false} />
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ registryCredentials:
registry: registry1.dso.mil
username: "###ZARF_VAR_REGISTRY1_USERNAME###"
password: "###ZARF_VAR_REGISTRY1_CLI_SECRET###"
email: ""
email: ""
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,21 @@ kind: ZarfPackageConfig

metadata:
name: yolo-big-bang
description: "Deploy Big Bang Core in YOLO mode"
description: Deploy Big Bang Core in YOLO mode
version: 2.0.0
url: https://p1.dso.mil/products/big-bang
architecture: amd64
yolo: true

variables:
- name: REGISTRY1_USERNAME
description: "The username for pulling images from registry1.dso.mil"
required: true
description: The username for pulling images from registry1.dso.mil
prompt: true
- name: REGISTRY1_CLI_SECRET
description: "The CLI secret for pulling images from registry1.dso.mil"
required: true
description: The CLI secret for pulling images from registry1.dso.mil
prompt: true
- name: REGISTRY1_AUTH
description: "A base64 encoded concatenation of 'REGISTRY1_USERNAME:REGISTRY1_CLI_SECRET'"
required: true
description: A base64 encoded concatenation of 'REGISTRY1_USERNAME:REGISTRY1_CLI_SECRET'
prompt: true

components:
Expand All @@ -29,14 +26,14 @@ components:
- name: private-registry
namespace: flux-system
files:
- secrets/private-registry.yaml
- private-registry.yaml
- name: bigbang
required: true
extensions:
bigbang:
version: 2.0.0
valuesFiles:
- config/credentials.yaml
- config/ingress.yaml
- config/kyverno.yaml
- config/loki.yaml
- credentials.yaml
- ../config/ingress.yaml
- ../config/kyverno.yaml
- ../config/loki.yaml
4 changes: 2 additions & 2 deletions examples/big-bang/zarf.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
kind: ZarfPackageConfig
metadata:
name: big-bang-example
description: "Deploy Big Bang Core"
description: Deploy Big Bang Core
# renovate: datasource=gitlab-releases depName=big-bang/bigbang versioning=semver registryUrl=https://repo1.dso.mil/
version: 2.0.0
url: https://p1.dso.mil/products/big-bang
Expand All @@ -10,7 +10,7 @@ metadata:

variables:
- name: DOMAIN
default: "bigbang.dev"
default: bigbang.dev
prompt: false

components:
Racer159 marked this conversation as resolved.
Show resolved Hide resolved
Expand Down
Loading