From 4c94da617a9c06894e7e7b83a6e7548ef0617c99 Mon Sep 17 00:00:00 2001 From: Wayne Starr Date: Fri, 24 Feb 2023 11:50:50 -0600 Subject: [PATCH 01/12] Some initial changes/experiments --- docs/4-user-guide/3-zarf-schema.md | 251 +++++++++--------- hack/zarf-jsfh-template/section_examples.md | 4 +- .../section_properties_details.md | 2 +- src/types/component.go | 12 +- src/types/package.go | 4 +- src/ui/lib/api-types.ts | 14 +- zarf.schema.json | 23 +- 7 files changed, 165 insertions(+), 145 deletions(-) diff --git a/docs/4-user-guide/3-zarf-schema.md b/docs/4-user-guide/3-zarf-schema.md index 4789ea3cb3..60029be7ff 100644 --- a/docs/4-user-guide/3-zarf-schema.md +++ b/docs/4-user-guide/3-zarf-schema.md @@ -6,7 +6,7 @@ | **Additional properties** | [![Not allowed](https://img.shields.io/badge/Not%20allowed-red)](# "Additional Properties not allowed.") | | **Defined in** | #/definitions/ZarfPackage | -
+
kind * @@ -31,7 +31,7 @@ Must be one of:
-
+
metadata @@ -46,7 +46,7 @@ Must be one of: | **Additional properties** | [![Not allowed](https://img.shields.io/badge/Not%20allowed-red)](# "Additional Properties not allowed.") | | **Defined in** | #/definitions/ZarfMetadata | -
+
name * @@ -68,7 +68,7 @@ Must be one of:
-
+
description @@ -84,7 +84,7 @@ Must be one of:
-
+
version @@ -100,7 +100,7 @@ Must be one of:
-
+
url @@ -116,14 +116,14 @@ Must be one of:
-
+
image  
-**Description:** An image URL to embed in this package for future Zarf UI listing +**Description:** An image URL to embed in this package (Reserved for future use in Zarf UI) | | | | -------- | -------- | @@ -132,7 +132,7 @@ Must be one of:
-
+
uncompressed @@ -148,7 +148,7 @@ Must be one of:
-
+
architecture @@ -161,10 +161,17 @@ Must be one of: | -------- | -------- | | **Type** | `string` | +**Examples:** + + +"arm64" +"amd64" + +
-
+
yolo @@ -183,7 +190,7 @@ Must be one of:
-
+
build @@ -198,7 +205,7 @@ Must be one of: | **Additional properties** | [![Not allowed](https://img.shields.io/badge/Not%20allowed-red)](# "Additional Properties not allowed.") | | **Defined in** | #/definitions/ZarfBuildData | -
+
terminal * @@ -214,7 +221,7 @@ Must be one of:
-
+
user * @@ -230,7 +237,7 @@ Must be one of:
-
+
architecture * @@ -246,7 +253,7 @@ Must be one of:
-
+
timestamp * @@ -262,7 +269,7 @@ Must be one of:
-
+
version * @@ -278,7 +285,7 @@ Must be one of:
-
+
migrations * @@ -311,7 +318,7 @@ Must be one of:
-
+
components * @@ -342,7 +349,7 @@ Must be one of: | **Additional properties** | [![Not allowed](https://img.shields.io/badge/Not%20allowed-red)](# "Additional Properties not allowed.") | | **Defined in** | #/definitions/ZarfComponent | -
+
name * @@ -364,7 +371,7 @@ Must be one of:
-
+
description @@ -380,7 +387,7 @@ Must be one of:
-
+
default @@ -396,7 +403,7 @@ Must be one of:
-
+
required @@ -412,7 +419,7 @@ Must be one of:
-
+
only @@ -427,7 +434,7 @@ Must be one of: | **Additional properties** | [![Not allowed](https://img.shields.io/badge/Not%20allowed-red)](# "Additional Properties not allowed.") | | **Defined in** | #/definitions/ZarfComponentOnlyTarget | -
+
localOS @@ -450,7 +457,7 @@ Must be one of:
-
+
cluster @@ -465,7 +472,7 @@ Must be one of: | **Additional properties** | [![Not allowed](https://img.shields.io/badge/Not%20allowed-red)](# "Additional Properties not allowed.") | | **Defined in** | #/definitions/ZarfComponentOnlyCluster | -
+
architecture @@ -487,14 +494,14 @@ Must be one of:
-
+
distros  
-**Description:** Future use +**Description:** A list of kubernetes distros this package works with (Reserved for future use in Zarf UI) | | | | -------- | ----------------- | @@ -523,7 +530,7 @@ Must be one of:
-
+
group @@ -539,7 +546,7 @@ Must be one of:
-
+
cosignKeyPath @@ -555,7 +562,7 @@ Must be one of:
-
+
import @@ -570,7 +577,7 @@ Must be one of: | **Additional properties** | [![Not allowed](https://img.shields.io/badge/Not%20allowed-red)](# "Additional Properties not allowed.") | | **Defined in** | #/definitions/ZarfComponentImport | -
+
name @@ -584,7 +591,7 @@ Must be one of:
-
+
path * @@ -607,14 +614,14 @@ Must be one of:
-
+
scripts  
-**Description:** (Deprecated--use actions instead) Custom commands to run before or after package deployment +**Description:** [DEPRECATED] - (replaced by actions) Custom commands to run before or after package deployment | | | | ------------------------- | -------------------------------------------------------------------------------------------------------- | @@ -622,7 +629,7 @@ Must be one of: | **Additional properties** | [![Not allowed](https://img.shields.io/badge/Not%20allowed-red)](# "Additional Properties not allowed.") | | **Defined in** | #/definitions/DeprecatedZarfComponentScripts | -
+
showOutput @@ -638,7 +645,7 @@ Must be one of:
-
+
timeoutSeconds @@ -654,7 +661,7 @@ Must be one of:
-
+
retry @@ -670,7 +677,7 @@ Must be one of:
-
+
prepare @@ -700,7 +707,7 @@ Must be one of:
-
+
before @@ -730,7 +737,7 @@ Must be one of:
-
+
after @@ -763,7 +770,7 @@ Must be one of:
-
+
actions @@ -778,7 +785,7 @@ Must be one of: | **Additional properties** | [![Not allowed](https://img.shields.io/badge/Not%20allowed-red)](# "Additional Properties not allowed.") | | **Defined in** | #/definitions/ZarfComponentActions | -
+
onCreate @@ -793,7 +800,7 @@ Must be one of: | **Additional properties** | [![Not allowed](https://img.shields.io/badge/Not%20allowed-red)](# "Additional Properties not allowed.") | | **Defined in** | #/definitions/ZarfComponentActionSet | -
+
defaults @@ -808,7 +815,7 @@ Must be one of: | **Additional properties** | [![Not allowed](https://img.shields.io/badge/Not%20allowed-red)](# "Additional Properties not allowed.") | | **Defined in** | #/definitions/ZarfComponentActionDefaults | -
+
mute @@ -824,7 +831,7 @@ Must be one of:
-
+
maxTotalSeconds @@ -840,7 +847,7 @@ Must be one of:
-
+
maxRetries @@ -856,7 +863,7 @@ Must be one of:
-
+
dir @@ -872,7 +879,7 @@ Must be one of:
-
+
env @@ -905,7 +912,7 @@ Must be one of:
-
+
before @@ -934,7 +941,7 @@ Must be one of: | **Additional properties** | [![Not allowed](https://img.shields.io/badge/Not%20allowed-red)](# "Additional Properties not allowed.") | | **Defined in** | #/definitions/ZarfComponentAction | -
+
mute @@ -950,7 +957,7 @@ Must be one of:
-
+
maxTotalSeconds @@ -966,7 +973,7 @@ Must be one of:
-
+
maxRetries @@ -982,7 +989,7 @@ Must be one of:
-
+
dir @@ -998,7 +1005,7 @@ Must be one of:
-
+
env @@ -1028,7 +1035,7 @@ Must be one of:
-
+
cmd @@ -1044,7 +1051,7 @@ Must be one of:
-
+
setVariable @@ -1064,7 +1071,7 @@ Must be one of:
-
+
description @@ -1080,7 +1087,7 @@ Must be one of:
-
+
wait @@ -1095,7 +1102,7 @@ Must be one of: | **Additional properties** | [![Not allowed](https://img.shields.io/badge/Not%20allowed-red)](# "Additional Properties not allowed.") | | **Defined in** | #/definitions/ZarfComponentActionWait | -
+
cluster @@ -1110,7 +1117,7 @@ Must be one of: | **Additional properties** | [![Not allowed](https://img.shields.io/badge/Not%20allowed-red)](# "Additional Properties not allowed.") | | **Defined in** | #/definitions/ZarfComponentActionWaitCluster | -
+
kind * @@ -1128,7 +1135,7 @@ Must be one of:
-
+
name * @@ -1144,7 +1151,7 @@ Must be one of:
-
+
namespace @@ -1160,14 +1167,14 @@ Must be one of:
-
+
condition  
-**Description:** The condition to wait for (e.g. Ready; Available; etc.). Defautls to exist +**Description:** The condition to wait for (e.g. Ready; Available; etc.). Defaults to exist | | | | -------- | -------- | @@ -1179,7 +1186,7 @@ Must be one of:
-
+
network @@ -1194,7 +1201,7 @@ Must be one of: | **Additional properties** | [![Not allowed](https://img.shields.io/badge/Not%20allowed-red)](# "Additional Properties not allowed.") | | **Defined in** | #/definitions/ZarfComponentActionWaitNetwork | -
+
protocol * @@ -1219,7 +1226,7 @@ Must be one of:
-
+
address * @@ -1237,7 +1244,7 @@ Must be one of:
-
+
code @@ -1262,7 +1269,7 @@ Must be one of:
-
+
after @@ -1294,7 +1301,7 @@ Must be one of:
-
+
onSuccess @@ -1326,7 +1333,7 @@ Must be one of:
-
+
onFailure @@ -1361,7 +1368,7 @@ Must be one of:
-
+
onDeploy @@ -1379,7 +1386,7 @@ Must be one of:
-
+
onRemove @@ -1400,7 +1407,7 @@ Must be one of:
-
+
files @@ -1429,7 +1436,7 @@ Must be one of: | **Additional properties** | [![Not allowed](https://img.shields.io/badge/Not%20allowed-red)](# "Additional Properties not allowed.") | | **Defined in** | #/definitions/ZarfFile | -
+
source * @@ -1447,7 +1454,7 @@ Must be one of:
-
+
shasum @@ -1463,7 +1470,7 @@ Must be one of:
-
+
target * @@ -1481,7 +1488,7 @@ Must be one of:
-
+
executable @@ -1497,7 +1504,7 @@ Must be one of:
-
+
symlinks @@ -1530,7 +1537,7 @@ Must be one of:
-
+
charts @@ -1599,7 +1606,7 @@ Must be one of: -
+
name * @@ -1617,7 +1624,7 @@ Must be one of:
-
+
releaseName @@ -1633,7 +1640,7 @@ Must be one of:
-
+
url @@ -1649,7 +1656,7 @@ Must be one of:
-
+
version * @@ -1667,7 +1674,7 @@ Must be one of:
-
+
namespace * @@ -1685,7 +1692,7 @@ Must be one of:
-
+
valuesFiles @@ -1715,7 +1722,7 @@ Must be one of:
-
+
gitPath @@ -1731,7 +1738,7 @@ Must be one of:
-
+
localPath @@ -1747,7 +1754,7 @@ Must be one of:
-
+
noWait @@ -1766,7 +1773,7 @@ Must be one of:
-
+
manifests @@ -1793,7 +1800,7 @@ Must be one of: | **Additional properties** | [![Not allowed](https://img.shields.io/badge/Not%20allowed-red)](# "Additional Properties not allowed.") | | **Defined in** | #/definitions/ZarfManifest | -
+
name * @@ -1811,7 +1818,7 @@ Must be one of:
-
+
namespace @@ -1827,7 +1834,7 @@ Must be one of:
-
+
files @@ -1857,7 +1864,7 @@ Must be one of:
-
+
kustomizeAllowAnyDirectory @@ -1873,7 +1880,7 @@ Must be one of:
-
+
kustomizations @@ -1903,7 +1910,7 @@ Must be one of:
-
+
noWait @@ -1922,7 +1929,7 @@ Must be one of:
-
+
images @@ -1952,7 +1959,7 @@ Must be one of:
-
+
repos @@ -1982,7 +1989,7 @@ Must be one of:
-
+
dataInjections @@ -2011,7 +2018,7 @@ Must be one of: | **Additional properties** | [![Not allowed](https://img.shields.io/badge/Not%20allowed-red)](# "Additional Properties not allowed.") | | **Defined in** | #/definitions/ZarfDataInjection | -
+
source * @@ -2029,7 +2036,7 @@ Must be one of:
-
+
target * @@ -2046,7 +2053,7 @@ Must be one of: | **Additional properties** | [![Not allowed](https://img.shields.io/badge/Not%20allowed-red)](# "Additional Properties not allowed.") | | **Defined in** | #/definitions/ZarfContainerTarget | -
+
namespace * @@ -2064,7 +2071,7 @@ Must be one of:
-
+
selector * @@ -2079,10 +2086,16 @@ Must be one of: | -------- | -------- | | **Type** | `string` | +**Example:** + + +"app=data-injection" + +
-
+
container * @@ -2091,7 +2104,7 @@ Must be one of: ![Required](https://img.shields.io/badge/Required-red) -**Description:** The container to target for data injection +**Description:** The container name to target for data injection | | | | -------- | -------- | @@ -2100,7 +2113,7 @@ Must be one of:
-
+
path * @@ -2109,7 +2122,7 @@ Must be one of: ![Required](https://img.shields.io/badge/Required-red) -**Description:** The path to copy the data to in the container +**Description:** The path within the container to copy the data into | | | | -------- | -------- | @@ -2121,7 +2134,7 @@ Must be one of:
-
+
compress @@ -2143,7 +2156,7 @@ Must be one of:
-
+
variables @@ -2172,7 +2185,7 @@ Must be one of: | **Additional properties** | [![Not allowed](https://img.shields.io/badge/Not%20allowed-red)](# "Additional Properties not allowed.") | | **Defined in** | #/definitions/ZarfPackageVariable | -
+
name * @@ -2194,7 +2207,7 @@ Must be one of:
-
+
description @@ -2210,7 +2223,7 @@ Must be one of:
-
+
default @@ -2226,7 +2239,7 @@ Must be one of:
-
+
prompt @@ -2245,7 +2258,7 @@ Must be one of:
-
+
constants @@ -2274,7 +2287,7 @@ Must be one of: | **Additional properties** | [![Not allowed](https://img.shields.io/badge/Not%20allowed-red)](# "Additional Properties not allowed.") | | **Defined in** | #/definitions/ZarfPackageConstant | -
+
name * @@ -2296,7 +2309,7 @@ Must be one of:
-
+
value * @@ -2314,7 +2327,7 @@ Must be one of:
-
+
description diff --git a/hack/zarf-jsfh-template/section_examples.md b/hack/zarf-jsfh-template/section_examples.md index ab04436813..dd5f7fff07 100644 --- a/hack/zarf-jsfh-template/section_examples.md +++ b/hack/zarf-jsfh-template/section_examples.md @@ -1,8 +1,8 @@ **Example{% if examples|length > 1 %}s{% endif %}:**{{ " " }} + {% for example in examples %} {% set example_id = schema.html_id ~ "_ex" ~ loop.index %} -```json {{ example }} -``` {% endfor %} + diff --git a/hack/zarf-jsfh-template/section_properties_details.md b/hack/zarf-jsfh-template/section_properties_details.md index 9c1085126f..51a4f36643 100644 --- a/hack/zarf-jsfh-template/section_properties_details.md +++ b/hack/zarf-jsfh-template/section_properties_details.md @@ -6,7 +6,7 @@ {% set html_id = sub_property.html_id %} {% set description = sub_property | get_description %} -
+
{% filter md_heading(depth + 1, html_id, True) -%} {%- filter replace('\n', '') -%} {%- if sub_property is deprecated -%}~~{%- endif -%} diff --git a/src/types/component.go b/src/types/component.go index 482fe6248b..1827e38c5c 100644 --- a/src/types/component.go +++ b/src/types/component.go @@ -32,7 +32,7 @@ type ZarfComponent struct { Import ZarfComponentImport `json:"import,omitempty" jsonschema:"description=Import a component from another Zarf package"` // (Deprecated) DeprecatedScripts are custom commands that run before or after package deployment - DeprecatedScripts DeprecatedZarfComponentScripts `json:"scripts,omitempty" jsonschema:"description=(Deprecated--use actions instead) Custom commands to run before or after package deployment,deprecated=true"` + DeprecatedScripts DeprecatedZarfComponentScripts `json:"scripts,omitempty" jsonschema:"description=[DEPRECATED] - (replaced by actions) Custom commands to run before or after package deployment,deprecated=true"` // Replaces scripts, fine-grained control over commands to run at various stages of a package lifecycle Actions ZarfComponentActions `json:"actions,omitempty" jsonschema:"description=Custom commands to run at various stages of a package lifecycle"` @@ -65,7 +65,7 @@ type ZarfComponentOnlyTarget struct { // ZarfComponentOnlyCluster represents the architecture and K8s cluster distribution to filter on. type ZarfComponentOnlyCluster struct { Architecture string `json:"architecture,omitempty" jsonschema:"description=Only create and deploy to clusters of the given architecture,enum=amd64,enum=arm64"` - Distros []string `json:"distros,omitempty" jsonschema:"description=Future use"` + Distros []string `json:"distros,omitempty" jsonschema:"description=A list of kubernetes distros this package works with (Reserved for future use in Zarf UI),example=k3s,example=eks"` } // ZarfFile defines a file to deploy. @@ -159,7 +159,7 @@ type ZarfComponentActionWaitCluster struct { Kind string `json:"kind" jsonschema:"description=The kind of resource to wait for (e.g. Pod; Deployment; etc.)"` Identifier string `json:"name" jsonschema:"description=The name of the resource or selector to wait for (e.g. podinfo; app=podinfo; etc.)"` Namespace string `json:"namespace,omitempty" jsonschema:"description=The namespace of the resource to wait for"` - Condition string `json:"condition,omitempty" jsonschema:"description=The condition to wait for (e.g. Ready; Available; etc.). Defautls to exist, a special condition that will wait for the resource to exist."` + Condition string `json:"condition,omitempty" jsonschema:"description=The condition to wait for (e.g. Ready; Available; etc.). Defaults to exist, a special condition that will wait for the resource to exist."` } // ZarfComponentActionWaitNetwork specifies a condition to wait for before continuing @@ -172,9 +172,9 @@ type ZarfComponentActionWaitNetwork struct { // ZarfContainerTarget defines the destination info for a ZarfData target type ZarfContainerTarget struct { Namespace string `json:"namespace" jsonschema:"description=The namespace to target for data injection"` - Selector string `json:"selector" jsonschema:"description=The K8s selector to target for data injection"` - Container string `json:"container" jsonschema:"description=The container to target for data injection"` - Path string `json:"path" jsonschema:"description=The path to copy the data to in the container"` + Selector string `json:"selector" jsonschema:"description=The K8s selector to target for data injection,example=app=data-injection"` + Container string `json:"container" jsonschema:"description=The container name to target for data injection"` + Path string `json:"path" jsonschema:"description=The path within the container to copy the data into"` } // ZarfDataInjection is a data-injection definition. diff --git a/src/types/package.go b/src/types/package.go index cfffc74f86..59f20cd169 100644 --- a/src/types/package.go +++ b/src/types/package.go @@ -20,9 +20,9 @@ type ZarfMetadata struct { Description string `json:"description,omitempty" jsonschema:"description=Additional information about this package"` Version string `json:"version,omitempty" jsonschema:"description=Generic string to track the package version by a package author"` URL string `json:"url,omitempty" jsonschema:"description=Link to package information when online"` - Image string `json:"image,omitempty" jsonschema:"description=An image URL to embed in this package for future Zarf UI listing"` + Image string `json:"image,omitempty" jsonschema:"description=An image URL to embed in this package (Reserved for future use in Zarf UI)"` Uncompressed bool `json:"uncompressed,omitempty" jsonschema:"description=Disable compression of this package"` - Architecture string `json:"architecture,omitempty" jsonschema:"description=The target cluster architecture of this package"` + Architecture string `json:"architecture,omitempty" jsonschema:"description=The target cluster architecture of this package,example=arm64,example=amd64"` YOLO bool `json:"yolo,omitempty" jsonschema:"description=Yaml OnLy Online (YOLO): True enables deploying a Zarf package without first running zarf init against the cluster. This is ideal for connected environments where you want to use existing VCS and container registries."` } diff --git a/src/ui/lib/api-types.ts b/src/ui/lib/api-types.ts index 3c726252e7..4cdfadd2c2 100644 --- a/src/ui/lib/api-types.ts +++ b/src/ui/lib/api-types.ts @@ -249,7 +249,7 @@ export interface ZarfComponent { */ required?: boolean; /** - * (Deprecated--use actions instead) Custom commands to run before or after package + * [DEPRECATED] - (replaced by actions) Custom commands to run before or after package * deployment */ scripts?: DeprecatedZarfComponentScripts; @@ -367,7 +367,7 @@ export interface ZarfComponentActionWait { */ export interface ZarfComponentActionWaitCluster { /** - * The condition to wait for (e.g. Ready; Available; etc.). Defautls to exist + * The condition to wait for (e.g. Ready; Available; etc.). Defaults to exist */ condition?: string; /** @@ -498,7 +498,7 @@ export interface ZarfDataInjection { */ export interface ZarfContainerTarget { /** - * The container to target for data injection + * The container name to target for data injection */ container: string; /** @@ -506,7 +506,7 @@ export interface ZarfContainerTarget { */ namespace: string; /** - * The path to copy the data to in the container + * The path within the container to copy the data into */ path: string; /** @@ -597,7 +597,7 @@ export interface ZarfComponentOnlyCluster { */ architecture?: Architecture; /** - * Future use + * A list of kubernetes distros this package works with (Reserved for future use in Zarf UI) */ distros?: string[]; } @@ -620,7 +620,7 @@ export enum LocalOS { } /** - * (Deprecated--use actions instead) Custom commands to run before or after package + * [DEPRECATED] - (replaced by actions) Custom commands to run before or after package * deployment */ export interface DeprecatedZarfComponentScripts { @@ -687,7 +687,7 @@ export interface ZarfMetadata { */ description?: string; /** - * An image URL to embed in this package for future Zarf UI listing + * An image URL to embed in this package (Reserved for future use in Zarf UI) */ image?: string; /** diff --git a/zarf.schema.json b/zarf.schema.json index 86dd04c629..6f6f4be413 100644 --- a/zarf.schema.json +++ b/zarf.schema.json @@ -183,7 +183,7 @@ "scripts": { "$schema": "http://json-schema.org/draft-04/schema#", "$ref": "#/definitions/DeprecatedZarfComponentScripts", - "description": "(Deprecated--use actions instead) Custom commands to run before or after package deployment" + "description": "[DEPRECATED] - (replaced by actions) Custom commands to run before or after package deployment" }, "actions": { "$schema": "http://json-schema.org/draft-04/schema#", @@ -390,7 +390,7 @@ }, "condition": { "type": "string", - "description": "The condition to wait for (e.g. Ready; Available; etc.). Defautls to exist" + "description": "The condition to wait for (e.g. Ready; Available; etc.). Defaults to exist" } }, "additionalProperties": false, @@ -473,7 +473,7 @@ "type": "string" }, "type": "array", - "description": "Future use" + "description": "A list of kubernetes distros this package works with (Reserved for future use in Zarf UI)" } }, "additionalProperties": false, @@ -513,15 +513,18 @@ }, "selector": { "type": "string", - "description": "The K8s selector to target for data injection" + "description": "The K8s selector to target for data injection", + "examples": [ + "app\u0026#61;data-injection" + ] }, "container": { "type": "string", - "description": "The container to target for data injection" + "description": "The container name to target for data injection" }, "path": { "type": "string", - "description": "The path to copy the data to in the container" + "description": "The path within the container to copy the data into" } }, "additionalProperties": false, @@ -646,7 +649,7 @@ }, "image": { "type": "string", - "description": "An image URL to embed in this package for future Zarf UI listing" + "description": "An image URL to embed in this package (Reserved for future use in Zarf UI)" }, "uncompressed": { "type": "boolean", @@ -654,7 +657,11 @@ }, "architecture": { "type": "string", - "description": "The target cluster architecture of this package" + "description": "The target cluster architecture of this package", + "examples": [ + "arm64", + "amd64" + ] }, "yolo": { "type": "boolean", From 9d43facb32a3cdfa87109f90f2cf32ef2f8b76c9 Mon Sep 17 00:00:00 2001 From: Wayne Starr Date: Fri, 24 Feb 2023 12:01:56 -0600 Subject: [PATCH 02/12] Fix netlify toml to include /docs --- netlify.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/netlify.toml b/netlify.toml index cc916a1bc6..cb2c216ed5 100644 --- a/netlify.toml +++ b/netlify.toml @@ -2,6 +2,7 @@ base = "docs-website/" command = "npm run build" publish = "build/" + ignore = "git diff --quiet $CACHED_COMMIT_REF $COMMIT_REF . ../docs/" [build.environment] NODE_VERSION = "18.12.1" From 84ec4f6637c6499aa7ce94e300c444fba55405da Mon Sep 17 00:00:00 2001 From: Wayne Starr Date: Fri, 24 Feb 2023 12:30:04 -0600 Subject: [PATCH 03/12] Update to standardize depth --- docs/4-user-guide/3-zarf-schema.md | 734 ++++++++++++------ hack/zarf-jsfh-template/base.md | 5 +- hack/zarf-jsfh-template/content.md | 5 +- hack/zarf-jsfh-template/section_array.md | 6 +- .../section_conditional_subschema.md | 8 +- hack/zarf-jsfh-template/section_not.md | 4 +- .../section_properties_details.md | 20 +- ...ection_undocumented_required_properties.md | 2 +- hack/zarf-jsfh-template/tabbed_section.md | 4 +- 9 files changed, 507 insertions(+), 281 deletions(-) diff --git a/docs/4-user-guide/3-zarf-schema.md b/docs/4-user-guide/3-zarf-schema.md index 60029be7ff..d133803c8c 100644 --- a/docs/4-user-guide/3-zarf-schema.md +++ b/docs/4-user-guide/3-zarf-schema.md @@ -7,12 +7,14 @@ | **Defined in** | #/definitions/ZarfPackage |
- kind * - + + kind *  
+

kind

+ ![Required](https://img.shields.io/badge/Required-red) **Description:** The kind of Zarf package @@ -32,12 +34,14 @@ Must be one of:
- metadata - + + metadata  
+

metadata

+ **Description:** Package metadata | | | @@ -47,12 +51,14 @@ Must be one of: | **Defined in** | #/definitions/ZarfMetadata |
- name * - + + name *  
+

name

+ ![Required](https://img.shields.io/badge/Required-red) **Description:** Name to identify this Zarf package @@ -69,12 +75,14 @@ Must be one of:
- description - + + description  
+

description

+ **Description:** Additional information about this package | | | @@ -85,12 +93,14 @@ Must be one of:
- version - + + version  
+

version

+ **Description:** Generic string to track the package version by a package author | | | @@ -101,12 +111,14 @@ Must be one of:
- url - + + url  
+

url

+ **Description:** Link to package information when online | | | @@ -117,12 +129,14 @@ Must be one of:
- image - + + image  
+

image

+ **Description:** An image URL to embed in this package (Reserved for future use in Zarf UI) | | | @@ -133,12 +147,14 @@ Must be one of:
- uncompressed - + + uncompressed  
+

uncompressed

+ **Description:** Disable compression of this package | | | @@ -149,12 +165,14 @@ Must be one of:
- architecture - + + architecture  
+

architecture

+ **Description:** The target cluster architecture of this package | | | @@ -172,12 +190,14 @@ Must be one of:
- yolo - + + yolo  
+

yolo

+ **Description:** Yaml OnLy Online (YOLO): True enables deploying a Zarf package without first running zarf init against the cluster. This is ideal for connected environments where you want to use existing VCS and container registries. | | | @@ -191,12 +211,14 @@ Must be one of:
- build - + + build  
+

build

+ **Description:** Zarf-generated package build data | | | @@ -206,12 +228,14 @@ Must be one of: | **Defined in** | #/definitions/ZarfBuildData |
- terminal * - + + terminal *  
+

terminal

+ ![Required](https://img.shields.io/badge/Required-red) | | | @@ -222,12 +246,14 @@ Must be one of:
- user * - + + user *  
+

user

+ ![Required](https://img.shields.io/badge/Required-red) | | | @@ -238,12 +264,14 @@ Must be one of:
- architecture * - + + architecture *  
+

architecture

+ ![Required](https://img.shields.io/badge/Required-red) | | | @@ -254,12 +282,14 @@ Must be one of:
- timestamp * - + + timestamp *  
+

timestamp

+ ![Required](https://img.shields.io/badge/Required-red) | | | @@ -270,12 +300,14 @@ Must be one of:
- version * - + + version *  
+

version

+ ![Required](https://img.shields.io/badge/Required-red) | | | @@ -286,12 +318,14 @@ Must be one of:
- migrations * - + + migrations *  
+

migrations

+ ![Required](https://img.shields.io/badge/Required-red) | | | @@ -306,7 +340,7 @@ Must be one of: | **Additional items** | False | | **Tuple validation** | See below | - ## migrations items + ##### migrations items | | | | -------- | -------- | @@ -319,12 +353,14 @@ Must be one of:
- components * - + + components *  
+

components

+ ![Required](https://img.shields.io/badge/Required-red) **Description:** List of components to deploy in this package @@ -341,7 +377,7 @@ Must be one of: | **Additional items** | False | | **Tuple validation** | See below | - ## ZarfComponent + ##### ZarfComponent | | | | ------------------------- | -------------------------------------------------------------------------------------------------------- | @@ -350,12 +386,14 @@ Must be one of: | **Defined in** | #/definitions/ZarfComponent |
- name * - + + name *  
+

name

+ ![Required](https://img.shields.io/badge/Required-red) **Description:** The name of the component @@ -372,12 +410,14 @@ Must be one of:
- description - + + description  
+

description

+ **Description:** Message to include during package deploy describing the purpose of this component | | | @@ -388,12 +428,14 @@ Must be one of:
- default - + + default  
+

default

+ **Description:** Determines the default Y/N state for installing this component on package deploy | | | @@ -404,12 +446,14 @@ Must be one of:
- required - + + required  
+

required

+ **Description:** Do not prompt user to install this component | | | @@ -420,12 +464,14 @@ Must be one of:
- only - + + only  
+

only

+ **Description:** Filter when this component is included in package creation or deployment | | | @@ -435,12 +481,14 @@ Must be one of: | **Defined in** | #/definitions/ZarfComponentOnlyTarget |
- localOS - + + localOS  
+

localOS

+ **Description:** Only deploy component to specified OS | | | @@ -458,12 +506,14 @@ Must be one of:
- cluster - + + cluster  
+

cluster

+ **Description:** Only deploy component to specified clusters | | | @@ -473,12 +523,14 @@ Must be one of: | **Defined in** | #/definitions/ZarfComponentOnlyCluster |
- architecture - + + architecture  
+

architecture

+ **Description:** Only create and deploy to clusters of the given architecture | | | @@ -495,12 +547,14 @@ Must be one of:
- distros - + + distros  
+

distros

+ **Description:** A list of kubernetes distros this package works with (Reserved for future use in Zarf UI) | | | @@ -515,7 +569,7 @@ Must be one of: | **Additional items** | False | | **Tuple validation** | See below | - ## distros items + ##### distros items | | | | -------- | -------- | @@ -531,12 +585,14 @@ Must be one of:
- group - + + group  
+

group

+ **Description:** Create a user selector field based on all components in the same group | | | @@ -547,12 +603,14 @@ Must be one of:
- cosignKeyPath - + + cosignKeyPath  
+

cosignKeyPath

+ **Description:** Specify a path to a public key to validate signed online resources | | | @@ -563,12 +621,14 @@ Must be one of:
- import - + + import  
+

import

+ **Description:** Import a component from another Zarf package | | | @@ -578,12 +638,14 @@ Must be one of: | **Defined in** | #/definitions/ZarfComponentImport |
- name - + + name  
+

name

+ | | | | -------- | -------- | | **Type** | `string` | @@ -592,12 +654,14 @@ Must be one of:
- path * - + + path *  
+

path

+ ![Required](https://img.shields.io/badge/Required-red) | | | @@ -615,12 +679,14 @@ Must be one of:
- scripts - + + scripts  
+

scripts

+ **Description:** [DEPRECATED] - (replaced by actions) Custom commands to run before or after package deployment | | | @@ -630,12 +696,14 @@ Must be one of: | **Defined in** | #/definitions/DeprecatedZarfComponentScripts |
- showOutput - + + showOutput  
+

showOutput

+ **Description:** Show the output of the script during package deployment | | | @@ -646,12 +714,14 @@ Must be one of:
- timeoutSeconds - + + timeoutSeconds  
+

timeoutSeconds

+ **Description:** Timeout in seconds for the script | | | @@ -662,12 +732,14 @@ Must be one of:
- retry - + + retry  
+

retry

+ **Description:** Retry the script if it fails | | | @@ -678,12 +750,14 @@ Must be one of:
- prepare - + + prepare  
+

prepare

+ **Description:** Scripts to run before the component is added during package create | | | @@ -698,7 +772,7 @@ Must be one of: | **Additional items** | False | | **Tuple validation** | See below | - ## prepare items + ##### prepare items | | | | -------- | -------- | @@ -708,12 +782,14 @@ Must be one of:
- before - + + before  
+

before

+ **Description:** Scripts to run before the component is deployed | | | @@ -728,7 +804,7 @@ Must be one of: | **Additional items** | False | | **Tuple validation** | See below | - ## before items + ##### before items | | | | -------- | -------- | @@ -738,12 +814,14 @@ Must be one of:
- after - + + after  
+

after

+ **Description:** Scripts to run after the component successfully deploys | | | @@ -758,7 +836,7 @@ Must be one of: | **Additional items** | False | | **Tuple validation** | See below | - ## after items + ##### after items | | | | -------- | -------- | @@ -771,12 +849,14 @@ Must be one of:
- actions - + + actions  
+

actions

+ **Description:** Custom commands to run at various stages of a package lifecycle | | | @@ -786,12 +866,14 @@ Must be one of: | **Defined in** | #/definitions/ZarfComponentActions |
- onCreate - + + onCreate  
+

onCreate

+ **Description:** Actions to run during package creation | | | @@ -801,12 +883,14 @@ Must be one of: | **Defined in** | #/definitions/ZarfComponentActionSet |
- defaults - + + defaults  
+

defaults

+ **Description:** Default configuration for all actions in this set | | | @@ -816,12 +900,14 @@ Must be one of: | **Defined in** | #/definitions/ZarfComponentActionDefaults |
- mute - + + mute  
+

mute

+ **Description:** Hide the output of commands during execution (default false) | | | @@ -832,12 +918,14 @@ Must be one of:
- maxTotalSeconds - + + maxTotalSeconds  
+

maxTotalSeconds

+ **Description:** Default timeout in seconds for commands (default to 0 | | | @@ -848,12 +936,14 @@ Must be one of:
- maxRetries - + + maxRetries  
+

maxRetries

+ **Description:** Retry commands given number of times if they fail (default 0) | | | @@ -864,12 +954,14 @@ Must be one of:
- dir - + + dir  
+

dir

+ **Description:** Working directory for commands (default CWD) | | | @@ -880,12 +972,14 @@ Must be one of:
- env - + + env  
+

env

+ **Description:** Additional environment variables for commands | | | @@ -900,7 +994,7 @@ Must be one of: | **Additional items** | False | | **Tuple validation** | See below | - ## env items + ##### env items | | | | -------- | -------- | @@ -913,12 +1007,14 @@ Must be one of:
- before - + + before  
+

before

+ **Description:** Actions to run at the start of an operation | | | @@ -933,7 +1029,7 @@ Must be one of: | **Additional items** | False | | **Tuple validation** | See below | - ## ZarfComponentAction + ##### ZarfComponentAction | | | | ------------------------- | -------------------------------------------------------------------------------------------------------- | @@ -942,12 +1038,14 @@ Must be one of: | **Defined in** | #/definitions/ZarfComponentAction |
- mute - + + mute  
+

mute

+ **Description:** Hide the output of the command during package deployment (default false) | | | @@ -958,12 +1056,14 @@ Must be one of:
- maxTotalSeconds - + + maxTotalSeconds  
+

maxTotalSeconds

+ **Description:** Timeout in seconds for the command (default to 0 | | | @@ -974,12 +1074,14 @@ Must be one of:
- maxRetries - + + maxRetries  
+

maxRetries

+ **Description:** Retry the command if it fails up to given number of times (default 0) | | | @@ -990,12 +1092,14 @@ Must be one of:
- dir - + + dir  
+

dir

+ **Description:** The working directory to run the command in (default is CWD) | | | @@ -1006,12 +1110,14 @@ Must be one of:
- env - + + env  
+

env

+ **Description:** Additional environment variables to set for the command | | | @@ -1026,7 +1132,7 @@ Must be one of: | **Additional items** | False | | **Tuple validation** | See below | - ## env items + ##### env items | | | | -------- | -------- | @@ -1036,12 +1142,14 @@ Must be one of:
- cmd - + + cmd  
+

cmd

+ **Description:** The command to run. Must specify either cmd or wait for the action to do anything. | | | @@ -1052,12 +1160,14 @@ Must be one of:
- setVariable - + + setVariable  
+

setVariable

+ **Description:** (Cmd only) The name of a variable to update with the output of the command. This variable will be available to all remaining actions and components in the package. | | | @@ -1072,12 +1182,14 @@ Must be one of:
- description - + + description  
+

description

+ **Description:** Description of the action to be displayed during package execution instead of the command | | | @@ -1088,12 +1200,14 @@ Must be one of:
- wait - + + wait  
+

wait

+ **Description:** Wait for a condition to be met before continuing. Must specify either cmd or wait for the action. See the 'zarf tools wait-for' command for more info. | | | @@ -1103,12 +1217,14 @@ Must be one of: | **Defined in** | #/definitions/ZarfComponentActionWait |
- cluster - + + cluster  
+

cluster

+ **Description:** Wait for a condition to be met in the cluster before continuing. Only one of cluster or network can be specified. | | | @@ -1118,12 +1234,14 @@ Must be one of: | **Defined in** | #/definitions/ZarfComponentActionWaitCluster |
- kind * - + + kind *  
+

kind

+ ![Required](https://img.shields.io/badge/Required-red) **Description:** The kind of resource to wait for (e.g. Pod; Deployment; etc.) @@ -1136,12 +1254,14 @@ Must be one of:
- name * - + + name *  
+

name

+ ![Required](https://img.shields.io/badge/Required-red) | | | @@ -1152,12 +1272,14 @@ Must be one of:
- namespace - + + namespace  
+

namespace

+ **Description:** The namespace of the resource to wait for | | | @@ -1168,12 +1290,14 @@ Must be one of:
- condition - + + condition  
+

condition

+ **Description:** The condition to wait for (e.g. Ready; Available; etc.). Defaults to exist | | | @@ -1187,12 +1311,14 @@ Must be one of:
- network - + + network  
+

network

+ **Description:** Wait for a condition to be met on the network before continuing. Only one of cluster or network can be specified. | | | @@ -1202,12 +1328,14 @@ Must be one of: | **Defined in** | #/definitions/ZarfComponentActionWaitNetwork |
- protocol * - + + protocol *  
+

protocol

+ ![Required](https://img.shields.io/badge/Required-red) **Description:** The protocol to wait for (e.g. tcp; http; etc.). @@ -1227,12 +1355,14 @@ Must be one of:
- address * - + + address *  
+

address

+ ![Required](https://img.shields.io/badge/Required-red) **Description:** The address to wait for (e.g. localhost:8080; 1.1.1.1; etc.) @@ -1245,12 +1375,14 @@ Must be one of:
- code - + + code  
+

code

+ **Description:** The HTTP status code to wait for if using http or https (e.g. 200; 404; etc.) | | | @@ -1270,12 +1402,14 @@ Must be one of:
- after - + + after  
+

after

+ **Description:** Actions to run at the end of an operation | | | @@ -1290,7 +1424,7 @@ Must be one of: | **Additional items** | False | | **Tuple validation** | See below | - ## ZarfComponentAction + ##### ZarfComponentAction | | | | ------------------------- | -------------------------------------------------------------------------------------------------------- | @@ -1302,12 +1436,14 @@ Must be one of:
- onSuccess - + + onSuccess  
+

onSuccess

+ **Description:** Actions to run if all operations succeed | | | @@ -1322,7 +1458,7 @@ Must be one of: | **Additional items** | False | | **Tuple validation** | See below | - ## ZarfComponentAction + ##### ZarfComponentAction | | | | ------------------------- | -------------------------------------------------------------------------------------------------------- | @@ -1334,12 +1470,14 @@ Must be one of:
- onFailure - + + onFailure  
+

onFailure

+ **Description:** Actions to run if all operations fail | | | @@ -1354,7 +1492,7 @@ Must be one of: | **Additional items** | False | | **Tuple validation** | See below | - ## ZarfComponentAction + ##### ZarfComponentAction | | | | ------------------------- | -------------------------------------------------------------------------------------------------------- | @@ -1369,12 +1507,14 @@ Must be one of:
- onDeploy - + + onDeploy  
+

onDeploy

+ **Description:** Actions to run during package deployment | | | @@ -1387,12 +1527,14 @@ Must be one of:
- onRemove - + + onRemove  
+

onRemove

+ **Description:** Actions to run during package removal | | | @@ -1408,12 +1550,14 @@ Must be one of:
- files - + + files  
+

files

+ **Description:** Files to place on disk during package deployment | | | @@ -1428,7 +1572,7 @@ Must be one of: | **Additional items** | False | | **Tuple validation** | See below | - ## ZarfFile + ##### ZarfFile | | | | ------------------------- | -------------------------------------------------------------------------------------------------------- | @@ -1437,12 +1581,14 @@ Must be one of: | **Defined in** | #/definitions/ZarfFile |
- source * - + + source *  
+

source

+ ![Required](https://img.shields.io/badge/Required-red) **Description:** Local file path or remote URL to add to the package @@ -1455,12 +1601,14 @@ Must be one of:
- shasum - + + shasum  
+

shasum

+ **Description:** SHA256 checksum of the file if the source is a URL | | | @@ -1471,12 +1619,14 @@ Must be one of:
- target * - + + target *  
+

target

+ ![Required](https://img.shields.io/badge/Required-red) **Description:** The absolute or relative path where the file should be copied to during package deploy @@ -1489,12 +1639,14 @@ Must be one of:
- executable - + + executable  
+

executable

+ **Description:** Determines if the file should be made executable during package deploy | | | @@ -1505,12 +1657,14 @@ Must be one of:
- symlinks - + + symlinks  
+

symlinks

+ **Description:** List of symlinks to create during package deploy | | | @@ -1525,7 +1679,7 @@ Must be one of: | **Additional items** | False | | **Tuple validation** | See below | - ## symlinks items + ##### symlinks items | | | | -------- | -------- | @@ -1538,12 +1692,14 @@ Must be one of:
- charts - + + charts  
+

charts

+ **Description:** Helm charts to install during package deploy | | | @@ -1558,7 +1714,7 @@ Must be one of: | **Additional items** | False | | **Tuple validation** | See below | - ## ZarfChart + ##### ZarfChart | | | | ------------------------- | -------------------------------------------------------------------------------------------------------- | @@ -1575,7 +1731,7 @@ Must be one of:
-## Property `url` +##### Property `url` **Title:** url @@ -1584,13 +1740,13 @@ Must be one of: | **Type** | `object` | | **Additional properties** | [![Any type: allowed](https://img.shields.io/badge/Any%20type-allowed-green)](# "Additional Properties of any type are allowed.") | -### The following properties are required +##### The following properties are required * url
-## Property `localPath` +##### Property `localPath` **Title:** localPath @@ -1599,7 +1755,7 @@ Must be one of: | **Type** | `object` | | **Additional properties** | [![Any type: allowed](https://img.shields.io/badge/Any%20type-allowed-green)](# "Additional Properties of any type are allowed.") | -### The following properties are required +##### The following properties are required * localPath
@@ -1607,12 +1763,14 @@ Must be one of:
- name * - + + name *  
+

name

+ ![Required](https://img.shields.io/badge/Required-red) **Description:** The name of the chart to deploy; this should be the name of the chart as it is installed in the helm repo @@ -1625,12 +1783,14 @@ Must be one of:
- releaseName - + + releaseName  
+

releaseName

+ **Description:** The name of the release to create; defaults to the name of the chart | | | @@ -1641,12 +1801,14 @@ Must be one of:
- url - + + url  
+

url

+ **Description:** The URL of the chart repository or git url if the chart is using a git repo instead of helm repo | | | @@ -1657,12 +1819,14 @@ Must be one of:
- version * - + + version *  
+

version

+ ![Required](https://img.shields.io/badge/Required-red) **Description:** The version of the chart to deploy; for git-based charts this is also the tag of the git repo @@ -1675,12 +1839,14 @@ Must be one of:
- namespace * - + + namespace *  
+

namespace

+ ![Required](https://img.shields.io/badge/Required-red) **Description:** The namespace to deploy the chart to @@ -1693,12 +1859,14 @@ Must be one of:
- valuesFiles - + + valuesFiles  
+

valuesFiles

+ **Description:** List of values files to include in the package; these will be merged together | | | @@ -1713,7 +1881,7 @@ Must be one of: | **Additional items** | False | | **Tuple validation** | See below | - ## valuesFiles items + ##### valuesFiles items | | | | -------- | -------- | @@ -1723,12 +1891,14 @@ Must be one of:
- gitPath - + + gitPath  
+

gitPath

+ **Description:** The path to the chart in the repo if using a git repo instead of a helm repo | | | @@ -1739,12 +1909,14 @@ Must be one of:
- localPath - + + localPath  
+

localPath

+ **Description:** The path to the chart folder | | | @@ -1755,12 +1927,14 @@ Must be one of:
- noWait - + + noWait  
+

noWait

+ **Description:** Wait for chart resources to be ready before continuing | | | @@ -1774,12 +1948,14 @@ Must be one of:
- manifests - + + manifests  
+

manifests

+ | | | | -------- | ------- | | **Type** | `array` | @@ -1792,7 +1968,7 @@ Must be one of: | **Additional items** | False | | **Tuple validation** | See below | - ## ZarfManifest + ##### ZarfManifest | | | | ------------------------- | -------------------------------------------------------------------------------------------------------- | @@ -1801,12 +1977,14 @@ Must be one of: | **Defined in** | #/definitions/ZarfManifest |
- name * - + + name *  
+

name

+ ![Required](https://img.shields.io/badge/Required-red) **Description:** A name to give this collection of manifests; this will become the name of the dynamically-created helm chart @@ -1819,12 +1997,14 @@ Must be one of:
- namespace - + + namespace  
+

namespace

+ **Description:** The namespace to deploy the manifests to | | | @@ -1835,12 +2015,14 @@ Must be one of:
- files - + + files  
+

files

+ **Description:** List of individual K8s YAML files to deploy (in order) | | | @@ -1855,7 +2037,7 @@ Must be one of: | **Additional items** | False | | **Tuple validation** | See below | - ## files items + ##### files items | | | | -------- | -------- | @@ -1865,12 +2047,14 @@ Must be one of:
- kustomizeAllowAnyDirectory - + + kustomizeAllowAnyDirectory  
+

kustomizeAllowAnyDirectory

+ **Description:** Allow traversing directory above the current directory if needed for kustomization | | | @@ -1881,12 +2065,14 @@ Must be one of:
- kustomizations - + + kustomizations  
+

kustomizations

+ **Description:** List of kustomization paths to include in the package | | | @@ -1901,7 +2087,7 @@ Must be one of: | **Additional items** | False | | **Tuple validation** | See below | - ## kustomizations items + ##### kustomizations items | | | | -------- | -------- | @@ -1911,12 +2097,14 @@ Must be one of:
- noWait - + + noWait  
+

noWait

+ **Description:** Wait for manifest resources to be ready before continuing | | | @@ -1930,12 +2118,14 @@ Must be one of:
- images - + + images  
+

images

+ **Description:** List of OCI images to include in the package | | | @@ -1950,7 +2140,7 @@ Must be one of: | **Additional items** | False | | **Tuple validation** | See below | - ## images items + ##### images items | | | | -------- | -------- | @@ -1960,12 +2150,14 @@ Must be one of:
- repos - + + repos  
+

repos

+ **Description:** List of git repos to include in the package | | | @@ -1980,7 +2172,7 @@ Must be one of: | **Additional items** | False | | **Tuple validation** | See below | - ## repos items + ##### repos items | | | | -------- | -------- | @@ -1990,12 +2182,14 @@ Must be one of:
- dataInjections - + + dataInjections  
+

dataInjections

+ **Description:** Datasets to inject into a pod in the target cluster | | | @@ -2010,7 +2204,7 @@ Must be one of: | **Additional items** | False | | **Tuple validation** | See below | - ## ZarfDataInjection + ##### ZarfDataInjection | | | | ------------------------- | -------------------------------------------------------------------------------------------------------- | @@ -2019,12 +2213,14 @@ Must be one of: | **Defined in** | #/definitions/ZarfDataInjection |
- source * - + + source *  
+

source

+ ![Required](https://img.shields.io/badge/Required-red) **Description:** A path to a local folder or file to inject into the given target pod + container @@ -2037,12 +2233,14 @@ Must be one of:
- target * - + + target *  
+

target

+ ![Required](https://img.shields.io/badge/Required-red) **Description:** The target pod + container to inject the data into @@ -2054,12 +2252,14 @@ Must be one of: | **Defined in** | #/definitions/ZarfContainerTarget |
- namespace * - + + namespace *  
+

namespace

+ ![Required](https://img.shields.io/badge/Required-red) **Description:** The namespace to target for data injection @@ -2072,12 +2272,14 @@ Must be one of:
- selector * - + + selector *  
+

selector

+ ![Required](https://img.shields.io/badge/Required-red) **Description:** The K8s selector to target for data injection @@ -2096,12 +2298,14 @@ Must be one of:
- container * - + + container *  
+

container

+ ![Required](https://img.shields.io/badge/Required-red) **Description:** The container name to target for data injection @@ -2114,12 +2318,14 @@ Must be one of:
- path * - + + path *  
+

path

+ ![Required](https://img.shields.io/badge/Required-red) **Description:** The path within the container to copy the data into @@ -2135,12 +2341,14 @@ Must be one of:
- compress - + + compress  
+

compress

+ **Description:** Compress the data before transmitting using gzip. Note: this requires support for tar/gzip locally and in the target image. | | | @@ -2157,12 +2365,14 @@ Must be one of:
- variables - + + variables  
+

variables

+ **Description:** Variable template values applied on deploy for K8s resources | | | @@ -2177,7 +2387,7 @@ Must be one of: | **Additional items** | False | | **Tuple validation** | See below | - ## ZarfPackageVariable + ##### ZarfPackageVariable | | | | ------------------------- | -------------------------------------------------------------------------------------------------------- | @@ -2186,12 +2396,14 @@ Must be one of: | **Defined in** | #/definitions/ZarfPackageVariable |
- name * - + + name *  
+

name

+ ![Required](https://img.shields.io/badge/Required-red) **Description:** The name to be used for the variable @@ -2208,12 +2420,14 @@ Must be one of:
- description - + + description  
+

description

+ **Description:** A description of the variable to be used when prompting the user a value | | | @@ -2224,12 +2438,14 @@ Must be one of:
- default - + + default  
+

default

+ **Description:** The default value to use for the variable | | | @@ -2240,12 +2456,14 @@ Must be one of:
- prompt - + + prompt  
+

prompt

+ **Description:** Whether to prompt the user for input for this variable | | | @@ -2259,12 +2477,14 @@ Must be one of:
- constants - + + constants  
+

constants

+ **Description:** Constant template values applied on deploy for K8s resources | | | @@ -2279,7 +2499,7 @@ Must be one of: | **Additional items** | False | | **Tuple validation** | See below | - ## ZarfPackageConstant + ##### ZarfPackageConstant | | | | ------------------------- | -------------------------------------------------------------------------------------------------------- | @@ -2288,12 +2508,14 @@ Must be one of: | **Defined in** | #/definitions/ZarfPackageConstant |
- name * - + + name *  
+

name

+ ![Required](https://img.shields.io/badge/Required-red) **Description:** The name to be used for the constant @@ -2310,12 +2532,14 @@ Must be one of:
- value * - + + value *  
+

value

+ ![Required](https://img.shields.io/badge/Required-red) **Description:** The value to set for the constant during deploy @@ -2328,12 +2552,14 @@ Must be one of:
- description - + + description  
+

description

+ **Description:** A description of the constant to explain its purpose on package create or deploy confirmation prompts | | | diff --git a/hack/zarf-jsfh-template/base.md b/hack/zarf-jsfh-template/base.md index 43d9c31d49..3eedb82c45 100644 --- a/hack/zarf-jsfh-template/base.md +++ b/hack/zarf-jsfh-template/base.md @@ -1,7 +1,6 @@ -{% set depth = 0 %} -{{ schema.keywords.get("title").literal | default("Zarf Package Schema") | md_heading(depth) }} +{{ schema.keywords.get("title").literal | default("Zarf Package Schema") | md_heading(0) }} {% set contentBase %} -{% with schema=schema, skip_headers=False, depth=depth %} +{% with schema=schema, skip_headers=False %} {% include "content.md" %} {% endwith %} {% endset %} diff --git a/hack/zarf-jsfh-template/content.md b/hack/zarf-jsfh-template/content.md index 923dadd8cf..ebce47938f 100644 --- a/hack/zarf-jsfh-template/content.md +++ b/hack/zarf-jsfh-template/content.md @@ -8,7 +8,6 @@ #} {# context parameters default values #} {% set skip_headers = skip_headers or False %} -{% set depth = depth or 0 %} {# end context parameters #} {% set keys = schema.keywords %} @@ -27,7 +26,7 @@ {% if schema.should_be_a_link(config) %} {% elif schema.refers_to -%} - {%- with schema=schema.refers_to_merged, skip_headers=True, depth=depth -%} + {%- with schema=schema.refers_to_merged, skip_headers=True -%} {% include "content.md" %} {% endwith %} {% else %} @@ -62,7 +61,7 @@ {# Conditional subschema, or if-then-else section #} {% if schema.has_conditional %} - {% with skip_headers=False, depth=depth+1 %} + {% with skip_headers=False %} {% include "section_conditional_subschema.md" %} {% endwith %} {% endif %} diff --git a/hack/zarf-jsfh-template/section_array.md b/hack/zarf-jsfh-template/section_array.md index 5c7367946b..a3d3613e1f 100644 --- a/hack/zarf-jsfh-template/section_array.md +++ b/hack/zarf-jsfh-template/section_array.md @@ -1,12 +1,12 @@ {{ schema | md_array_restrictions | md_generate_table }} -{% if schema.array_items_def %} {% filter md_heading(depth+1) %} {% with schema=schema.array_items_def %}{%- include "breadcrumbs.md" %}{% endwith %} {% endfilter %} {% with schema=schema.array_items_def, skip_headers=False, skip_required=True %} {% include "content.md" %} {% endwith %} {% endif %} +{% if schema.array_items_def %} {% filter md_heading(4) %} {% with schema=schema.array_items_def %}{%- include "breadcrumbs.md" %}{% endwith %} {% endfilter %} {% with schema=schema.array_items_def, skip_headers=False, skip_required=True %} {% include "content.md" %} {% endwith %} {% endif %} {% if schema.kw_items %} {{ schema | md_array_items_restrictions | md_generate_table }} {% for item in schema.kw_items %} - {% filter md_heading(depth+1, item.html_id) %} + {% filter md_heading(5, item.html_id) %} {% with schema=item %}{%- include "breadcrumbs.md" %}{% endwith %} {% endfilter %} {% with schema=item, skip_headers=False, skip_required=True %} @@ -16,7 +16,7 @@ {% endif %} {% if schema.kw_contains and schema.kw_contains.literal != {} %} -{{ "At least one of the items must be" | md_heading(depth+1) }} +{{ "At least one of the items must be" | md_heading(4) }} {% with schema=schema.kw_contains, skip_headers=False, skip_required=True %} {% include "content.md" %} {% endwith %} diff --git a/hack/zarf-jsfh-template/section_conditional_subschema.md b/hack/zarf-jsfh-template/section_conditional_subschema.md index fdcc2c4055..c094fbc27d 100644 --- a/hack/zarf-jsfh-template/section_conditional_subschema.md +++ b/hack/zarf-jsfh-template/section_conditional_subschema.md @@ -2,22 +2,22 @@ {% set first_property = schema.kw_if | get_first_property %} {% if schema.kw_then %} - {%- filter md_heading(depth) -%}If ( + {%- filter md_heading(4) -%}If ( {{- first_property.property_name | md_escape_for_table -}} {{- " = " -}} {{- first_property.kw_const.literal | python_to_json -}} ){%- endfilter -%} - {% with schema=schema.kw_then, skip_headers=False, depth=depth %} + {% with schema=schema.kw_then, skip_headers=False%} {% include "content.md" %} {% endwith %} {% endif %} {% if schema.kw_else %} - {%- filter md_heading(depth) -%}Else (i.e. {{ " " }} + {%- filter md_heading(4) -%}Else (i.e. {{ " " }} {{- first_property.property_name | md_escape_for_table -}} {{- " != " -}} {{- first_property.kw_const.literal | python_to_json -}} ){%- endfilter -%} - {% with schema=schema.kw_else, skip_headers=False, depth=depth %} + {% with schema=schema.kw_else, skip_headers=False %} {% include "content.md" %} {% endwith %} {% endif %} diff --git a/hack/zarf-jsfh-template/section_not.md b/hack/zarf-jsfh-template/section_not.md index b5be138302..48bc195964 100644 --- a/hack/zarf-jsfh-template/section_not.md +++ b/hack/zarf-jsfh-template/section_not.md @@ -1,4 +1,4 @@ -{{ "Must **not** be" | md_heading(depth+1) }} -{% with schema=schema.kw_not, skip_headers=False, depth=depth+1, skip_required=True %} +{{ "Must **not** be" | md_heading(4) }} +{% with schema=schema.kw_not, skip_headers=False, skip_required=True %} {% include "content.md" %} {% endwith %} diff --git a/hack/zarf-jsfh-template/section_properties_details.md b/hack/zarf-jsfh-template/section_properties_details.md index 51a4f36643..2afb3ba2b3 100644 --- a/hack/zarf-jsfh-template/section_properties_details.md +++ b/hack/zarf-jsfh-template/section_properties_details.md @@ -7,22 +7,24 @@ {% set description = sub_property | get_description %}
-{% filter md_heading(depth + 1, html_id, True) -%} + + {% filter md_heading(3, html_id, True) -%} {%- filter replace('\n', '') -%} - {%- if sub_property is deprecated -%}~~{%- endif -%} - {%- if sub_property.is_pattern_property %} Pattern Property{% endif %} {% with schema=sub_property %}{%- include "breadcrumbs.md" %} {% endwith %} - {%- if not skip_required and sub_property.property_name -%} - {{ "*" if sub_property.is_required_property else "" -}} - {%- endif -%} - {%- if sub_property is deprecated -%}~~{%- endif -%} + {%- if sub_property is deprecated -%}~~{%- endif -%} + {%- if sub_property.is_pattern_property %} Pattern Property{% endif %} {% with schema=sub_property %}{%- include "breadcrumbs.md" %} {% endwith %} + {%- if not skip_required and sub_property.property_name -%} + {{ "*" if sub_property.is_required_property else "" -}} + {%- endif -%} + {%- if sub_property is deprecated -%}~~{%- endif -%} + {%- endfilter %} {%- endfilter %} - {%- endfilter %} -  
+

{%- if sub_property.is_pattern_property %} Pattern Property{% endif %} {% with schema=sub_property %}{%- include "breadcrumbs.md" %} {% endwith %}

+ {% with schema=sub_property, skip_headers=False %} {% if sub_property.is_pattern_property %} :::note diff --git a/hack/zarf-jsfh-template/section_undocumented_required_properties.md b/hack/zarf-jsfh-template/section_undocumented_required_properties.md index 0c0a6772c0..5c36df8b60 100644 --- a/hack/zarf-jsfh-template/section_undocumented_required_properties.md +++ b/hack/zarf-jsfh-template/section_undocumented_required_properties.md @@ -1,6 +1,6 @@ {% set undocumented_required_properties = schema | get_undocumented_required_properties %} {% if undocumented_required_properties%} -{{ "The following properties are required" | md_heading(depth+1) }} +{{ "The following properties are required" | md_heading(4) }} {% for required_property in undocumented_required_properties %} * {{ required_property }} {% endfor %} diff --git a/hack/zarf-jsfh-template/tabbed_section.md b/hack/zarf-jsfh-template/tabbed_section.md index 8dce1feb86..bbaa1825d7 100644 --- a/hack/zarf-jsfh-template/tabbed_section.md +++ b/hack/zarf-jsfh-template/tabbed_section.md @@ -5,11 +5,11 @@ {% for node in current_node.array_items %}
- {% filter md_heading(depth+1, node.html_id) -%} + {% filter md_heading(4, node.html_id) -%} {% if node.is_pattern_property %}Pattern{% endif %} Property `{% with schema=node %}{%- include "breadcrumbs.md" %}{% endwith %}` {%- endfilter %} - {% with schema=node, skip_headers=False, depth=depth+1 %} + {% with schema=node, skip_headers=False %} {% include "content.md" %} {% endwith %} From b9fbc66ce345ca2ca7b9b9785b6581dbfd7ffe54 Mon Sep 17 00:00:00 2001 From: Wayne Starr Date: Fri, 24 Feb 2023 12:42:19 -0600 Subject: [PATCH 04/12] Fix 0 indexed headers --- docs/4-user-guide/3-zarf-schema.md | 56 +++++++++---------- hack/zarf-jsfh-template/section_array.md | 6 +- .../section_conditional_subschema.md | 4 +- hack/zarf-jsfh-template/section_not.md | 2 +- .../section_properties_details.md | 2 +- ...ection_undocumented_required_properties.md | 2 +- hack/zarf-jsfh-template/tabbed_section.md | 2 +- 7 files changed, 37 insertions(+), 37 deletions(-) diff --git a/docs/4-user-guide/3-zarf-schema.md b/docs/4-user-guide/3-zarf-schema.md index d133803c8c..03a109cba2 100644 --- a/docs/4-user-guide/3-zarf-schema.md +++ b/docs/4-user-guide/3-zarf-schema.md @@ -340,7 +340,7 @@ Must be one of: | **Additional items** | False | | **Tuple validation** | See below | - ##### migrations items + #### migrations items | | | | -------- | -------- | @@ -377,7 +377,7 @@ Must be one of: | **Additional items** | False | | **Tuple validation** | See below | - ##### ZarfComponent + #### ZarfComponent | | | | ------------------------- | -------------------------------------------------------------------------------------------------------- | @@ -569,7 +569,7 @@ Must be one of: | **Additional items** | False | | **Tuple validation** | See below | - ##### distros items + #### distros items | | | | -------- | -------- | @@ -772,7 +772,7 @@ Must be one of: | **Additional items** | False | | **Tuple validation** | See below | - ##### prepare items + #### prepare items | | | | -------- | -------- | @@ -804,7 +804,7 @@ Must be one of: | **Additional items** | False | | **Tuple validation** | See below | - ##### before items + #### before items | | | | -------- | -------- | @@ -836,7 +836,7 @@ Must be one of: | **Additional items** | False | | **Tuple validation** | See below | - ##### after items + #### after items | | | | -------- | -------- | @@ -994,7 +994,7 @@ Must be one of: | **Additional items** | False | | **Tuple validation** | See below | - ##### env items + #### env items | | | | -------- | -------- | @@ -1029,7 +1029,7 @@ Must be one of: | **Additional items** | False | | **Tuple validation** | See below | - ##### ZarfComponentAction + #### ZarfComponentAction | | | | ------------------------- | -------------------------------------------------------------------------------------------------------- | @@ -1132,7 +1132,7 @@ Must be one of: | **Additional items** | False | | **Tuple validation** | See below | - ##### env items + #### env items | | | | -------- | -------- | @@ -1424,7 +1424,7 @@ Must be one of: | **Additional items** | False | | **Tuple validation** | See below | - ##### ZarfComponentAction + #### ZarfComponentAction | | | | ------------------------- | -------------------------------------------------------------------------------------------------------- | @@ -1458,7 +1458,7 @@ Must be one of: | **Additional items** | False | | **Tuple validation** | See below | - ##### ZarfComponentAction + #### ZarfComponentAction | | | | ------------------------- | -------------------------------------------------------------------------------------------------------- | @@ -1492,7 +1492,7 @@ Must be one of: | **Additional items** | False | | **Tuple validation** | See below | - ##### ZarfComponentAction + #### ZarfComponentAction | | | | ------------------------- | -------------------------------------------------------------------------------------------------------- | @@ -1572,7 +1572,7 @@ Must be one of: | **Additional items** | False | | **Tuple validation** | See below | - ##### ZarfFile + #### ZarfFile | | | | ------------------------- | -------------------------------------------------------------------------------------------------------- | @@ -1679,7 +1679,7 @@ Must be one of: | **Additional items** | False | | **Tuple validation** | See below | - ##### symlinks items + #### symlinks items | | | | -------- | -------- | @@ -1714,7 +1714,7 @@ Must be one of: | **Additional items** | False | | **Tuple validation** | See below | - ##### ZarfChart + #### ZarfChart | | | | ------------------------- | -------------------------------------------------------------------------------------------------------- | @@ -1731,7 +1731,7 @@ Must be one of:
-##### Property `url` +#### Property `url` **Title:** url @@ -1740,13 +1740,13 @@ Must be one of: | **Type** | `object` | | **Additional properties** | [![Any type: allowed](https://img.shields.io/badge/Any%20type-allowed-green)](# "Additional Properties of any type are allowed.") | -##### The following properties are required +#### The following properties are required * url
-##### Property `localPath` +#### Property `localPath` **Title:** localPath @@ -1755,7 +1755,7 @@ Must be one of: | **Type** | `object` | | **Additional properties** | [![Any type: allowed](https://img.shields.io/badge/Any%20type-allowed-green)](# "Additional Properties of any type are allowed.") | -##### The following properties are required +#### The following properties are required * localPath
@@ -1881,7 +1881,7 @@ Must be one of: | **Additional items** | False | | **Tuple validation** | See below | - ##### valuesFiles items + #### valuesFiles items | | | | -------- | -------- | @@ -1968,7 +1968,7 @@ Must be one of: | **Additional items** | False | | **Tuple validation** | See below | - ##### ZarfManifest + #### ZarfManifest | | | | ------------------------- | -------------------------------------------------------------------------------------------------------- | @@ -2037,7 +2037,7 @@ Must be one of: | **Additional items** | False | | **Tuple validation** | See below | - ##### files items + #### files items | | | | -------- | -------- | @@ -2087,7 +2087,7 @@ Must be one of: | **Additional items** | False | | **Tuple validation** | See below | - ##### kustomizations items + #### kustomizations items | | | | -------- | -------- | @@ -2140,7 +2140,7 @@ Must be one of: | **Additional items** | False | | **Tuple validation** | See below | - ##### images items + #### images items | | | | -------- | -------- | @@ -2172,7 +2172,7 @@ Must be one of: | **Additional items** | False | | **Tuple validation** | See below | - ##### repos items + #### repos items | | | | -------- | -------- | @@ -2204,7 +2204,7 @@ Must be one of: | **Additional items** | False | | **Tuple validation** | See below | - ##### ZarfDataInjection + #### ZarfDataInjection | | | | ------------------------- | -------------------------------------------------------------------------------------------------------- | @@ -2387,7 +2387,7 @@ Must be one of: | **Additional items** | False | | **Tuple validation** | See below | - ##### ZarfPackageVariable + #### ZarfPackageVariable | | | | ------------------------- | -------------------------------------------------------------------------------------------------------- | @@ -2499,7 +2499,7 @@ Must be one of: | **Additional items** | False | | **Tuple validation** | See below | - ##### ZarfPackageConstant + #### ZarfPackageConstant | | | | ------------------------- | -------------------------------------------------------------------------------------------------------- | diff --git a/hack/zarf-jsfh-template/section_array.md b/hack/zarf-jsfh-template/section_array.md index a3d3613e1f..52df365554 100644 --- a/hack/zarf-jsfh-template/section_array.md +++ b/hack/zarf-jsfh-template/section_array.md @@ -1,12 +1,12 @@ {{ schema | md_array_restrictions | md_generate_table }} -{% if schema.array_items_def %} {% filter md_heading(4) %} {% with schema=schema.array_items_def %}{%- include "breadcrumbs.md" %}{% endwith %} {% endfilter %} {% with schema=schema.array_items_def, skip_headers=False, skip_required=True %} {% include "content.md" %} {% endwith %} {% endif %} +{% if schema.array_items_def %} {% filter md_heading(3) %} {% with schema=schema.array_items_def %}{%- include "breadcrumbs.md" %}{% endwith %} {% endfilter %} {% with schema=schema.array_items_def, skip_headers=False, skip_required=True %} {% include "content.md" %} {% endwith %} {% endif %} {% if schema.kw_items %} {{ schema | md_array_items_restrictions | md_generate_table }} {% for item in schema.kw_items %} - {% filter md_heading(5, item.html_id) %} + {% filter md_heading(4, item.html_id) %} {% with schema=item %}{%- include "breadcrumbs.md" %}{% endwith %} {% endfilter %} {% with schema=item, skip_headers=False, skip_required=True %} @@ -16,7 +16,7 @@ {% endif %} {% if schema.kw_contains and schema.kw_contains.literal != {} %} -{{ "At least one of the items must be" | md_heading(4) }} +{{ "At least one of the items must be" | md_heading(3) }} {% with schema=schema.kw_contains, skip_headers=False, skip_required=True %} {% include "content.md" %} {% endwith %} diff --git a/hack/zarf-jsfh-template/section_conditional_subschema.md b/hack/zarf-jsfh-template/section_conditional_subschema.md index c094fbc27d..69d2d56374 100644 --- a/hack/zarf-jsfh-template/section_conditional_subschema.md +++ b/hack/zarf-jsfh-template/section_conditional_subschema.md @@ -2,7 +2,7 @@ {% set first_property = schema.kw_if | get_first_property %} {% if schema.kw_then %} - {%- filter md_heading(4) -%}If ( + {%- filter md_heading(3) -%}If ( {{- first_property.property_name | md_escape_for_table -}} {{- " = " -}} {{- first_property.kw_const.literal | python_to_json -}} @@ -12,7 +12,7 @@ {% endwith %} {% endif %} {% if schema.kw_else %} - {%- filter md_heading(4) -%}Else (i.e. {{ " " }} + {%- filter md_heading(3) -%}Else (i.e. {{ " " }} {{- first_property.property_name | md_escape_for_table -}} {{- " != " -}} {{- first_property.kw_const.literal | python_to_json -}} diff --git a/hack/zarf-jsfh-template/section_not.md b/hack/zarf-jsfh-template/section_not.md index 48bc195964..bf2c9af388 100644 --- a/hack/zarf-jsfh-template/section_not.md +++ b/hack/zarf-jsfh-template/section_not.md @@ -1,4 +1,4 @@ -{{ "Must **not** be" | md_heading(4) }} +{{ "Must **not** be" | md_heading(3) }} {% with schema=schema.kw_not, skip_headers=False, skip_required=True %} {% include "content.md" %} {% endwith %} diff --git a/hack/zarf-jsfh-template/section_properties_details.md b/hack/zarf-jsfh-template/section_properties_details.md index 2afb3ba2b3..7f427ac469 100644 --- a/hack/zarf-jsfh-template/section_properties_details.md +++ b/hack/zarf-jsfh-template/section_properties_details.md @@ -8,7 +8,7 @@ {% set description = sub_property | get_description %}
- {% filter md_heading(3, html_id, True) -%} + {% filter md_heading(2, html_id, True) -%} {%- filter replace('\n', '') -%} {%- if sub_property is deprecated -%}~~{%- endif -%} {%- if sub_property.is_pattern_property %} Pattern Property{% endif %} {% with schema=sub_property %}{%- include "breadcrumbs.md" %} {% endwith %} diff --git a/hack/zarf-jsfh-template/section_undocumented_required_properties.md b/hack/zarf-jsfh-template/section_undocumented_required_properties.md index 5c36df8b60..20e243d542 100644 --- a/hack/zarf-jsfh-template/section_undocumented_required_properties.md +++ b/hack/zarf-jsfh-template/section_undocumented_required_properties.md @@ -1,6 +1,6 @@ {% set undocumented_required_properties = schema | get_undocumented_required_properties %} {% if undocumented_required_properties%} -{{ "The following properties are required" | md_heading(4) }} +{{ "The following properties are required" | md_heading(3) }} {% for required_property in undocumented_required_properties %} * {{ required_property }} {% endfor %} diff --git a/hack/zarf-jsfh-template/tabbed_section.md b/hack/zarf-jsfh-template/tabbed_section.md index bbaa1825d7..dadaeeaaac 100644 --- a/hack/zarf-jsfh-template/tabbed_section.md +++ b/hack/zarf-jsfh-template/tabbed_section.md @@ -5,7 +5,7 @@ {% for node in current_node.array_items %}
- {% filter md_heading(4, node.html_id) -%} + {% filter md_heading(3, node.html_id) -%} {% if node.is_pattern_property %}Pattern{% endif %} Property `{% with schema=node %}{%- include "breadcrumbs.md" %}{% endwith %}` {%- endfilter %} From f34d9def99f25451d60f633c019c9404cd7bf289 Mon Sep 17 00:00:00 2001 From: Wayne Starr Date: Fri, 24 Feb 2023 12:46:21 -0600 Subject: [PATCH 05/12] Switch to md h3s --- docs/4-user-guide/3-zarf-schema.md | 256 ++++++++---------- .../section_properties_details.md | 2 +- 2 files changed, 114 insertions(+), 144 deletions(-) diff --git a/docs/4-user-guide/3-zarf-schema.md b/docs/4-user-guide/3-zarf-schema.md index 03a109cba2..4fe556b4dd 100644 --- a/docs/4-user-guide/3-zarf-schema.md +++ b/docs/4-user-guide/3-zarf-schema.md @@ -13,8 +13,7 @@  
-

kind

- + ### kind ![Required](https://img.shields.io/badge/Required-red) **Description:** The kind of Zarf package @@ -40,7 +39,7 @@ Must be one of:  
-

metadata

+ ### metadata **Description:** Package metadata @@ -57,8 +56,7 @@ Must be one of:  
-

name

- + ### name ![Required](https://img.shields.io/badge/Required-red) **Description:** Name to identify this Zarf package @@ -81,7 +79,7 @@ Must be one of:  
-

description

+ ### description **Description:** Additional information about this package @@ -99,7 +97,7 @@ Must be one of:  
-

version

+ ### version **Description:** Generic string to track the package version by a package author @@ -117,7 +115,7 @@ Must be one of:  
-

url

+ ### url **Description:** Link to package information when online @@ -135,7 +133,7 @@ Must be one of:  
-

image

+ ### image **Description:** An image URL to embed in this package (Reserved for future use in Zarf UI) @@ -153,7 +151,7 @@ Must be one of:  
-

uncompressed

+ ### uncompressed **Description:** Disable compression of this package @@ -171,7 +169,7 @@ Must be one of:  
-

architecture

+ ### architecture **Description:** The target cluster architecture of this package @@ -196,7 +194,7 @@ Must be one of:  
-

yolo

+ ### yolo **Description:** Yaml OnLy Online (YOLO): True enables deploying a Zarf package without first running zarf init against the cluster. This is ideal for connected environments where you want to use existing VCS and container registries. @@ -217,7 +215,7 @@ Must be one of:  
-

build

+ ### build **Description:** Zarf-generated package build data @@ -234,8 +232,7 @@ Must be one of:  
-

terminal

- + ### terminal ![Required](https://img.shields.io/badge/Required-red) | | | @@ -252,8 +249,7 @@ Must be one of:  
-

user

- + ### user ![Required](https://img.shields.io/badge/Required-red) | | | @@ -270,8 +266,7 @@ Must be one of:  
-

architecture

- + ### architecture ![Required](https://img.shields.io/badge/Required-red) | | | @@ -288,8 +283,7 @@ Must be one of:  
-

timestamp

- + ### timestamp ![Required](https://img.shields.io/badge/Required-red) | | | @@ -306,8 +300,7 @@ Must be one of:  
-

version

- + ### version ![Required](https://img.shields.io/badge/Required-red) | | | @@ -324,8 +317,7 @@ Must be one of:  
-

migrations

- + ### migrations ![Required](https://img.shields.io/badge/Required-red) | | | @@ -359,8 +351,7 @@ Must be one of:  
-

components

- + ### components ![Required](https://img.shields.io/badge/Required-red) **Description:** List of components to deploy in this package @@ -392,8 +383,7 @@ Must be one of:  
-

name

- + ### name ![Required](https://img.shields.io/badge/Required-red) **Description:** The name of the component @@ -416,7 +406,7 @@ Must be one of:  
-

description

+ ### description **Description:** Message to include during package deploy describing the purpose of this component @@ -434,7 +424,7 @@ Must be one of:  
-

default

+ ### default **Description:** Determines the default Y/N state for installing this component on package deploy @@ -452,7 +442,7 @@ Must be one of:  
-

required

+ ### required **Description:** Do not prompt user to install this component @@ -470,7 +460,7 @@ Must be one of:  
-

only

+ ### only **Description:** Filter when this component is included in package creation or deployment @@ -487,7 +477,7 @@ Must be one of:  
-

localOS

+ ### localOS **Description:** Only deploy component to specified OS @@ -512,7 +502,7 @@ Must be one of:  
-

cluster

+ ### cluster **Description:** Only deploy component to specified clusters @@ -529,7 +519,7 @@ Must be one of:  
-

architecture

+ ### architecture **Description:** Only create and deploy to clusters of the given architecture @@ -553,7 +543,7 @@ Must be one of:  
-

distros

+ ### distros **Description:** A list of kubernetes distros this package works with (Reserved for future use in Zarf UI) @@ -591,7 +581,7 @@ Must be one of:  
-

group

+ ### group **Description:** Create a user selector field based on all components in the same group @@ -609,7 +599,7 @@ Must be one of:  
-

cosignKeyPath

+ ### cosignKeyPath **Description:** Specify a path to a public key to validate signed online resources @@ -627,7 +617,7 @@ Must be one of:  
-

import

+ ### import **Description:** Import a component from another Zarf package @@ -644,7 +634,7 @@ Must be one of:  
-

name

+ ### name | | | | -------- | -------- | @@ -660,8 +650,7 @@ Must be one of:  
-

path

- + ### path ![Required](https://img.shields.io/badge/Required-red) | | | @@ -685,7 +674,7 @@ Must be one of:  
-

scripts

+ ### scripts **Description:** [DEPRECATED] - (replaced by actions) Custom commands to run before or after package deployment @@ -702,7 +691,7 @@ Must be one of:  
-

showOutput

+ ### showOutput **Description:** Show the output of the script during package deployment @@ -720,7 +709,7 @@ Must be one of:  
-

timeoutSeconds

+ ### timeoutSeconds **Description:** Timeout in seconds for the script @@ -738,7 +727,7 @@ Must be one of:  
-

retry

+ ### retry **Description:** Retry the script if it fails @@ -756,7 +745,7 @@ Must be one of:  
-

prepare

+ ### prepare **Description:** Scripts to run before the component is added during package create @@ -788,7 +777,7 @@ Must be one of:  
-

before

+ ### before **Description:** Scripts to run before the component is deployed @@ -820,7 +809,7 @@ Must be one of:  
-

after

+ ### after **Description:** Scripts to run after the component successfully deploys @@ -855,7 +844,7 @@ Must be one of:  
-

actions

+ ### actions **Description:** Custom commands to run at various stages of a package lifecycle @@ -872,7 +861,7 @@ Must be one of:  
-

onCreate

+ ### onCreate **Description:** Actions to run during package creation @@ -889,7 +878,7 @@ Must be one of:  
-

defaults

+ ### defaults **Description:** Default configuration for all actions in this set @@ -906,7 +895,7 @@ Must be one of:  
-

mute

+ ### mute **Description:** Hide the output of commands during execution (default false) @@ -924,7 +913,7 @@ Must be one of:  
-

maxTotalSeconds

+ ### maxTotalSeconds **Description:** Default timeout in seconds for commands (default to 0 @@ -942,7 +931,7 @@ Must be one of:  
-

maxRetries

+ ### maxRetries **Description:** Retry commands given number of times if they fail (default 0) @@ -960,7 +949,7 @@ Must be one of:  
-

dir

+ ### dir **Description:** Working directory for commands (default CWD) @@ -978,7 +967,7 @@ Must be one of:  
-

env

+ ### env **Description:** Additional environment variables for commands @@ -1013,7 +1002,7 @@ Must be one of:  
-

before

+ ### before **Description:** Actions to run at the start of an operation @@ -1044,7 +1033,7 @@ Must be one of:  
-

mute

+ ### mute **Description:** Hide the output of the command during package deployment (default false) @@ -1062,7 +1051,7 @@ Must be one of:  
-

maxTotalSeconds

+ ### maxTotalSeconds **Description:** Timeout in seconds for the command (default to 0 @@ -1080,7 +1069,7 @@ Must be one of:  
-

maxRetries

+ ### maxRetries **Description:** Retry the command if it fails up to given number of times (default 0) @@ -1098,7 +1087,7 @@ Must be one of:  
-

dir

+ ### dir **Description:** The working directory to run the command in (default is CWD) @@ -1116,7 +1105,7 @@ Must be one of:  
-

env

+ ### env **Description:** Additional environment variables to set for the command @@ -1148,7 +1137,7 @@ Must be one of:  
-

cmd

+ ### cmd **Description:** The command to run. Must specify either cmd or wait for the action to do anything. @@ -1166,7 +1155,7 @@ Must be one of:  
-

setVariable

+ ### setVariable **Description:** (Cmd only) The name of a variable to update with the output of the command. This variable will be available to all remaining actions and components in the package. @@ -1188,7 +1177,7 @@ Must be one of:  
-

description

+ ### description **Description:** Description of the action to be displayed during package execution instead of the command @@ -1206,7 +1195,7 @@ Must be one of:  
-

wait

+ ### wait **Description:** Wait for a condition to be met before continuing. Must specify either cmd or wait for the action. See the 'zarf tools wait-for' command for more info. @@ -1223,7 +1212,7 @@ Must be one of:  
-

cluster

+ ### cluster **Description:** Wait for a condition to be met in the cluster before continuing. Only one of cluster or network can be specified. @@ -1240,8 +1229,7 @@ Must be one of:  
-

kind

- + ### kind ![Required](https://img.shields.io/badge/Required-red) **Description:** The kind of resource to wait for (e.g. Pod; Deployment; etc.) @@ -1260,8 +1248,7 @@ Must be one of:  
-

name

- + ### name ![Required](https://img.shields.io/badge/Required-red) | | | @@ -1278,7 +1265,7 @@ Must be one of:  
-

namespace

+ ### namespace **Description:** The namespace of the resource to wait for @@ -1296,7 +1283,7 @@ Must be one of:  
-

condition

+ ### condition **Description:** The condition to wait for (e.g. Ready; Available; etc.). Defaults to exist @@ -1317,7 +1304,7 @@ Must be one of:  
-

network

+ ### network **Description:** Wait for a condition to be met on the network before continuing. Only one of cluster or network can be specified. @@ -1334,8 +1321,7 @@ Must be one of:  
-

protocol

- + ### protocol ![Required](https://img.shields.io/badge/Required-red) **Description:** The protocol to wait for (e.g. tcp; http; etc.). @@ -1361,8 +1347,7 @@ Must be one of:  
-

address

- + ### address ![Required](https://img.shields.io/badge/Required-red) **Description:** The address to wait for (e.g. localhost:8080; 1.1.1.1; etc.) @@ -1381,7 +1366,7 @@ Must be one of:  
-

code

+ ### code **Description:** The HTTP status code to wait for if using http or https (e.g. 200; 404; etc.) @@ -1408,7 +1393,7 @@ Must be one of:  
-

after

+ ### after **Description:** Actions to run at the end of an operation @@ -1442,7 +1427,7 @@ Must be one of:  
-

onSuccess

+ ### onSuccess **Description:** Actions to run if all operations succeed @@ -1476,7 +1461,7 @@ Must be one of:  
-

onFailure

+ ### onFailure **Description:** Actions to run if all operations fail @@ -1513,7 +1498,7 @@ Must be one of:  
-

onDeploy

+ ### onDeploy **Description:** Actions to run during package deployment @@ -1533,7 +1518,7 @@ Must be one of:  
-

onRemove

+ ### onRemove **Description:** Actions to run during package removal @@ -1556,7 +1541,7 @@ Must be one of:  
-

files

+ ### files **Description:** Files to place on disk during package deployment @@ -1587,8 +1572,7 @@ Must be one of:  
-

source

- + ### source ![Required](https://img.shields.io/badge/Required-red) **Description:** Local file path or remote URL to add to the package @@ -1607,7 +1591,7 @@ Must be one of:  
-

shasum

+ ### shasum **Description:** SHA256 checksum of the file if the source is a URL @@ -1625,8 +1609,7 @@ Must be one of:  
-

target

- + ### target ![Required](https://img.shields.io/badge/Required-red) **Description:** The absolute or relative path where the file should be copied to during package deploy @@ -1645,7 +1628,7 @@ Must be one of:  
-

executable

+ ### executable **Description:** Determines if the file should be made executable during package deploy @@ -1663,7 +1646,7 @@ Must be one of:  
-

symlinks

+ ### symlinks **Description:** List of symlinks to create during package deploy @@ -1698,7 +1681,7 @@ Must be one of:  
-

charts

+ ### charts **Description:** Helm charts to install during package deploy @@ -1769,8 +1752,7 @@ Must be one of:  
-

name

- + ### name ![Required](https://img.shields.io/badge/Required-red) **Description:** The name of the chart to deploy; this should be the name of the chart as it is installed in the helm repo @@ -1789,7 +1771,7 @@ Must be one of:  
-

releaseName

+ ### releaseName **Description:** The name of the release to create; defaults to the name of the chart @@ -1807,7 +1789,7 @@ Must be one of:  
-

url

+ ### url **Description:** The URL of the chart repository or git url if the chart is using a git repo instead of helm repo @@ -1825,8 +1807,7 @@ Must be one of:  
-

version

- + ### version ![Required](https://img.shields.io/badge/Required-red) **Description:** The version of the chart to deploy; for git-based charts this is also the tag of the git repo @@ -1845,8 +1826,7 @@ Must be one of:  
-

namespace

- + ### namespace ![Required](https://img.shields.io/badge/Required-red) **Description:** The namespace to deploy the chart to @@ -1865,7 +1845,7 @@ Must be one of:  
-

valuesFiles

+ ### valuesFiles **Description:** List of values files to include in the package; these will be merged together @@ -1897,7 +1877,7 @@ Must be one of:  
-

gitPath

+ ### gitPath **Description:** The path to the chart in the repo if using a git repo instead of a helm repo @@ -1915,7 +1895,7 @@ Must be one of:  
-

localPath

+ ### localPath **Description:** The path to the chart folder @@ -1933,7 +1913,7 @@ Must be one of:  
-

noWait

+ ### noWait **Description:** Wait for chart resources to be ready before continuing @@ -1954,7 +1934,7 @@ Must be one of:  
-

manifests

+ ### manifests | | | | -------- | ------- | @@ -1983,8 +1963,7 @@ Must be one of:  
-

name

- + ### name ![Required](https://img.shields.io/badge/Required-red) **Description:** A name to give this collection of manifests; this will become the name of the dynamically-created helm chart @@ -2003,7 +1982,7 @@ Must be one of:  
-

namespace

+ ### namespace **Description:** The namespace to deploy the manifests to @@ -2021,7 +2000,7 @@ Must be one of:  
-

files

+ ### files **Description:** List of individual K8s YAML files to deploy (in order) @@ -2053,7 +2032,7 @@ Must be one of:  
-

kustomizeAllowAnyDirectory

+ ### kustomizeAllowAnyDirectory **Description:** Allow traversing directory above the current directory if needed for kustomization @@ -2071,7 +2050,7 @@ Must be one of:  
-

kustomizations

+ ### kustomizations **Description:** List of kustomization paths to include in the package @@ -2103,7 +2082,7 @@ Must be one of:  
-

noWait

+ ### noWait **Description:** Wait for manifest resources to be ready before continuing @@ -2124,7 +2103,7 @@ Must be one of:  
-

images

+ ### images **Description:** List of OCI images to include in the package @@ -2156,7 +2135,7 @@ Must be one of:  
-

repos

+ ### repos **Description:** List of git repos to include in the package @@ -2188,7 +2167,7 @@ Must be one of:  
-

dataInjections

+ ### dataInjections **Description:** Datasets to inject into a pod in the target cluster @@ -2219,8 +2198,7 @@ Must be one of:  
-

source

- + ### source ![Required](https://img.shields.io/badge/Required-red) **Description:** A path to a local folder or file to inject into the given target pod + container @@ -2239,8 +2217,7 @@ Must be one of:  
-

target

- + ### target ![Required](https://img.shields.io/badge/Required-red) **Description:** The target pod + container to inject the data into @@ -2258,8 +2235,7 @@ Must be one of:  
-

namespace

- + ### namespace ![Required](https://img.shields.io/badge/Required-red) **Description:** The namespace to target for data injection @@ -2278,8 +2254,7 @@ Must be one of:  
-

selector

- + ### selector ![Required](https://img.shields.io/badge/Required-red) **Description:** The K8s selector to target for data injection @@ -2304,8 +2279,7 @@ Must be one of:  
-

container

- + ### container ![Required](https://img.shields.io/badge/Required-red) **Description:** The container name to target for data injection @@ -2324,8 +2298,7 @@ Must be one of:  
-

path

- + ### path ![Required](https://img.shields.io/badge/Required-red) **Description:** The path within the container to copy the data into @@ -2347,7 +2320,7 @@ Must be one of:  
-

compress

+ ### compress **Description:** Compress the data before transmitting using gzip. Note: this requires support for tar/gzip locally and in the target image. @@ -2371,7 +2344,7 @@ Must be one of:  
-

variables

+ ### variables **Description:** Variable template values applied on deploy for K8s resources @@ -2402,8 +2375,7 @@ Must be one of:  
-

name

- + ### name ![Required](https://img.shields.io/badge/Required-red) **Description:** The name to be used for the variable @@ -2426,7 +2398,7 @@ Must be one of:  
-

description

+ ### description **Description:** A description of the variable to be used when prompting the user a value @@ -2444,7 +2416,7 @@ Must be one of:  
-

default

+ ### default **Description:** The default value to use for the variable @@ -2462,7 +2434,7 @@ Must be one of:  
-

prompt

+ ### prompt **Description:** Whether to prompt the user for input for this variable @@ -2483,7 +2455,7 @@ Must be one of:  
-

constants

+ ### constants **Description:** Constant template values applied on deploy for K8s resources @@ -2514,8 +2486,7 @@ Must be one of:  
-

name

- + ### name ![Required](https://img.shields.io/badge/Required-red) **Description:** The name to be used for the constant @@ -2538,8 +2509,7 @@ Must be one of:  
-

value

- + ### value ![Required](https://img.shields.io/badge/Required-red) **Description:** The value to set for the constant during deploy @@ -2558,7 +2528,7 @@ Must be one of:  
-

description

+ ### description **Description:** A description of the constant to explain its purpose on package create or deploy confirmation prompts diff --git a/hack/zarf-jsfh-template/section_properties_details.md b/hack/zarf-jsfh-template/section_properties_details.md index 7f427ac469..65063f7415 100644 --- a/hack/zarf-jsfh-template/section_properties_details.md +++ b/hack/zarf-jsfh-template/section_properties_details.md @@ -23,7 +23,7 @@  
-

{%- if sub_property.is_pattern_property %} Pattern Property{% endif %} {% with schema=sub_property %}{%- include "breadcrumbs.md" %} {% endwith %}

+ ### {%- if sub_property.is_pattern_property %} Pattern Property{% endif %} {% with schema=sub_property %}{%- include "breadcrumbs.md" %} {% endwith %} {% with schema=sub_property, skip_headers=False %} {% if sub_property.is_pattern_property %} From 21e3ea67134fe9c79ff7ef9db44f1072731a2e9d Mon Sep 17 00:00:00 2001 From: Wayne Starr Date: Fri, 24 Feb 2023 13:29:09 -0600 Subject: [PATCH 06/12] Smarter open/close behavior --- docs/4-user-guide/3-zarf-schema.md | 320 +++++------------- .../section_properties_details.md | 9 +- 2 files changed, 95 insertions(+), 234 deletions(-) diff --git a/docs/4-user-guide/3-zarf-schema.md b/docs/4-user-guide/3-zarf-schema.md index 4fe556b4dd..7df54ae285 100644 --- a/docs/4-user-guide/3-zarf-schema.md +++ b/docs/4-user-guide/3-zarf-schema.md @@ -6,14 +6,13 @@ | **Additional properties** | [![Not allowed](https://img.shields.io/badge/Not%20allowed-red)](# "Additional Properties not allowed.") | | **Defined in** | #/definitions/ZarfPackage | -
+
kind *  
- ### kind ![Required](https://img.shields.io/badge/Required-red) **Description:** The kind of Zarf package @@ -49,14 +48,13 @@ Must be one of: | **Additional properties** | [![Not allowed](https://img.shields.io/badge/Not%20allowed-red)](# "Additional Properties not allowed.") | | **Defined in** | #/definitions/ZarfMetadata | -
+
name *  
- ### name ![Required](https://img.shields.io/badge/Required-red) **Description:** Name to identify this Zarf package @@ -72,15 +70,13 @@ Must be one of:
-
+
description  
- ### description - **Description:** Additional information about this package | | | @@ -90,15 +86,13 @@ Must be one of:
-
+
version  
- ### version - **Description:** Generic string to track the package version by a package author | | | @@ -108,15 +102,13 @@ Must be one of:
-
+
url  
- ### url - **Description:** Link to package information when online | | | @@ -126,15 +118,13 @@ Must be one of:
-
+
image  
- ### image - **Description:** An image URL to embed in this package (Reserved for future use in Zarf UI) | | | @@ -144,15 +134,13 @@ Must be one of:
-
+
uncompressed  
- ### uncompressed - **Description:** Disable compression of this package | | | @@ -162,15 +150,13 @@ Must be one of:
-
+
architecture  
- ### architecture - **Description:** The target cluster architecture of this package | | | @@ -187,15 +173,13 @@ Must be one of:
-
+
yolo  
- ### yolo - **Description:** Yaml OnLy Online (YOLO): True enables deploying a Zarf package without first running zarf init against the cluster. This is ideal for connected environments where you want to use existing VCS and container registries. | | | @@ -225,14 +209,13 @@ Must be one of: | **Additional properties** | [![Not allowed](https://img.shields.io/badge/Not%20allowed-red)](# "Additional Properties not allowed.") | | **Defined in** | #/definitions/ZarfBuildData | -
+
terminal *  
- ### terminal ![Required](https://img.shields.io/badge/Required-red) | | | @@ -242,14 +225,13 @@ Must be one of:
-
+
user *  
- ### user ![Required](https://img.shields.io/badge/Required-red) | | | @@ -259,14 +241,13 @@ Must be one of:
-
+
architecture *  
- ### architecture ![Required](https://img.shields.io/badge/Required-red) | | | @@ -276,14 +257,13 @@ Must be one of:
-
+
timestamp *  
- ### timestamp ![Required](https://img.shields.io/badge/Required-red) | | | @@ -293,14 +273,13 @@ Must be one of:
-
+
version *  
- ### version ![Required](https://img.shields.io/badge/Required-red) | | | @@ -310,14 +289,13 @@ Must be one of:
-
+
migrations *  
- ### migrations ![Required](https://img.shields.io/badge/Required-red) | | | @@ -376,14 +354,13 @@ Must be one of: | **Additional properties** | [![Not allowed](https://img.shields.io/badge/Not%20allowed-red)](# "Additional Properties not allowed.") | | **Defined in** | #/definitions/ZarfComponent | -
+
name *  
- ### name ![Required](https://img.shields.io/badge/Required-red) **Description:** The name of the component @@ -399,15 +376,13 @@ Must be one of:
-
+
description  
- ### description - **Description:** Message to include during package deploy describing the purpose of this component | | | @@ -417,15 +392,13 @@ Must be one of:
-
+
default  
- ### default - **Description:** Determines the default Y/N state for installing this component on package deploy | | | @@ -435,15 +408,13 @@ Must be one of:
-
+
required  
- ### required - **Description:** Do not prompt user to install this component | | | @@ -470,15 +441,13 @@ Must be one of: | **Additional properties** | [![Not allowed](https://img.shields.io/badge/Not%20allowed-red)](# "Additional Properties not allowed.") | | **Defined in** | #/definitions/ZarfComponentOnlyTarget | -
+
localOS  
- ### localOS - **Description:** Only deploy component to specified OS | | | @@ -512,15 +481,13 @@ Must be one of: | **Additional properties** | [![Not allowed](https://img.shields.io/badge/Not%20allowed-red)](# "Additional Properties not allowed.") | | **Defined in** | #/definitions/ZarfComponentOnlyCluster | -
+
architecture  
- ### architecture - **Description:** Only create and deploy to clusters of the given architecture | | | @@ -536,15 +503,13 @@ Must be one of:
-
+
distros  
- ### distros - **Description:** A list of kubernetes distros this package works with (Reserved for future use in Zarf UI) | | | @@ -574,15 +539,13 @@ Must be one of:
-
+
group  
- ### group - **Description:** Create a user selector field based on all components in the same group | | | @@ -592,15 +555,13 @@ Must be one of:
-
+
cosignKeyPath  
- ### cosignKeyPath - **Description:** Specify a path to a public key to validate signed online resources | | | @@ -627,15 +588,13 @@ Must be one of: | **Additional properties** | [![Not allowed](https://img.shields.io/badge/Not%20allowed-red)](# "Additional Properties not allowed.") | | **Defined in** | #/definitions/ZarfComponentImport | -
+
name  
- ### name - | | | | -------- | -------- | | **Type** | `string` | @@ -643,14 +602,13 @@ Must be one of:
-
+
path *  
- ### path ![Required](https://img.shields.io/badge/Required-red) | | | @@ -684,15 +642,13 @@ Must be one of: | **Additional properties** | [![Not allowed](https://img.shields.io/badge/Not%20allowed-red)](# "Additional Properties not allowed.") | | **Defined in** | #/definitions/DeprecatedZarfComponentScripts | -
+
showOutput  
- ### showOutput - **Description:** Show the output of the script during package deployment | | | @@ -702,15 +658,13 @@ Must be one of:
-
+
timeoutSeconds  
- ### timeoutSeconds - **Description:** Timeout in seconds for the script | | | @@ -720,15 +674,13 @@ Must be one of:
-
+
retry  
- ### retry - **Description:** Retry the script if it fails | | | @@ -738,15 +690,13 @@ Must be one of:
-
+
prepare  
- ### prepare - **Description:** Scripts to run before the component is added during package create | | | @@ -770,15 +720,13 @@ Must be one of:
-
+
before  
- ### before - **Description:** Scripts to run before the component is deployed | | | @@ -802,15 +750,13 @@ Must be one of:
-
+
after  
- ### after - **Description:** Scripts to run after the component successfully deploys | | | @@ -888,15 +834,13 @@ Must be one of: | **Additional properties** | [![Not allowed](https://img.shields.io/badge/Not%20allowed-red)](# "Additional Properties not allowed.") | | **Defined in** | #/definitions/ZarfComponentActionDefaults | -
+
mute  
- ### mute - **Description:** Hide the output of commands during execution (default false) | | | @@ -906,15 +850,13 @@ Must be one of:
-
+
maxTotalSeconds  
- ### maxTotalSeconds - **Description:** Default timeout in seconds for commands (default to 0 | | | @@ -924,15 +866,13 @@ Must be one of:
-
+
maxRetries  
- ### maxRetries - **Description:** Retry commands given number of times if they fail (default 0) | | | @@ -942,15 +882,13 @@ Must be one of:
-
+
dir  
- ### dir - **Description:** Working directory for commands (default CWD) | | | @@ -960,15 +898,13 @@ Must be one of:
-
+
env  
- ### env - **Description:** Additional environment variables for commands | | | @@ -1026,15 +962,13 @@ Must be one of: | **Additional properties** | [![Not allowed](https://img.shields.io/badge/Not%20allowed-red)](# "Additional Properties not allowed.") | | **Defined in** | #/definitions/ZarfComponentAction | -
+
mute  
- ### mute - **Description:** Hide the output of the command during package deployment (default false) | | | @@ -1044,15 +978,13 @@ Must be one of:
-
+
maxTotalSeconds  
- ### maxTotalSeconds - **Description:** Timeout in seconds for the command (default to 0 | | | @@ -1062,15 +994,13 @@ Must be one of:
-
+
maxRetries  
- ### maxRetries - **Description:** Retry the command if it fails up to given number of times (default 0) | | | @@ -1080,15 +1010,13 @@ Must be one of:
-
+
dir  
- ### dir - **Description:** The working directory to run the command in (default is CWD) | | | @@ -1098,15 +1026,13 @@ Must be one of:
-
+
env  
- ### env - **Description:** Additional environment variables to set for the command | | | @@ -1130,15 +1056,13 @@ Must be one of:
-
+
cmd  
- ### cmd - **Description:** The command to run. Must specify either cmd or wait for the action to do anything. | | | @@ -1148,15 +1072,13 @@ Must be one of:
-
+
setVariable  
- ### setVariable - **Description:** (Cmd only) The name of a variable to update with the output of the command. This variable will be available to all remaining actions and components in the package. | | | @@ -1170,15 +1092,13 @@ Must be one of:
-
+
description  
- ### description - **Description:** Description of the action to be displayed during package execution instead of the command | | | @@ -1222,14 +1142,13 @@ Must be one of: | **Additional properties** | [![Not allowed](https://img.shields.io/badge/Not%20allowed-red)](# "Additional Properties not allowed.") | | **Defined in** | #/definitions/ZarfComponentActionWaitCluster | -
+
kind *  
- ### kind ![Required](https://img.shields.io/badge/Required-red) **Description:** The kind of resource to wait for (e.g. Pod; Deployment; etc.) @@ -1241,14 +1160,13 @@ Must be one of:
-
+
name *  
- ### name ![Required](https://img.shields.io/badge/Required-red) | | | @@ -1258,15 +1176,13 @@ Must be one of:
-
+
namespace  
- ### namespace - **Description:** The namespace of the resource to wait for | | | @@ -1276,15 +1192,13 @@ Must be one of:
-
+
condition  
- ### condition - **Description:** The condition to wait for (e.g. Ready; Available; etc.). Defaults to exist | | | @@ -1314,14 +1228,13 @@ Must be one of: | **Additional properties** | [![Not allowed](https://img.shields.io/badge/Not%20allowed-red)](# "Additional Properties not allowed.") | | **Defined in** | #/definitions/ZarfComponentActionWaitNetwork | -
+
protocol *  
- ### protocol ![Required](https://img.shields.io/badge/Required-red) **Description:** The protocol to wait for (e.g. tcp; http; etc.). @@ -1340,14 +1253,13 @@ Must be one of:
-
+
address *  
- ### address ![Required](https://img.shields.io/badge/Required-red) **Description:** The address to wait for (e.g. localhost:8080; 1.1.1.1; etc.) @@ -1359,15 +1271,13 @@ Must be one of:
-
+
code  
- ### code - **Description:** The HTTP status code to wait for if using http or https (e.g. 200; 404; etc.) | | | @@ -1565,14 +1475,13 @@ Must be one of: | **Additional properties** | [![Not allowed](https://img.shields.io/badge/Not%20allowed-red)](# "Additional Properties not allowed.") | | **Defined in** | #/definitions/ZarfFile | -
+
source *  
- ### source ![Required](https://img.shields.io/badge/Required-red) **Description:** Local file path or remote URL to add to the package @@ -1584,15 +1493,13 @@ Must be one of:
-
+
shasum  
- ### shasum - **Description:** SHA256 checksum of the file if the source is a URL | | | @@ -1602,14 +1509,13 @@ Must be one of:
-
+
target *  
- ### target ![Required](https://img.shields.io/badge/Required-red) **Description:** The absolute or relative path where the file should be copied to during package deploy @@ -1621,15 +1527,13 @@ Must be one of:
-
+
executable  
- ### executable - **Description:** Determines if the file should be made executable during package deploy | | | @@ -1639,15 +1543,13 @@ Must be one of:
-
+
symlinks  
- ### symlinks - **Description:** List of symlinks to create during package deploy | | | @@ -1745,14 +1647,13 @@ Must be one of:
-
+
name *  
- ### name ![Required](https://img.shields.io/badge/Required-red) **Description:** The name of the chart to deploy; this should be the name of the chart as it is installed in the helm repo @@ -1764,15 +1665,13 @@ Must be one of:
-
+
releaseName  
- ### releaseName - **Description:** The name of the release to create; defaults to the name of the chart | | | @@ -1782,15 +1681,13 @@ Must be one of:
-
+
url  
- ### url - **Description:** The URL of the chart repository or git url if the chart is using a git repo instead of helm repo | | | @@ -1800,14 +1697,13 @@ Must be one of:
-
+
version *  
- ### version ![Required](https://img.shields.io/badge/Required-red) **Description:** The version of the chart to deploy; for git-based charts this is also the tag of the git repo @@ -1819,14 +1715,13 @@ Must be one of:
-
+
namespace *  
- ### namespace ![Required](https://img.shields.io/badge/Required-red) **Description:** The namespace to deploy the chart to @@ -1838,15 +1733,13 @@ Must be one of:
-
+
valuesFiles  
- ### valuesFiles - **Description:** List of values files to include in the package; these will be merged together | | | @@ -1870,15 +1763,13 @@ Must be one of:
-
+
gitPath  
- ### gitPath - **Description:** The path to the chart in the repo if using a git repo instead of a helm repo | | | @@ -1888,15 +1779,13 @@ Must be one of:
-
+
localPath  
- ### localPath - **Description:** The path to the chart folder | | | @@ -1906,15 +1795,13 @@ Must be one of:
-
+
noWait  
- ### noWait - **Description:** Wait for chart resources to be ready before continuing | | | @@ -1956,14 +1843,13 @@ Must be one of: | **Additional properties** | [![Not allowed](https://img.shields.io/badge/Not%20allowed-red)](# "Additional Properties not allowed.") | | **Defined in** | #/definitions/ZarfManifest | -
+
name *  
- ### name ![Required](https://img.shields.io/badge/Required-red) **Description:** A name to give this collection of manifests; this will become the name of the dynamically-created helm chart @@ -1975,15 +1861,13 @@ Must be one of:
-
+
namespace  
- ### namespace - **Description:** The namespace to deploy the manifests to | | | @@ -1993,15 +1877,13 @@ Must be one of:
-
+
files  
- ### files - **Description:** List of individual K8s YAML files to deploy (in order) | | | @@ -2025,15 +1907,13 @@ Must be one of:
-
+
kustomizeAllowAnyDirectory  
- ### kustomizeAllowAnyDirectory - **Description:** Allow traversing directory above the current directory if needed for kustomization | | | @@ -2043,15 +1923,13 @@ Must be one of:
-
+
kustomizations  
- ### kustomizations - **Description:** List of kustomization paths to include in the package | | | @@ -2075,15 +1953,13 @@ Must be one of:
-
+
noWait  
- ### noWait - **Description:** Wait for manifest resources to be ready before continuing | | | @@ -2096,15 +1972,13 @@ Must be one of:
-
+
images  
- ### images - **Description:** List of OCI images to include in the package | | | @@ -2128,15 +2002,13 @@ Must be one of:
-
+
repos  
- ### repos - **Description:** List of git repos to include in the package | | | @@ -2191,14 +2063,13 @@ Must be one of: | **Additional properties** | [![Not allowed](https://img.shields.io/badge/Not%20allowed-red)](# "Additional Properties not allowed.") | | **Defined in** | #/definitions/ZarfDataInjection | -
+
source *  
- ### source ![Required](https://img.shields.io/badge/Required-red) **Description:** A path to a local folder or file to inject into the given target pod + container @@ -2228,14 +2099,13 @@ Must be one of: | **Additional properties** | [![Not allowed](https://img.shields.io/badge/Not%20allowed-red)](# "Additional Properties not allowed.") | | **Defined in** | #/definitions/ZarfContainerTarget | -
+
namespace *  
- ### namespace ![Required](https://img.shields.io/badge/Required-red) **Description:** The namespace to target for data injection @@ -2247,14 +2117,13 @@ Must be one of:
-
+
selector *  
- ### selector ![Required](https://img.shields.io/badge/Required-red) **Description:** The K8s selector to target for data injection @@ -2272,14 +2141,13 @@ Must be one of:
-
+
container *  
- ### container ![Required](https://img.shields.io/badge/Required-red) **Description:** The container name to target for data injection @@ -2291,14 +2159,13 @@ Must be one of:
-
+
path *  
- ### path ![Required](https://img.shields.io/badge/Required-red) **Description:** The path within the container to copy the data into @@ -2313,15 +2180,13 @@ Must be one of:
-
+
compress  
- ### compress - **Description:** Compress the data before transmitting using gzip. Note: this requires support for tar/gzip locally and in the target image. | | | @@ -2368,14 +2233,13 @@ Must be one of: | **Additional properties** | [![Not allowed](https://img.shields.io/badge/Not%20allowed-red)](# "Additional Properties not allowed.") | | **Defined in** | #/definitions/ZarfPackageVariable | -
+
name *  
- ### name ![Required](https://img.shields.io/badge/Required-red) **Description:** The name to be used for the variable @@ -2391,15 +2255,13 @@ Must be one of:
-
+
description  
- ### description - **Description:** A description of the variable to be used when prompting the user a value | | | @@ -2409,15 +2271,13 @@ Must be one of:
-
+
default  
- ### default - **Description:** The default value to use for the variable | | | @@ -2427,15 +2287,13 @@ Must be one of:
-
+
prompt  
- ### prompt - **Description:** Whether to prompt the user for input for this variable | | | @@ -2479,14 +2337,13 @@ Must be one of: | **Additional properties** | [![Not allowed](https://img.shields.io/badge/Not%20allowed-red)](# "Additional Properties not allowed.") | | **Defined in** | #/definitions/ZarfPackageConstant | -
+
name *  
- ### name ![Required](https://img.shields.io/badge/Required-red) **Description:** The name to be used for the constant @@ -2502,14 +2359,13 @@ Must be one of:
-
+
value *  
- ### value ![Required](https://img.shields.io/badge/Required-red) **Description:** The value to set for the constant during deploy @@ -2521,15 +2377,13 @@ Must be one of:
-
+
description  
- ### description - **Description:** A description of the constant to explain its purpose on package create or deploy confirmation prompts | | | diff --git a/hack/zarf-jsfh-template/section_properties_details.md b/hack/zarf-jsfh-template/section_properties_details.md index 65063f7415..b1083b009b 100644 --- a/hack/zarf-jsfh-template/section_properties_details.md +++ b/hack/zarf-jsfh-template/section_properties_details.md @@ -6,7 +6,12 @@ {% set html_id = sub_property.html_id %} {% set description = sub_property | get_description %} + +{% if sub_property.type_name == "object" or sub_property.type_name == "array" %}
+{% else %} +
+{% endif %} {% filter md_heading(2, html_id, True) -%} {%- filter replace('\n', '') -%} @@ -23,7 +28,9 @@  
- ### {%- if sub_property.is_pattern_property %} Pattern Property{% endif %} {% with schema=sub_property %}{%- include "breadcrumbs.md" %} {% endwith %} + {% if sub_property.type_name == "object" or sub_property.type_name == "array" %} + ### {% with schema=sub_property %} {%- include "breadcrumbs.md" %} {% endwith %} + {% endif %} {% with schema=sub_property, skip_headers=False %} {% if sub_property.is_pattern_property %} From 9c174df6e201a5c53b5bdb06859b4bf4ed3350d7 Mon Sep 17 00:00:00 2001 From: Wayne Starr Date: Fri, 24 Feb 2023 13:47:52 -0600 Subject: [PATCH 07/12] Refine array section --- docs/4-user-guide/3-zarf-schema.md | 264 +++++++++-------------- hack/zarf-jsfh-template/section_array.md | 17 +- 2 files changed, 111 insertions(+), 170 deletions(-) diff --git a/docs/4-user-guide/3-zarf-schema.md b/docs/4-user-guide/3-zarf-schema.md index 7df54ae285..ac9e83bdef 100644 --- a/docs/4-user-guide/3-zarf-schema.md +++ b/docs/4-user-guide/3-zarf-schema.md @@ -302,13 +302,10 @@ Must be one of: | -------- | ----------------- | | **Type** | `array of string` | -| | Array restrictions | -| -------------------- | ------------------ | -| **Min items** | N/A | -| **Max items** | N/A | -| **Items unicity** | False | -| **Additional items** | False | -| **Tuple validation** | See below | +![Min Items: N/A](https://img.shields.io/badge/Min%20Items%3A%20N/A-%2318216d) +![Max Items: N/A](https://img.shields.io/badge/Max%20Items%3A%20N/A-%23131b58) +![Item unicity: False](https://img.shields.io/badge/Item%20unicity%3A%20False-%230f1443) +![Additional items: N/A](https://img.shields.io/badge/Additional%20items%3A%20N/A-%230a0e2e) #### migrations items @@ -338,13 +335,10 @@ Must be one of: | -------- | ------- | | **Type** | `array` | -| | Array restrictions | -| -------------------- | ------------------ | -| **Min items** | N/A | -| **Max items** | N/A | -| **Items unicity** | False | -| **Additional items** | False | -| **Tuple validation** | See below | +![Min Items: N/A](https://img.shields.io/badge/Min%20Items%3A%20N/A-%2318216d) +![Max Items: N/A](https://img.shields.io/badge/Max%20Items%3A%20N/A-%23131b58) +![Item unicity: False](https://img.shields.io/badge/Item%20unicity%3A%20False-%230f1443) +![Additional items: N/A](https://img.shields.io/badge/Additional%20items%3A%20N/A-%230a0e2e) #### ZarfComponent @@ -516,13 +510,10 @@ Must be one of: | -------- | ----------------- | | **Type** | `array of string` | -| | Array restrictions | -| -------------------- | ------------------ | -| **Min items** | N/A | -| **Max items** | N/A | -| **Items unicity** | False | -| **Additional items** | False | -| **Tuple validation** | See below | +![Min Items: N/A](https://img.shields.io/badge/Min%20Items%3A%20N/A-%2318216d) +![Max Items: N/A](https://img.shields.io/badge/Max%20Items%3A%20N/A-%23131b58) +![Item unicity: False](https://img.shields.io/badge/Item%20unicity%3A%20False-%230f1443) +![Additional items: N/A](https://img.shields.io/badge/Additional%20items%3A%20N/A-%230a0e2e) #### distros items @@ -703,13 +694,10 @@ Must be one of: | -------- | ----------------- | | **Type** | `array of string` | -| | Array restrictions | -| -------------------- | ------------------ | -| **Min items** | N/A | -| **Max items** | N/A | -| **Items unicity** | False | -| **Additional items** | False | -| **Tuple validation** | See below | +![Min Items: N/A](https://img.shields.io/badge/Min%20Items%3A%20N/A-%2318216d) +![Max Items: N/A](https://img.shields.io/badge/Max%20Items%3A%20N/A-%23131b58) +![Item unicity: False](https://img.shields.io/badge/Item%20unicity%3A%20False-%230f1443) +![Additional items: N/A](https://img.shields.io/badge/Additional%20items%3A%20N/A-%230a0e2e) #### prepare items @@ -733,13 +721,10 @@ Must be one of: | -------- | ----------------- | | **Type** | `array of string` | -| | Array restrictions | -| -------------------- | ------------------ | -| **Min items** | N/A | -| **Max items** | N/A | -| **Items unicity** | False | -| **Additional items** | False | -| **Tuple validation** | See below | +![Min Items: N/A](https://img.shields.io/badge/Min%20Items%3A%20N/A-%2318216d) +![Max Items: N/A](https://img.shields.io/badge/Max%20Items%3A%20N/A-%23131b58) +![Item unicity: False](https://img.shields.io/badge/Item%20unicity%3A%20False-%230f1443) +![Additional items: N/A](https://img.shields.io/badge/Additional%20items%3A%20N/A-%230a0e2e) #### before items @@ -763,13 +748,10 @@ Must be one of: | -------- | ----------------- | | **Type** | `array of string` | -| | Array restrictions | -| -------------------- | ------------------ | -| **Min items** | N/A | -| **Max items** | N/A | -| **Items unicity** | False | -| **Additional items** | False | -| **Tuple validation** | See below | +![Min Items: N/A](https://img.shields.io/badge/Min%20Items%3A%20N/A-%2318216d) +![Max Items: N/A](https://img.shields.io/badge/Max%20Items%3A%20N/A-%23131b58) +![Item unicity: False](https://img.shields.io/badge/Item%20unicity%3A%20False-%230f1443) +![Additional items: N/A](https://img.shields.io/badge/Additional%20items%3A%20N/A-%230a0e2e) #### after items @@ -911,13 +893,10 @@ Must be one of: | -------- | ----------------- | | **Type** | `array of string` | -| | Array restrictions | -| -------------------- | ------------------ | -| **Min items** | N/A | -| **Max items** | N/A | -| **Items unicity** | False | -| **Additional items** | False | -| **Tuple validation** | See below | +![Min Items: N/A](https://img.shields.io/badge/Min%20Items%3A%20N/A-%2318216d) +![Max Items: N/A](https://img.shields.io/badge/Max%20Items%3A%20N/A-%23131b58) +![Item unicity: False](https://img.shields.io/badge/Item%20unicity%3A%20False-%230f1443) +![Additional items: N/A](https://img.shields.io/badge/Additional%20items%3A%20N/A-%230a0e2e) #### env items @@ -946,13 +925,10 @@ Must be one of: | -------- | ------- | | **Type** | `array` | -| | Array restrictions | -| -------------------- | ------------------ | -| **Min items** | N/A | -| **Max items** | N/A | -| **Items unicity** | False | -| **Additional items** | False | -| **Tuple validation** | See below | +![Min Items: N/A](https://img.shields.io/badge/Min%20Items%3A%20N/A-%2318216d) +![Max Items: N/A](https://img.shields.io/badge/Max%20Items%3A%20N/A-%23131b58) +![Item unicity: False](https://img.shields.io/badge/Item%20unicity%3A%20False-%230f1443) +![Additional items: N/A](https://img.shields.io/badge/Additional%20items%3A%20N/A-%230a0e2e) #### ZarfComponentAction @@ -1039,13 +1015,10 @@ Must be one of: | -------- | ----------------- | | **Type** | `array of string` | -| | Array restrictions | -| -------------------- | ------------------ | -| **Min items** | N/A | -| **Max items** | N/A | -| **Items unicity** | False | -| **Additional items** | False | -| **Tuple validation** | See below | +![Min Items: N/A](https://img.shields.io/badge/Min%20Items%3A%20N/A-%2318216d) +![Max Items: N/A](https://img.shields.io/badge/Max%20Items%3A%20N/A-%23131b58) +![Item unicity: False](https://img.shields.io/badge/Item%20unicity%3A%20False-%230f1443) +![Additional items: N/A](https://img.shields.io/badge/Additional%20items%3A%20N/A-%230a0e2e) #### env items @@ -1311,13 +1284,10 @@ Must be one of: | -------- | ------- | | **Type** | `array` | -| | Array restrictions | -| -------------------- | ------------------ | -| **Min items** | N/A | -| **Max items** | N/A | -| **Items unicity** | False | -| **Additional items** | False | -| **Tuple validation** | See below | +![Min Items: N/A](https://img.shields.io/badge/Min%20Items%3A%20N/A-%2318216d) +![Max Items: N/A](https://img.shields.io/badge/Max%20Items%3A%20N/A-%23131b58) +![Item unicity: False](https://img.shields.io/badge/Item%20unicity%3A%20False-%230f1443) +![Additional items: N/A](https://img.shields.io/badge/Additional%20items%3A%20N/A-%230a0e2e) #### ZarfComponentAction @@ -1345,13 +1315,10 @@ Must be one of: | -------- | ------- | | **Type** | `array` | -| | Array restrictions | -| -------------------- | ------------------ | -| **Min items** | N/A | -| **Max items** | N/A | -| **Items unicity** | False | -| **Additional items** | False | -| **Tuple validation** | See below | +![Min Items: N/A](https://img.shields.io/badge/Min%20Items%3A%20N/A-%2318216d) +![Max Items: N/A](https://img.shields.io/badge/Max%20Items%3A%20N/A-%23131b58) +![Item unicity: False](https://img.shields.io/badge/Item%20unicity%3A%20False-%230f1443) +![Additional items: N/A](https://img.shields.io/badge/Additional%20items%3A%20N/A-%230a0e2e) #### ZarfComponentAction @@ -1379,13 +1346,10 @@ Must be one of: | -------- | ------- | | **Type** | `array` | -| | Array restrictions | -| -------------------- | ------------------ | -| **Min items** | N/A | -| **Max items** | N/A | -| **Items unicity** | False | -| **Additional items** | False | -| **Tuple validation** | See below | +![Min Items: N/A](https://img.shields.io/badge/Min%20Items%3A%20N/A-%2318216d) +![Max Items: N/A](https://img.shields.io/badge/Max%20Items%3A%20N/A-%23131b58) +![Item unicity: False](https://img.shields.io/badge/Item%20unicity%3A%20False-%230f1443) +![Additional items: N/A](https://img.shields.io/badge/Additional%20items%3A%20N/A-%230a0e2e) #### ZarfComponentAction @@ -1459,13 +1423,10 @@ Must be one of: | -------- | ------- | | **Type** | `array` | -| | Array restrictions | -| -------------------- | ------------------ | -| **Min items** | N/A | -| **Max items** | N/A | -| **Items unicity** | False | -| **Additional items** | False | -| **Tuple validation** | See below | +![Min Items: N/A](https://img.shields.io/badge/Min%20Items%3A%20N/A-%2318216d) +![Max Items: N/A](https://img.shields.io/badge/Max%20Items%3A%20N/A-%23131b58) +![Item unicity: False](https://img.shields.io/badge/Item%20unicity%3A%20False-%230f1443) +![Additional items: N/A](https://img.shields.io/badge/Additional%20items%3A%20N/A-%230a0e2e) #### ZarfFile @@ -1556,13 +1517,10 @@ Must be one of: | -------- | ----------------- | | **Type** | `array of string` | -| | Array restrictions | -| -------------------- | ------------------ | -| **Min items** | N/A | -| **Max items** | N/A | -| **Items unicity** | False | -| **Additional items** | False | -| **Tuple validation** | See below | +![Min Items: N/A](https://img.shields.io/badge/Min%20Items%3A%20N/A-%2318216d) +![Max Items: N/A](https://img.shields.io/badge/Max%20Items%3A%20N/A-%23131b58) +![Item unicity: False](https://img.shields.io/badge/Item%20unicity%3A%20False-%230f1443) +![Additional items: N/A](https://img.shields.io/badge/Additional%20items%3A%20N/A-%230a0e2e) #### symlinks items @@ -1591,13 +1549,10 @@ Must be one of: | -------- | ------- | | **Type** | `array` | -| | Array restrictions | -| -------------------- | ------------------ | -| **Min items** | N/A | -| **Max items** | N/A | -| **Items unicity** | False | -| **Additional items** | False | -| **Tuple validation** | See below | +![Min Items: N/A](https://img.shields.io/badge/Min%20Items%3A%20N/A-%2318216d) +![Max Items: N/A](https://img.shields.io/badge/Max%20Items%3A%20N/A-%23131b58) +![Item unicity: False](https://img.shields.io/badge/Item%20unicity%3A%20False-%230f1443) +![Additional items: N/A](https://img.shields.io/badge/Additional%20items%3A%20N/A-%230a0e2e) #### ZarfChart @@ -1746,13 +1701,10 @@ Must be one of: | -------- | ----------------- | | **Type** | `array of string` | -| | Array restrictions | -| -------------------- | ------------------ | -| **Min items** | N/A | -| **Max items** | N/A | -| **Items unicity** | False | -| **Additional items** | False | -| **Tuple validation** | See below | +![Min Items: N/A](https://img.shields.io/badge/Min%20Items%3A%20N/A-%2318216d) +![Max Items: N/A](https://img.shields.io/badge/Max%20Items%3A%20N/A-%23131b58) +![Item unicity: False](https://img.shields.io/badge/Item%20unicity%3A%20False-%230f1443) +![Additional items: N/A](https://img.shields.io/badge/Additional%20items%3A%20N/A-%230a0e2e) #### valuesFiles items @@ -1827,13 +1779,10 @@ Must be one of: | -------- | ------- | | **Type** | `array` | -| | Array restrictions | -| -------------------- | ------------------ | -| **Min items** | N/A | -| **Max items** | N/A | -| **Items unicity** | False | -| **Additional items** | False | -| **Tuple validation** | See below | +![Min Items: N/A](https://img.shields.io/badge/Min%20Items%3A%20N/A-%2318216d) +![Max Items: N/A](https://img.shields.io/badge/Max%20Items%3A%20N/A-%23131b58) +![Item unicity: False](https://img.shields.io/badge/Item%20unicity%3A%20False-%230f1443) +![Additional items: N/A](https://img.shields.io/badge/Additional%20items%3A%20N/A-%230a0e2e) #### ZarfManifest @@ -1890,13 +1839,10 @@ Must be one of: | -------- | ----------------- | | **Type** | `array of string` | -| | Array restrictions | -| -------------------- | ------------------ | -| **Min items** | N/A | -| **Max items** | N/A | -| **Items unicity** | False | -| **Additional items** | False | -| **Tuple validation** | See below | +![Min Items: N/A](https://img.shields.io/badge/Min%20Items%3A%20N/A-%2318216d) +![Max Items: N/A](https://img.shields.io/badge/Max%20Items%3A%20N/A-%23131b58) +![Item unicity: False](https://img.shields.io/badge/Item%20unicity%3A%20False-%230f1443) +![Additional items: N/A](https://img.shields.io/badge/Additional%20items%3A%20N/A-%230a0e2e) #### files items @@ -1936,13 +1882,10 @@ Must be one of: | -------- | ----------------- | | **Type** | `array of string` | -| | Array restrictions | -| -------------------- | ------------------ | -| **Min items** | N/A | -| **Max items** | N/A | -| **Items unicity** | False | -| **Additional items** | False | -| **Tuple validation** | See below | +![Min Items: N/A](https://img.shields.io/badge/Min%20Items%3A%20N/A-%2318216d) +![Max Items: N/A](https://img.shields.io/badge/Max%20Items%3A%20N/A-%23131b58) +![Item unicity: False](https://img.shields.io/badge/Item%20unicity%3A%20False-%230f1443) +![Additional items: N/A](https://img.shields.io/badge/Additional%20items%3A%20N/A-%230a0e2e) #### kustomizations items @@ -1985,13 +1928,10 @@ Must be one of: | -------- | ----------------- | | **Type** | `array of string` | -| | Array restrictions | -| -------------------- | ------------------ | -| **Min items** | N/A | -| **Max items** | N/A | -| **Items unicity** | False | -| **Additional items** | False | -| **Tuple validation** | See below | +![Min Items: N/A](https://img.shields.io/badge/Min%20Items%3A%20N/A-%2318216d) +![Max Items: N/A](https://img.shields.io/badge/Max%20Items%3A%20N/A-%23131b58) +![Item unicity: False](https://img.shields.io/badge/Item%20unicity%3A%20False-%230f1443) +![Additional items: N/A](https://img.shields.io/badge/Additional%20items%3A%20N/A-%230a0e2e) #### images items @@ -2015,13 +1955,10 @@ Must be one of: | -------- | ----------------- | | **Type** | `array of string` | -| | Array restrictions | -| -------------------- | ------------------ | -| **Min items** | N/A | -| **Max items** | N/A | -| **Items unicity** | False | -| **Additional items** | False | -| **Tuple validation** | See below | +![Min Items: N/A](https://img.shields.io/badge/Min%20Items%3A%20N/A-%2318216d) +![Max Items: N/A](https://img.shields.io/badge/Max%20Items%3A%20N/A-%23131b58) +![Item unicity: False](https://img.shields.io/badge/Item%20unicity%3A%20False-%230f1443) +![Additional items: N/A](https://img.shields.io/badge/Additional%20items%3A%20N/A-%230a0e2e) #### repos items @@ -2047,13 +1984,10 @@ Must be one of: | -------- | ------- | | **Type** | `array` | -| | Array restrictions | -| -------------------- | ------------------ | -| **Min items** | N/A | -| **Max items** | N/A | -| **Items unicity** | False | -| **Additional items** | False | -| **Tuple validation** | See below | +![Min Items: N/A](https://img.shields.io/badge/Min%20Items%3A%20N/A-%2318216d) +![Max Items: N/A](https://img.shields.io/badge/Max%20Items%3A%20N/A-%23131b58) +![Item unicity: False](https://img.shields.io/badge/Item%20unicity%3A%20False-%230f1443) +![Additional items: N/A](https://img.shields.io/badge/Additional%20items%3A%20N/A-%230a0e2e) #### ZarfDataInjection @@ -2217,13 +2151,10 @@ Must be one of: | -------- | ------- | | **Type** | `array` | -| | Array restrictions | -| -------------------- | ------------------ | -| **Min items** | N/A | -| **Max items** | N/A | -| **Items unicity** | False | -| **Additional items** | False | -| **Tuple validation** | See below | +![Min Items: N/A](https://img.shields.io/badge/Min%20Items%3A%20N/A-%2318216d) +![Max Items: N/A](https://img.shields.io/badge/Max%20Items%3A%20N/A-%23131b58) +![Item unicity: False](https://img.shields.io/badge/Item%20unicity%3A%20False-%230f1443) +![Additional items: N/A](https://img.shields.io/badge/Additional%20items%3A%20N/A-%230a0e2e) #### ZarfPackageVariable @@ -2321,13 +2252,10 @@ Must be one of: | -------- | ------- | | **Type** | `array` | -| | Array restrictions | -| -------------------- | ------------------ | -| **Min items** | N/A | -| **Max items** | N/A | -| **Items unicity** | False | -| **Additional items** | False | -| **Tuple validation** | See below | +![Min Items: N/A](https://img.shields.io/badge/Min%20Items%3A%20N/A-%2318216d) +![Max Items: N/A](https://img.shields.io/badge/Max%20Items%3A%20N/A-%23131b58) +![Item unicity: False](https://img.shields.io/badge/Item%20unicity%3A%20False-%230f1443) +![Additional items: N/A](https://img.shields.io/badge/Additional%20items%3A%20N/A-%230a0e2e) #### ZarfPackageConstant diff --git a/hack/zarf-jsfh-template/section_array.md b/hack/zarf-jsfh-template/section_array.md index 52df365554..8f1219e80b 100644 --- a/hack/zarf-jsfh-template/section_array.md +++ b/hack/zarf-jsfh-template/section_array.md @@ -1,9 +1,22 @@ -{{ schema | md_array_restrictions | md_generate_table }} +{% set min_items = schema.kw_min_items.literal or "N/A" %} +{% set max_items = schema.kw_max_items.literal or "N/A" %} +{% set kw_unique_items = schema.kw_unique_items.literal or "False" %} +{% set kw_additional_items = schema.kw_additional_items.literal or "N/A" %} + +{{ md_badge("Min Items: " + min_items, "#18216d", show_text=False) }} +{{ md_badge("Max Items: " + max_items, "#131b58", show_text=False) }} +{{ md_badge("Item unicity: " + kw_unique_items, "#0f1443", show_text=False) }} +{{ md_badge("Additional items: " + kw_additional_items, "#0a0e2e", show_text=False) }} + {% if schema.array_items_def %} {% filter md_heading(3) %} {% with schema=schema.array_items_def %}{%- include "breadcrumbs.md" %}{% endwith %} {% endfilter %} {% with schema=schema.array_items_def, skip_headers=False, skip_required=True %} {% include "content.md" %} {% endwith %} {% endif %} {% if schema.kw_items %} -{{ schema | md_array_items_restrictions | md_generate_table }} +{{ md_badge("Min Items: " + min_items, "#18216d", show_text=False) }} +{{ md_badge("Max Items: " + max_items, "#131b58", show_text=False) }} +{{ md_badge("Item unicity: " + kw_unique_items, "#0f1443", show_text=False) }} +{{ md_badge("Additional items: " + kw_additional_items, "#0a0e2e", show_text=False) }} + {% for item in schema.kw_items %} {% filter md_heading(4, item.html_id) %} From d40548412f649734405a631cd16048f719c669fe Mon Sep 17 00:00:00 2001 From: Wayne Starr Date: Fri, 24 Feb 2023 13:52:02 -0600 Subject: [PATCH 08/12] Fixup headings --- docs/4-user-guide/3-zarf-schema.md | 296 +++++++++--------- hack/zarf-jsfh-template/section_array.md | 20 +- .../section_conditional_subschema.md | 4 +- .../section_properties_details.md | 4 +- hack/zarf-jsfh-template/tabbed_section.md | 2 +- 5 files changed, 163 insertions(+), 163 deletions(-) diff --git a/docs/4-user-guide/3-zarf-schema.md b/docs/4-user-guide/3-zarf-schema.md index ac9e83bdef..77e9a2872b 100644 --- a/docs/4-user-guide/3-zarf-schema.md +++ b/docs/4-user-guide/3-zarf-schema.md @@ -38,7 +38,7 @@ Must be one of:  
- ### metadata + ## metadata **Description:** Package metadata @@ -199,7 +199,7 @@ Must be one of:  
- ### build + ## build **Description:** Zarf-generated package build data @@ -302,12 +302,12 @@ Must be one of: | -------- | ----------------- | | **Type** | `array of string` | -![Min Items: N/A](https://img.shields.io/badge/Min%20Items%3A%20N/A-%2318216d) -![Max Items: N/A](https://img.shields.io/badge/Max%20Items%3A%20N/A-%23131b58) -![Item unicity: False](https://img.shields.io/badge/Item%20unicity%3A%20False-%230f1443) -![Additional items: N/A](https://img.shields.io/badge/Additional%20items%3A%20N/A-%230a0e2e) +![Min Items: N/A](https://img.shields.io/badge/Min%20Items%3A%20N/A-gold) +![Max Items: N/A](https://img.shields.io/badge/Max%20Items%3A%20N/A-gold) +![Item unicity: False](https://img.shields.io/badge/Item%20unicity%3A%20False-gold) +![Additional items: N/A](https://img.shields.io/badge/Additional%20items%3A%20N/A-gold) - #### migrations items + ### migrations items | | | | -------- | -------- | @@ -326,7 +326,7 @@ Must be one of:  
- ### components + ## components ![Required](https://img.shields.io/badge/Required-red) **Description:** List of components to deploy in this package @@ -335,12 +335,12 @@ Must be one of: | -------- | ------- | | **Type** | `array` | -![Min Items: N/A](https://img.shields.io/badge/Min%20Items%3A%20N/A-%2318216d) -![Max Items: N/A](https://img.shields.io/badge/Max%20Items%3A%20N/A-%23131b58) -![Item unicity: False](https://img.shields.io/badge/Item%20unicity%3A%20False-%230f1443) -![Additional items: N/A](https://img.shields.io/badge/Additional%20items%3A%20N/A-%230a0e2e) +![Min Items: N/A](https://img.shields.io/badge/Min%20Items%3A%20N/A-gold) +![Max Items: N/A](https://img.shields.io/badge/Max%20Items%3A%20N/A-gold) +![Item unicity: False](https://img.shields.io/badge/Item%20unicity%3A%20False-gold) +![Additional items: N/A](https://img.shields.io/badge/Additional%20items%3A%20N/A-gold) - #### ZarfComponent + ### ZarfComponent | | | | ------------------------- | -------------------------------------------------------------------------------------------------------- | @@ -425,7 +425,7 @@ Must be one of:  
- ### only + ## only **Description:** Filter when this component is included in package creation or deployment @@ -465,7 +465,7 @@ Must be one of:  
- ### cluster + ## cluster **Description:** Only deploy component to specified clusters @@ -510,12 +510,12 @@ Must be one of: | -------- | ----------------- | | **Type** | `array of string` | -![Min Items: N/A](https://img.shields.io/badge/Min%20Items%3A%20N/A-%2318216d) -![Max Items: N/A](https://img.shields.io/badge/Max%20Items%3A%20N/A-%23131b58) -![Item unicity: False](https://img.shields.io/badge/Item%20unicity%3A%20False-%230f1443) -![Additional items: N/A](https://img.shields.io/badge/Additional%20items%3A%20N/A-%230a0e2e) +![Min Items: N/A](https://img.shields.io/badge/Min%20Items%3A%20N/A-gold) +![Max Items: N/A](https://img.shields.io/badge/Max%20Items%3A%20N/A-gold) +![Item unicity: False](https://img.shields.io/badge/Item%20unicity%3A%20False-gold) +![Additional items: N/A](https://img.shields.io/badge/Additional%20items%3A%20N/A-gold) - #### distros items + ### distros items | | | | -------- | -------- | @@ -569,7 +569,7 @@ Must be one of:  
- ### import + ## import **Description:** Import a component from another Zarf package @@ -623,7 +623,7 @@ Must be one of:  
- ### scripts + ## scripts **Description:** [DEPRECATED] - (replaced by actions) Custom commands to run before or after package deployment @@ -694,12 +694,12 @@ Must be one of: | -------- | ----------------- | | **Type** | `array of string` | -![Min Items: N/A](https://img.shields.io/badge/Min%20Items%3A%20N/A-%2318216d) -![Max Items: N/A](https://img.shields.io/badge/Max%20Items%3A%20N/A-%23131b58) -![Item unicity: False](https://img.shields.io/badge/Item%20unicity%3A%20False-%230f1443) -![Additional items: N/A](https://img.shields.io/badge/Additional%20items%3A%20N/A-%230a0e2e) +![Min Items: N/A](https://img.shields.io/badge/Min%20Items%3A%20N/A-gold) +![Max Items: N/A](https://img.shields.io/badge/Max%20Items%3A%20N/A-gold) +![Item unicity: False](https://img.shields.io/badge/Item%20unicity%3A%20False-gold) +![Additional items: N/A](https://img.shields.io/badge/Additional%20items%3A%20N/A-gold) - #### prepare items + ### prepare items | | | | -------- | -------- | @@ -721,12 +721,12 @@ Must be one of: | -------- | ----------------- | | **Type** | `array of string` | -![Min Items: N/A](https://img.shields.io/badge/Min%20Items%3A%20N/A-%2318216d) -![Max Items: N/A](https://img.shields.io/badge/Max%20Items%3A%20N/A-%23131b58) -![Item unicity: False](https://img.shields.io/badge/Item%20unicity%3A%20False-%230f1443) -![Additional items: N/A](https://img.shields.io/badge/Additional%20items%3A%20N/A-%230a0e2e) +![Min Items: N/A](https://img.shields.io/badge/Min%20Items%3A%20N/A-gold) +![Max Items: N/A](https://img.shields.io/badge/Max%20Items%3A%20N/A-gold) +![Item unicity: False](https://img.shields.io/badge/Item%20unicity%3A%20False-gold) +![Additional items: N/A](https://img.shields.io/badge/Additional%20items%3A%20N/A-gold) - #### before items + ### before items | | | | -------- | -------- | @@ -748,12 +748,12 @@ Must be one of: | -------- | ----------------- | | **Type** | `array of string` | -![Min Items: N/A](https://img.shields.io/badge/Min%20Items%3A%20N/A-%2318216d) -![Max Items: N/A](https://img.shields.io/badge/Max%20Items%3A%20N/A-%23131b58) -![Item unicity: False](https://img.shields.io/badge/Item%20unicity%3A%20False-%230f1443) -![Additional items: N/A](https://img.shields.io/badge/Additional%20items%3A%20N/A-%230a0e2e) +![Min Items: N/A](https://img.shields.io/badge/Min%20Items%3A%20N/A-gold) +![Max Items: N/A](https://img.shields.io/badge/Max%20Items%3A%20N/A-gold) +![Item unicity: False](https://img.shields.io/badge/Item%20unicity%3A%20False-gold) +![Additional items: N/A](https://img.shields.io/badge/Additional%20items%3A%20N/A-gold) - #### after items + ### after items | | | | -------- | -------- | @@ -772,7 +772,7 @@ Must be one of:  
- ### actions + ## actions **Description:** Custom commands to run at various stages of a package lifecycle @@ -789,7 +789,7 @@ Must be one of:  
- ### onCreate + ## onCreate **Description:** Actions to run during package creation @@ -806,7 +806,7 @@ Must be one of:  
- ### defaults + ## defaults **Description:** Default configuration for all actions in this set @@ -893,12 +893,12 @@ Must be one of: | -------- | ----------------- | | **Type** | `array of string` | -![Min Items: N/A](https://img.shields.io/badge/Min%20Items%3A%20N/A-%2318216d) -![Max Items: N/A](https://img.shields.io/badge/Max%20Items%3A%20N/A-%23131b58) -![Item unicity: False](https://img.shields.io/badge/Item%20unicity%3A%20False-%230f1443) -![Additional items: N/A](https://img.shields.io/badge/Additional%20items%3A%20N/A-%230a0e2e) +![Min Items: N/A](https://img.shields.io/badge/Min%20Items%3A%20N/A-gold) +![Max Items: N/A](https://img.shields.io/badge/Max%20Items%3A%20N/A-gold) +![Item unicity: False](https://img.shields.io/badge/Item%20unicity%3A%20False-gold) +![Additional items: N/A](https://img.shields.io/badge/Additional%20items%3A%20N/A-gold) - #### env items + ### env items | | | | -------- | -------- | @@ -917,7 +917,7 @@ Must be one of:  
- ### before + ## before **Description:** Actions to run at the start of an operation @@ -925,12 +925,12 @@ Must be one of: | -------- | ------- | | **Type** | `array` | -![Min Items: N/A](https://img.shields.io/badge/Min%20Items%3A%20N/A-%2318216d) -![Max Items: N/A](https://img.shields.io/badge/Max%20Items%3A%20N/A-%23131b58) -![Item unicity: False](https://img.shields.io/badge/Item%20unicity%3A%20False-%230f1443) -![Additional items: N/A](https://img.shields.io/badge/Additional%20items%3A%20N/A-%230a0e2e) +![Min Items: N/A](https://img.shields.io/badge/Min%20Items%3A%20N/A-gold) +![Max Items: N/A](https://img.shields.io/badge/Max%20Items%3A%20N/A-gold) +![Item unicity: False](https://img.shields.io/badge/Item%20unicity%3A%20False-gold) +![Additional items: N/A](https://img.shields.io/badge/Additional%20items%3A%20N/A-gold) - #### ZarfComponentAction + ### ZarfComponentAction | | | | ------------------------- | -------------------------------------------------------------------------------------------------------- | @@ -1015,12 +1015,12 @@ Must be one of: | -------- | ----------------- | | **Type** | `array of string` | -![Min Items: N/A](https://img.shields.io/badge/Min%20Items%3A%20N/A-%2318216d) -![Max Items: N/A](https://img.shields.io/badge/Max%20Items%3A%20N/A-%23131b58) -![Item unicity: False](https://img.shields.io/badge/Item%20unicity%3A%20False-%230f1443) -![Additional items: N/A](https://img.shields.io/badge/Additional%20items%3A%20N/A-%230a0e2e) +![Min Items: N/A](https://img.shields.io/badge/Min%20Items%3A%20N/A-gold) +![Max Items: N/A](https://img.shields.io/badge/Max%20Items%3A%20N/A-gold) +![Item unicity: False](https://img.shields.io/badge/Item%20unicity%3A%20False-gold) +![Additional items: N/A](https://img.shields.io/badge/Additional%20items%3A%20N/A-gold) - #### env items + ### env items | | | | -------- | -------- | @@ -1088,7 +1088,7 @@ Must be one of:  
- ### wait + ## wait **Description:** Wait for a condition to be met before continuing. Must specify either cmd or wait for the action. See the 'zarf tools wait-for' command for more info. @@ -1105,7 +1105,7 @@ Must be one of:  
- ### cluster + ## cluster **Description:** Wait for a condition to be met in the cluster before continuing. Only one of cluster or network can be specified. @@ -1191,7 +1191,7 @@ Must be one of:  
- ### network + ## network **Description:** Wait for a condition to be met on the network before continuing. Only one of cluster or network can be specified. @@ -1276,7 +1276,7 @@ Must be one of:  
- ### after + ## after **Description:** Actions to run at the end of an operation @@ -1284,12 +1284,12 @@ Must be one of: | -------- | ------- | | **Type** | `array` | -![Min Items: N/A](https://img.shields.io/badge/Min%20Items%3A%20N/A-%2318216d) -![Max Items: N/A](https://img.shields.io/badge/Max%20Items%3A%20N/A-%23131b58) -![Item unicity: False](https://img.shields.io/badge/Item%20unicity%3A%20False-%230f1443) -![Additional items: N/A](https://img.shields.io/badge/Additional%20items%3A%20N/A-%230a0e2e) +![Min Items: N/A](https://img.shields.io/badge/Min%20Items%3A%20N/A-gold) +![Max Items: N/A](https://img.shields.io/badge/Max%20Items%3A%20N/A-gold) +![Item unicity: False](https://img.shields.io/badge/Item%20unicity%3A%20False-gold) +![Additional items: N/A](https://img.shields.io/badge/Additional%20items%3A%20N/A-gold) - #### ZarfComponentAction + ### ZarfComponentAction | | | | ------------------------- | -------------------------------------------------------------------------------------------------------- | @@ -1307,7 +1307,7 @@ Must be one of:  
- ### onSuccess + ## onSuccess **Description:** Actions to run if all operations succeed @@ -1315,12 +1315,12 @@ Must be one of: | -------- | ------- | | **Type** | `array` | -![Min Items: N/A](https://img.shields.io/badge/Min%20Items%3A%20N/A-%2318216d) -![Max Items: N/A](https://img.shields.io/badge/Max%20Items%3A%20N/A-%23131b58) -![Item unicity: False](https://img.shields.io/badge/Item%20unicity%3A%20False-%230f1443) -![Additional items: N/A](https://img.shields.io/badge/Additional%20items%3A%20N/A-%230a0e2e) +![Min Items: N/A](https://img.shields.io/badge/Min%20Items%3A%20N/A-gold) +![Max Items: N/A](https://img.shields.io/badge/Max%20Items%3A%20N/A-gold) +![Item unicity: False](https://img.shields.io/badge/Item%20unicity%3A%20False-gold) +![Additional items: N/A](https://img.shields.io/badge/Additional%20items%3A%20N/A-gold) - #### ZarfComponentAction + ### ZarfComponentAction | | | | ------------------------- | -------------------------------------------------------------------------------------------------------- | @@ -1338,7 +1338,7 @@ Must be one of:  
- ### onFailure + ## onFailure **Description:** Actions to run if all operations fail @@ -1346,12 +1346,12 @@ Must be one of: | -------- | ------- | | **Type** | `array` | -![Min Items: N/A](https://img.shields.io/badge/Min%20Items%3A%20N/A-%2318216d) -![Max Items: N/A](https://img.shields.io/badge/Max%20Items%3A%20N/A-%23131b58) -![Item unicity: False](https://img.shields.io/badge/Item%20unicity%3A%20False-%230f1443) -![Additional items: N/A](https://img.shields.io/badge/Additional%20items%3A%20N/A-%230a0e2e) +![Min Items: N/A](https://img.shields.io/badge/Min%20Items%3A%20N/A-gold) +![Max Items: N/A](https://img.shields.io/badge/Max%20Items%3A%20N/A-gold) +![Item unicity: False](https://img.shields.io/badge/Item%20unicity%3A%20False-gold) +![Additional items: N/A](https://img.shields.io/badge/Additional%20items%3A%20N/A-gold) - #### ZarfComponentAction + ### ZarfComponentAction | | | | ------------------------- | -------------------------------------------------------------------------------------------------------- | @@ -1372,7 +1372,7 @@ Must be one of:  
- ### onDeploy + ## onDeploy **Description:** Actions to run during package deployment @@ -1392,7 +1392,7 @@ Must be one of:  
- ### onRemove + ## onRemove **Description:** Actions to run during package removal @@ -1415,7 +1415,7 @@ Must be one of:  
- ### files + ## files **Description:** Files to place on disk during package deployment @@ -1423,12 +1423,12 @@ Must be one of: | -------- | ------- | | **Type** | `array` | -![Min Items: N/A](https://img.shields.io/badge/Min%20Items%3A%20N/A-%2318216d) -![Max Items: N/A](https://img.shields.io/badge/Max%20Items%3A%20N/A-%23131b58) -![Item unicity: False](https://img.shields.io/badge/Item%20unicity%3A%20False-%230f1443) -![Additional items: N/A](https://img.shields.io/badge/Additional%20items%3A%20N/A-%230a0e2e) +![Min Items: N/A](https://img.shields.io/badge/Min%20Items%3A%20N/A-gold) +![Max Items: N/A](https://img.shields.io/badge/Max%20Items%3A%20N/A-gold) +![Item unicity: False](https://img.shields.io/badge/Item%20unicity%3A%20False-gold) +![Additional items: N/A](https://img.shields.io/badge/Additional%20items%3A%20N/A-gold) - #### ZarfFile + ### ZarfFile | | | | ------------------------- | -------------------------------------------------------------------------------------------------------- | @@ -1517,12 +1517,12 @@ Must be one of: | -------- | ----------------- | | **Type** | `array of string` | -![Min Items: N/A](https://img.shields.io/badge/Min%20Items%3A%20N/A-%2318216d) -![Max Items: N/A](https://img.shields.io/badge/Max%20Items%3A%20N/A-%23131b58) -![Item unicity: False](https://img.shields.io/badge/Item%20unicity%3A%20False-%230f1443) -![Additional items: N/A](https://img.shields.io/badge/Additional%20items%3A%20N/A-%230a0e2e) +![Min Items: N/A](https://img.shields.io/badge/Min%20Items%3A%20N/A-gold) +![Max Items: N/A](https://img.shields.io/badge/Max%20Items%3A%20N/A-gold) +![Item unicity: False](https://img.shields.io/badge/Item%20unicity%3A%20False-gold) +![Additional items: N/A](https://img.shields.io/badge/Additional%20items%3A%20N/A-gold) - #### symlinks items + ### symlinks items | | | | -------- | -------- | @@ -1541,7 +1541,7 @@ Must be one of:  
- ### charts + ## charts **Description:** Helm charts to install during package deploy @@ -1549,12 +1549,12 @@ Must be one of: | -------- | ------- | | **Type** | `array` | -![Min Items: N/A](https://img.shields.io/badge/Min%20Items%3A%20N/A-%2318216d) -![Max Items: N/A](https://img.shields.io/badge/Max%20Items%3A%20N/A-%23131b58) -![Item unicity: False](https://img.shields.io/badge/Item%20unicity%3A%20False-%230f1443) -![Additional items: N/A](https://img.shields.io/badge/Additional%20items%3A%20N/A-%230a0e2e) +![Min Items: N/A](https://img.shields.io/badge/Min%20Items%3A%20N/A-gold) +![Max Items: N/A](https://img.shields.io/badge/Max%20Items%3A%20N/A-gold) +![Item unicity: False](https://img.shields.io/badge/Item%20unicity%3A%20False-gold) +![Additional items: N/A](https://img.shields.io/badge/Additional%20items%3A%20N/A-gold) - #### ZarfChart + ### ZarfChart | | | | ------------------------- | -------------------------------------------------------------------------------------------------------- | @@ -1571,7 +1571,7 @@ Must be one of:
-#### Property `url` +### Property `url` **Title:** url @@ -1586,7 +1586,7 @@ Must be one of:
-#### Property `localPath` +### Property `localPath` **Title:** localPath @@ -1701,12 +1701,12 @@ Must be one of: | -------- | ----------------- | | **Type** | `array of string` | -![Min Items: N/A](https://img.shields.io/badge/Min%20Items%3A%20N/A-%2318216d) -![Max Items: N/A](https://img.shields.io/badge/Max%20Items%3A%20N/A-%23131b58) -![Item unicity: False](https://img.shields.io/badge/Item%20unicity%3A%20False-%230f1443) -![Additional items: N/A](https://img.shields.io/badge/Additional%20items%3A%20N/A-%230a0e2e) +![Min Items: N/A](https://img.shields.io/badge/Min%20Items%3A%20N/A-gold) +![Max Items: N/A](https://img.shields.io/badge/Max%20Items%3A%20N/A-gold) +![Item unicity: False](https://img.shields.io/badge/Item%20unicity%3A%20False-gold) +![Additional items: N/A](https://img.shields.io/badge/Additional%20items%3A%20N/A-gold) - #### valuesFiles items + ### valuesFiles items | | | | -------- | -------- | @@ -1773,18 +1773,18 @@ Must be one of:  
- ### manifests + ## manifests | | | | -------- | ------- | | **Type** | `array` | -![Min Items: N/A](https://img.shields.io/badge/Min%20Items%3A%20N/A-%2318216d) -![Max Items: N/A](https://img.shields.io/badge/Max%20Items%3A%20N/A-%23131b58) -![Item unicity: False](https://img.shields.io/badge/Item%20unicity%3A%20False-%230f1443) -![Additional items: N/A](https://img.shields.io/badge/Additional%20items%3A%20N/A-%230a0e2e) +![Min Items: N/A](https://img.shields.io/badge/Min%20Items%3A%20N/A-gold) +![Max Items: N/A](https://img.shields.io/badge/Max%20Items%3A%20N/A-gold) +![Item unicity: False](https://img.shields.io/badge/Item%20unicity%3A%20False-gold) +![Additional items: N/A](https://img.shields.io/badge/Additional%20items%3A%20N/A-gold) - #### ZarfManifest + ### ZarfManifest | | | | ------------------------- | -------------------------------------------------------------------------------------------------------- | @@ -1839,12 +1839,12 @@ Must be one of: | -------- | ----------------- | | **Type** | `array of string` | -![Min Items: N/A](https://img.shields.io/badge/Min%20Items%3A%20N/A-%2318216d) -![Max Items: N/A](https://img.shields.io/badge/Max%20Items%3A%20N/A-%23131b58) -![Item unicity: False](https://img.shields.io/badge/Item%20unicity%3A%20False-%230f1443) -![Additional items: N/A](https://img.shields.io/badge/Additional%20items%3A%20N/A-%230a0e2e) +![Min Items: N/A](https://img.shields.io/badge/Min%20Items%3A%20N/A-gold) +![Max Items: N/A](https://img.shields.io/badge/Max%20Items%3A%20N/A-gold) +![Item unicity: False](https://img.shields.io/badge/Item%20unicity%3A%20False-gold) +![Additional items: N/A](https://img.shields.io/badge/Additional%20items%3A%20N/A-gold) - #### files items + ### files items | | | | -------- | -------- | @@ -1882,12 +1882,12 @@ Must be one of: | -------- | ----------------- | | **Type** | `array of string` | -![Min Items: N/A](https://img.shields.io/badge/Min%20Items%3A%20N/A-%2318216d) -![Max Items: N/A](https://img.shields.io/badge/Max%20Items%3A%20N/A-%23131b58) -![Item unicity: False](https://img.shields.io/badge/Item%20unicity%3A%20False-%230f1443) -![Additional items: N/A](https://img.shields.io/badge/Additional%20items%3A%20N/A-%230a0e2e) +![Min Items: N/A](https://img.shields.io/badge/Min%20Items%3A%20N/A-gold) +![Max Items: N/A](https://img.shields.io/badge/Max%20Items%3A%20N/A-gold) +![Item unicity: False](https://img.shields.io/badge/Item%20unicity%3A%20False-gold) +![Additional items: N/A](https://img.shields.io/badge/Additional%20items%3A%20N/A-gold) - #### kustomizations items + ### kustomizations items | | | | -------- | -------- | @@ -1928,12 +1928,12 @@ Must be one of: | -------- | ----------------- | | **Type** | `array of string` | -![Min Items: N/A](https://img.shields.io/badge/Min%20Items%3A%20N/A-%2318216d) -![Max Items: N/A](https://img.shields.io/badge/Max%20Items%3A%20N/A-%23131b58) -![Item unicity: False](https://img.shields.io/badge/Item%20unicity%3A%20False-%230f1443) -![Additional items: N/A](https://img.shields.io/badge/Additional%20items%3A%20N/A-%230a0e2e) +![Min Items: N/A](https://img.shields.io/badge/Min%20Items%3A%20N/A-gold) +![Max Items: N/A](https://img.shields.io/badge/Max%20Items%3A%20N/A-gold) +![Item unicity: False](https://img.shields.io/badge/Item%20unicity%3A%20False-gold) +![Additional items: N/A](https://img.shields.io/badge/Additional%20items%3A%20N/A-gold) - #### images items + ### images items | | | | -------- | -------- | @@ -1955,12 +1955,12 @@ Must be one of: | -------- | ----------------- | | **Type** | `array of string` | -![Min Items: N/A](https://img.shields.io/badge/Min%20Items%3A%20N/A-%2318216d) -![Max Items: N/A](https://img.shields.io/badge/Max%20Items%3A%20N/A-%23131b58) -![Item unicity: False](https://img.shields.io/badge/Item%20unicity%3A%20False-%230f1443) -![Additional items: N/A](https://img.shields.io/badge/Additional%20items%3A%20N/A-%230a0e2e) +![Min Items: N/A](https://img.shields.io/badge/Min%20Items%3A%20N/A-gold) +![Max Items: N/A](https://img.shields.io/badge/Max%20Items%3A%20N/A-gold) +![Item unicity: False](https://img.shields.io/badge/Item%20unicity%3A%20False-gold) +![Additional items: N/A](https://img.shields.io/badge/Additional%20items%3A%20N/A-gold) - #### repos items + ### repos items | | | | -------- | -------- | @@ -1976,7 +1976,7 @@ Must be one of:  
- ### dataInjections + ## dataInjections **Description:** Datasets to inject into a pod in the target cluster @@ -1984,12 +1984,12 @@ Must be one of: | -------- | ------- | | **Type** | `array` | -![Min Items: N/A](https://img.shields.io/badge/Min%20Items%3A%20N/A-%2318216d) -![Max Items: N/A](https://img.shields.io/badge/Max%20Items%3A%20N/A-%23131b58) -![Item unicity: False](https://img.shields.io/badge/Item%20unicity%3A%20False-%230f1443) -![Additional items: N/A](https://img.shields.io/badge/Additional%20items%3A%20N/A-%230a0e2e) +![Min Items: N/A](https://img.shields.io/badge/Min%20Items%3A%20N/A-gold) +![Max Items: N/A](https://img.shields.io/badge/Max%20Items%3A%20N/A-gold) +![Item unicity: False](https://img.shields.io/badge/Item%20unicity%3A%20False-gold) +![Additional items: N/A](https://img.shields.io/badge/Additional%20items%3A%20N/A-gold) - #### ZarfDataInjection + ### ZarfDataInjection | | | | ------------------------- | -------------------------------------------------------------------------------------------------------- | @@ -2022,7 +2022,7 @@ Must be one of:  
- ### target + ## target ![Required](https://img.shields.io/badge/Required-red) **Description:** The target pod + container to inject the data into @@ -2143,7 +2143,7 @@ Must be one of:  
- ### variables + ## variables **Description:** Variable template values applied on deploy for K8s resources @@ -2151,12 +2151,12 @@ Must be one of: | -------- | ------- | | **Type** | `array` | -![Min Items: N/A](https://img.shields.io/badge/Min%20Items%3A%20N/A-%2318216d) -![Max Items: N/A](https://img.shields.io/badge/Max%20Items%3A%20N/A-%23131b58) -![Item unicity: False](https://img.shields.io/badge/Item%20unicity%3A%20False-%230f1443) -![Additional items: N/A](https://img.shields.io/badge/Additional%20items%3A%20N/A-%230a0e2e) +![Min Items: N/A](https://img.shields.io/badge/Min%20Items%3A%20N/A-gold) +![Max Items: N/A](https://img.shields.io/badge/Max%20Items%3A%20N/A-gold) +![Item unicity: False](https://img.shields.io/badge/Item%20unicity%3A%20False-gold) +![Additional items: N/A](https://img.shields.io/badge/Additional%20items%3A%20N/A-gold) - #### ZarfPackageVariable + ### ZarfPackageVariable | | | | ------------------------- | -------------------------------------------------------------------------------------------------------- | @@ -2244,7 +2244,7 @@ Must be one of:  
- ### constants + ## constants **Description:** Constant template values applied on deploy for K8s resources @@ -2252,12 +2252,12 @@ Must be one of: | -------- | ------- | | **Type** | `array` | -![Min Items: N/A](https://img.shields.io/badge/Min%20Items%3A%20N/A-%2318216d) -![Max Items: N/A](https://img.shields.io/badge/Max%20Items%3A%20N/A-%23131b58) -![Item unicity: False](https://img.shields.io/badge/Item%20unicity%3A%20False-%230f1443) -![Additional items: N/A](https://img.shields.io/badge/Additional%20items%3A%20N/A-%230a0e2e) +![Min Items: N/A](https://img.shields.io/badge/Min%20Items%3A%20N/A-gold) +![Max Items: N/A](https://img.shields.io/badge/Max%20Items%3A%20N/A-gold) +![Item unicity: False](https://img.shields.io/badge/Item%20unicity%3A%20False-gold) +![Additional items: N/A](https://img.shields.io/badge/Additional%20items%3A%20N/A-gold) - #### ZarfPackageConstant + ### ZarfPackageConstant | | | | ------------------------- | -------------------------------------------------------------------------------------------------------- | diff --git a/hack/zarf-jsfh-template/section_array.md b/hack/zarf-jsfh-template/section_array.md index 8f1219e80b..3db7504f45 100644 --- a/hack/zarf-jsfh-template/section_array.md +++ b/hack/zarf-jsfh-template/section_array.md @@ -3,23 +3,23 @@ {% set kw_unique_items = schema.kw_unique_items.literal or "False" %} {% set kw_additional_items = schema.kw_additional_items.literal or "N/A" %} -{{ md_badge("Min Items: " + min_items, "#18216d", show_text=False) }} -{{ md_badge("Max Items: " + max_items, "#131b58", show_text=False) }} -{{ md_badge("Item unicity: " + kw_unique_items, "#0f1443", show_text=False) }} -{{ md_badge("Additional items: " + kw_additional_items, "#0a0e2e", show_text=False) }} +{{ md_badge("Min Items: " + min_items, "gold", show_text=False) }} +{{ md_badge("Max Items: " + max_items, "gold", show_text=False) }} +{{ md_badge("Item unicity: " + kw_unique_items, "gold", show_text=False) }} +{{ md_badge("Additional items: " + kw_additional_items, "gold", show_text=False) }} -{% if schema.array_items_def %} {% filter md_heading(3) %} {% with schema=schema.array_items_def %}{%- include "breadcrumbs.md" %}{% endwith %} {% endfilter %} {% with schema=schema.array_items_def, skip_headers=False, skip_required=True %} {% include "content.md" %} {% endwith %} {% endif %} +{% if schema.array_items_def %} {% filter md_heading(2) %} {% with schema=schema.array_items_def %}{%- include "breadcrumbs.md" %}{% endwith %} {% endfilter %} {% with schema=schema.array_items_def, skip_headers=False, skip_required=True %} {% include "content.md" %} {% endwith %} {% endif %} {% if schema.kw_items %} -{{ md_badge("Min Items: " + min_items, "#18216d", show_text=False) }} -{{ md_badge("Max Items: " + max_items, "#131b58", show_text=False) }} -{{ md_badge("Item unicity: " + kw_unique_items, "#0f1443", show_text=False) }} -{{ md_badge("Additional items: " + kw_additional_items, "#0a0e2e", show_text=False) }} +{{ md_badge("Min Items: " + min_items, "gold", show_text=False) }} +{{ md_badge("Max Items: " + max_items, "gold", show_text=False) }} +{{ md_badge("Item unicity: " + kw_unique_items, "gold", show_text=False) }} +{{ md_badge("Additional items: " + kw_additional_items, "gold", show_text=False) }} {% for item in schema.kw_items %} - {% filter md_heading(4, item.html_id) %} + {% filter md_heading(3, item.html_id) %} {% with schema=item %}{%- include "breadcrumbs.md" %}{% endwith %} {% endfilter %} {% with schema=item, skip_headers=False, skip_required=True %} diff --git a/hack/zarf-jsfh-template/section_conditional_subschema.md b/hack/zarf-jsfh-template/section_conditional_subschema.md index 69d2d56374..4eea301310 100644 --- a/hack/zarf-jsfh-template/section_conditional_subschema.md +++ b/hack/zarf-jsfh-template/section_conditional_subschema.md @@ -2,7 +2,7 @@ {% set first_property = schema.kw_if | get_first_property %} {% if schema.kw_then %} - {%- filter md_heading(3) -%}If ( + {%- filter md_heading(2) -%}If ( {{- first_property.property_name | md_escape_for_table -}} {{- " = " -}} {{- first_property.kw_const.literal | python_to_json -}} @@ -12,7 +12,7 @@ {% endwith %} {% endif %} {% if schema.kw_else %} - {%- filter md_heading(3) -%}Else (i.e. {{ " " }} + {%- filter md_heading(2) -%}Else (i.e. {{ " " }} {{- first_property.property_name | md_escape_for_table -}} {{- " != " -}} {{- first_property.kw_const.literal | python_to_json -}} diff --git a/hack/zarf-jsfh-template/section_properties_details.md b/hack/zarf-jsfh-template/section_properties_details.md index b1083b009b..9bf3ea2d95 100644 --- a/hack/zarf-jsfh-template/section_properties_details.md +++ b/hack/zarf-jsfh-template/section_properties_details.md @@ -13,7 +13,7 @@
{% endif %} - {% filter md_heading(2, html_id, True) -%} + {% filter md_heading(1, html_id, True) -%} {%- filter replace('\n', '') -%} {%- if sub_property is deprecated -%}~~{%- endif -%} {%- if sub_property.is_pattern_property %} Pattern Property{% endif %} {% with schema=sub_property %}{%- include "breadcrumbs.md" %} {% endwith %} @@ -29,7 +29,7 @@
{% if sub_property.type_name == "object" or sub_property.type_name == "array" %} - ### {% with schema=sub_property %} {%- include "breadcrumbs.md" %} {% endwith %} + ## {% with schema=sub_property %} {%- include "breadcrumbs.md" %} {% endwith %} {% endif %} {% with schema=sub_property, skip_headers=False %} diff --git a/hack/zarf-jsfh-template/tabbed_section.md b/hack/zarf-jsfh-template/tabbed_section.md index dadaeeaaac..e675cd6d60 100644 --- a/hack/zarf-jsfh-template/tabbed_section.md +++ b/hack/zarf-jsfh-template/tabbed_section.md @@ -5,7 +5,7 @@ {% for node in current_node.array_items %}
- {% filter md_heading(3, node.html_id) -%} + {% filter md_heading(2, node.html_id) -%} {% if node.is_pattern_property %}Pattern{% endif %} Property `{% with schema=node %}{%- include "breadcrumbs.md" %}{% endwith %}` {%- endfilter %} From badec6adc7c2288d62c6e40cde2e25616d0ff65e Mon Sep 17 00:00:00 2001 From: Wayne Starr Date: Fri, 24 Feb 2023 15:12:58 -0600 Subject: [PATCH 09/12] More refinements --- docs/4-user-guide/3-zarf-schema.md | 135 ++++++++++++------ hack/zarf-jsfh-template/section_examples.md | 2 +- .../section_properties_details.md | 7 +- src/types/component.go | 34 ++--- src/types/package.go | 14 +- src/ui/lib/api-types.ts | 74 +++++++--- zarf.schema.json | 81 +++++++---- 7 files changed, 231 insertions(+), 116 deletions(-) diff --git a/docs/4-user-guide/3-zarf-schema.md b/docs/4-user-guide/3-zarf-schema.md index 77e9a2872b..85ecc38d46 100644 --- a/docs/4-user-guide/3-zarf-schema.md +++ b/docs/4-user-guide/3-zarf-schema.md @@ -38,7 +38,7 @@ Must be one of:  
- ## metadata + ## metadata **Description:** Package metadata @@ -157,7 +157,7 @@ Must be one of:  
-**Description:** The target cluster architecture of this package +**Description:** The target cluster architecture for this package | | | | -------- | -------- | @@ -166,9 +166,7 @@ Must be one of: **Examples:** -"arm64" -"amd64" - +"arm64", "amd64"
@@ -199,7 +197,7 @@ Must be one of:  
- ## build + ## build **Description:** Zarf-generated package build data @@ -218,6 +216,8 @@ Must be one of: ![Required](https://img.shields.io/badge/Required-red) +**Description:** The machine name that created this package + | | | | -------- | -------- | | **Type** | `string` | @@ -234,6 +234,8 @@ Must be one of: ![Required](https://img.shields.io/badge/Required-red) +**Description:** The username who created this package + | | | | -------- | -------- | | **Type** | `string` | @@ -250,6 +252,8 @@ Must be one of: ![Required](https://img.shields.io/badge/Required-red) +**Description:** The architecture this package was created on + | | | | -------- | -------- | | **Type** | `string` | @@ -266,6 +270,8 @@ Must be one of: ![Required](https://img.shields.io/badge/Required-red) +**Description:** The timestamp when this package was created + | | | | -------- | -------- | | **Type** | `string` | @@ -282,6 +288,8 @@ Must be one of: ![Required](https://img.shields.io/badge/Required-red) +**Description:** The version of Zarf used to build this package + | | | | -------- | -------- | | **Type** | `string` | @@ -298,6 +306,8 @@ Must be one of: ![Required](https://img.shields.io/badge/Required-red) +**Description:** Any migrations that have been run on this package + | | | | -------- | ----------------- | | **Type** | `array of string` | @@ -326,7 +336,7 @@ Must be one of:  
- ## components + ## components ![Required](https://img.shields.io/badge/Required-red) **Description:** List of components to deploy in this package @@ -425,7 +435,7 @@ Must be one of:  
- ## only + ## components > components items > only **Description:** Filter when this component is included in package creation or deployment @@ -465,7 +475,7 @@ Must be one of:  
- ## cluster + ## components > components items > only > cluster **Description:** Only deploy component to specified clusters @@ -504,7 +514,7 @@ Must be one of:  
-**Description:** A list of kubernetes distros this package works with (Reserved for future use in Zarf UI) +**Description:** A list of kubernetes distros this package works with (Reserved for future use) | | | | -------- | ----------------- | @@ -569,7 +579,7 @@ Must be one of:  
- ## import + ## components > components items > import **Description:** Import a component from another Zarf package @@ -586,6 +596,8 @@ Must be one of:  
+**Description:** The name of the component to import from the referenced zarf.yaml + | | | | -------- | -------- | | **Type** | `string` | @@ -602,6 +614,8 @@ Must be one of: ![Required](https://img.shields.io/badge/Required-red) +**Description:** The relative path to a directory containing a zarf.yaml to import from + | | | | -------- | -------- | | **Type** | `string` | @@ -623,9 +637,9 @@ Must be one of:  
- ## scripts + ## components > components items > scripts -**Description:** [DEPRECATED] - (replaced by actions) Custom commands to run before or after package deployment +**Description:** [DEPRECATED] (replaced by actions) Custom commands to run before or after package deployment | | | | ------------------------- | -------------------------------------------------------------------------------------------------------- | @@ -772,7 +786,7 @@ Must be one of:  
- ## actions + ## components > components items > actions **Description:** Custom commands to run at various stages of a package lifecycle @@ -789,7 +803,7 @@ Must be one of:  
- ## onCreate + ## components > components items > actions > onCreate **Description:** Actions to run during package creation @@ -806,7 +820,7 @@ Must be one of:  
- ## defaults + ## components > components items > actions > onCreate > defaults **Description:** Default configuration for all actions in this set @@ -917,7 +931,7 @@ Must be one of:  
- ## before + ## components > components items > actions > onCreate > before **Description:** Actions to run at the start of an operation @@ -1088,7 +1102,7 @@ Must be one of:  
- ## wait + ## components > components items > actions > onCreate > before > before items > wait **Description:** Wait for a condition to be met before continuing. Must specify either cmd or wait for the action. See the 'zarf tools wait-for' command for more info. @@ -1105,7 +1119,7 @@ Must be one of:  
- ## cluster + ## components > components items > actions > onCreate > before > before items > wait > cluster **Description:** Wait for a condition to be met in the cluster before continuing. Only one of cluster or network can be specified. @@ -1124,12 +1138,17 @@ Must be one of: ![Required](https://img.shields.io/badge/Required-red) -**Description:** The kind of resource to wait for (e.g. Pod; Deployment; etc.) +**Description:** The kind of resource to wait for | | | | -------- | -------- | | **Type** | `string` | +**Examples:** + + +"Pod", "Deployment)" +
@@ -1142,10 +1161,17 @@ Must be one of: ![Required](https://img.shields.io/badge/Required-red) +**Description:** The name of the resource or selector to wait for + | | | | -------- | -------- | | **Type** | `string` | +**Examples:** + + +"podinfo", "app=podinfo" +
@@ -1172,12 +1198,17 @@ Must be one of:  
-**Description:** The condition to wait for (e.g. Ready; Available; etc.). Defaults to exist +**Description:** The condition to wait for; defaults to exist | | | | -------- | -------- | | **Type** | `string` | +**Examples:** + + +"Ready", "Available" +
@@ -1191,7 +1222,7 @@ Must be one of:  
- ## network + ## components > components items > actions > onCreate > before > before items > wait > network **Description:** Wait for a condition to be met on the network before continuing. Only one of cluster or network can be specified. @@ -1210,7 +1241,7 @@ Must be one of: ![Required](https://img.shields.io/badge/Required-red) -**Description:** The protocol to wait for (e.g. tcp; http; etc.). +**Description:** The protocol to wait for | | | | -------- | ------------------ | @@ -1235,12 +1266,17 @@ Must be one of: ![Required](https://img.shields.io/badge/Required-red) -**Description:** The address to wait for (e.g. localhost:8080; 1.1.1.1; etc.) +**Description:** The address to wait for | | | | -------- | -------- | | **Type** | `string` | +**Examples:** + + +"localhost:8080", "1.1.1.1" +
@@ -1251,12 +1287,17 @@ Must be one of:  
-**Description:** The HTTP status code to wait for if using http or https (e.g. 200; 404; etc.) +**Description:** The HTTP status code to wait for if using http or https | | | | -------- | --------- | | **Type** | `integer` | +**Examples:** + + +200, 404 +
@@ -1276,7 +1317,7 @@ Must be one of:  
- ## after + ## components > components items > actions > onCreate > after **Description:** Actions to run at the end of an operation @@ -1307,7 +1348,7 @@ Must be one of:  
- ## onSuccess + ## components > components items > actions > onCreate > onSuccess **Description:** Actions to run if all operations succeed @@ -1338,7 +1379,7 @@ Must be one of:  
- ## onFailure + ## components > components items > actions > onCreate > onFailure **Description:** Actions to run if all operations fail @@ -1372,7 +1413,7 @@ Must be one of:  
- ## onDeploy + ## components > components items > actions > onDeploy **Description:** Actions to run during package deployment @@ -1392,7 +1433,7 @@ Must be one of:  
- ## onRemove + ## components > components items > actions > onRemove **Description:** Actions to run during package removal @@ -1415,7 +1456,7 @@ Must be one of:  
- ## files + ## components > components items > files **Description:** Files to place on disk during package deployment @@ -1445,7 +1486,7 @@ Must be one of: ![Required](https://img.shields.io/badge/Required-red) -**Description:** Local file path or remote URL to add to the package +**Description:** Local file path or remote URL to pull into the package | | | | -------- | -------- | @@ -1461,7 +1502,7 @@ Must be one of:  
-**Description:** SHA256 checksum of the file if the source is a URL +**Description:** Optional SHA256 checksum of the file | | | | -------- | -------- | @@ -1541,7 +1582,7 @@ Must be one of:  
- ## charts + ## components > components items > charts **Description:** Helm charts to install during package deploy @@ -1728,6 +1769,11 @@ Must be one of: | -------- | -------- | | **Type** | `string` | +**Example:** + + +"charts/your-chart" +
@@ -1754,7 +1800,7 @@ Must be one of:  
-**Description:** Wait for chart resources to be ready before continuing +**Description:** Whether to not wait for chart resources to be ready before continuing | | | | -------- | --------- | @@ -1773,7 +1819,9 @@ Must be one of:  
- ## manifests + ## components > components items > manifests + +**Description:** Kubernetes manifests to be included in a generated Helm chart on package deploy | | | | -------- | ------- | @@ -1903,7 +1951,7 @@ Must be one of:  
-**Description:** Wait for manifest resources to be ready before continuing +**Description:** Whether to not wait for manifest resources to be ready before continuing | | | | -------- | --------- | @@ -1976,9 +2024,9 @@ Must be one of:  
- ## dataInjections + ## components > components items > dataInjections -**Description:** Datasets to inject into a pod in the target cluster +**Description:** Datasets to inject into a container in the target cluster | | | | -------- | ------- | @@ -2022,7 +2070,7 @@ Must be one of:  
- ## target + ## components > components items > dataInjections > dataInjections items > target ![Required](https://img.shields.io/badge/Required-red) **Description:** The target pod + container to inject the data into @@ -2069,8 +2117,7 @@ Must be one of: **Example:** -"app=data-injection" - +"app=data-injection"
@@ -2143,7 +2190,7 @@ Must be one of:  
- ## variables + ## variables **Description:** Variable template values applied on deploy for K8s resources @@ -2244,7 +2291,7 @@ Must be one of:  
- ## constants + ## constants **Description:** Constant template values applied on deploy for K8s resources diff --git a/hack/zarf-jsfh-template/section_examples.md b/hack/zarf-jsfh-template/section_examples.md index dd5f7fff07..9cbfa66d86 100644 --- a/hack/zarf-jsfh-template/section_examples.md +++ b/hack/zarf-jsfh-template/section_examples.md @@ -3,6 +3,6 @@ {% for example in examples %} {% set example_id = schema.html_id ~ "_ex" ~ loop.index %} -{{ example }} +{{ example }}{%- if not loop.last %}, {% endif -%} {% endfor %} diff --git a/hack/zarf-jsfh-template/section_properties_details.md b/hack/zarf-jsfh-template/section_properties_details.md index 9bf3ea2d95..884668a5ba 100644 --- a/hack/zarf-jsfh-template/section_properties_details.md +++ b/hack/zarf-jsfh-template/section_properties_details.md @@ -29,7 +29,12 @@
{% if sub_property.type_name == "object" or sub_property.type_name == "array" %} - ## {% with schema=sub_property %} {%- include "breadcrumbs.md" %} {% endwith %} + ## {% with schema=sub_property %} + {%- for node in schema.nodes_from_root -%} + {% if node.name_for_breadcrumbs == "root" %}{% continue %}{% endif %} + {{ node.name_for_breadcrumbs }}{%- if not loop.last %} > {% endif -%} + {%- endfor -%} + {% endwith %} {% endif %} {% with schema=sub_property, skip_headers=False %} diff --git a/src/types/component.go b/src/types/component.go index 1827e38c5c..8f0b8acb10 100644 --- a/src/types/component.go +++ b/src/types/component.go @@ -32,7 +32,7 @@ type ZarfComponent struct { Import ZarfComponentImport `json:"import,omitempty" jsonschema:"description=Import a component from another Zarf package"` // (Deprecated) DeprecatedScripts are custom commands that run before or after package deployment - DeprecatedScripts DeprecatedZarfComponentScripts `json:"scripts,omitempty" jsonschema:"description=[DEPRECATED] - (replaced by actions) Custom commands to run before or after package deployment,deprecated=true"` + DeprecatedScripts DeprecatedZarfComponentScripts `json:"scripts,omitempty" jsonschema:"description=[DEPRECATED] (replaced by actions) Custom commands to run before or after package deployment,deprecated=true"` // Replaces scripts, fine-grained control over commands to run at various stages of a package lifecycle Actions ZarfComponentActions `json:"actions,omitempty" jsonschema:"description=Custom commands to run at various stages of a package lifecycle"` @@ -44,7 +44,7 @@ type ZarfComponent struct { Charts []ZarfChart `json:"charts,omitempty" jsonschema:"description=Helm charts to install during package deploy"` // Manifests are raw manifests that get converted into zarf-generated helm charts during deploy - Manifests []ZarfManifest `json:"manifests,omitempty"` + Manifests []ZarfManifest `json:"manifests,omitempty" jsonschema:"description=Kubernetes manifests to be included in a generated Helm chart on package deploy"` // Images are the online images needed to be included in the zarf package Images []string `json:"images,omitempty" jsonschema:"description=List of OCI images to include in the package"` @@ -53,7 +53,7 @@ type ZarfComponent struct { Repos []string `json:"repos,omitempty" jsonschema:"description=List of git repos to include in the package"` // Data packages to push into a running cluster - DataInjections []ZarfDataInjection `json:"dataInjections,omitempty" jsonschema:"description=Datasets to inject into a pod in the target cluster"` + DataInjections []ZarfDataInjection `json:"dataInjections,omitempty" jsonschema:"description=Datasets to inject into a container in the target cluster"` } // ZarfComponentOnlyTarget filters a component to only show it for a given local OS and cluster. @@ -65,13 +65,13 @@ type ZarfComponentOnlyTarget struct { // ZarfComponentOnlyCluster represents the architecture and K8s cluster distribution to filter on. type ZarfComponentOnlyCluster struct { Architecture string `json:"architecture,omitempty" jsonschema:"description=Only create and deploy to clusters of the given architecture,enum=amd64,enum=arm64"` - Distros []string `json:"distros,omitempty" jsonschema:"description=A list of kubernetes distros this package works with (Reserved for future use in Zarf UI),example=k3s,example=eks"` + Distros []string `json:"distros,omitempty" jsonschema:"description=A list of kubernetes distros this package works with (Reserved for future use),example=k3s,example=eks"` } // ZarfFile defines a file to deploy. type ZarfFile struct { - Source string `json:"source" jsonschema:"description=Local file path or remote URL to add to the package"` - Shasum string `json:"shasum,omitempty" jsonschema:"description=SHA256 checksum of the file if the source is a URL"` + Source string `json:"source" jsonschema:"description=Local file path or remote URL to pull into the package"` + Shasum string `json:"shasum,omitempty" jsonschema:"description=Optional SHA256 checksum of the file"` Target string `json:"target" jsonschema:"description=The absolute or relative path where the file should be copied to during package deploy"` Executable bool `json:"executable,omitempty" jsonschema:"description=Determines if the file should be made executable during package deploy"` Symlinks []string `json:"symlinks,omitempty" jsonschema:"description=List of symlinks to create during package deploy"` @@ -85,9 +85,9 @@ type ZarfChart struct { 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"` - GitPath string `json:"gitPath,omitempty" jsonschema:"description=The path to the chart in the repo if using a git repo instead of a helm repo"` + GitPath string `json:"gitPath,omitempty" jsonschema:"description=The path to the chart in the repo if using a git repo instead of a helm repo,example=charts/your-chart"` LocalPath string `json:"localPath,omitempty" jsonschema:"oneof_required=localPath,description=The path to the chart folder"` - NoWait bool `json:"noWait,omitempty" jsonschema:"description=Wait for chart resources to be ready before continuing"` + NoWait bool `json:"noWait,omitempty" jsonschema:"description=Whether to not wait for chart resources to be ready before continuing"` } // ZarfManifest defines raw manifests Zarf will deploy as a helm chart. @@ -97,7 +97,7 @@ type ZarfManifest struct { Files []string `json:"files,omitempty" jsonschema:"description=List of individual K8s YAML files to deploy (in order)"` KustomizeAllowAnyDirectory bool `json:"kustomizeAllowAnyDirectory,omitempty" jsonschema:"description=Allow traversing directory above the current directory if needed for kustomization"` Kustomizations []string `json:"kustomizations,omitempty" jsonschema:"description=List of kustomization paths to include in the package"` - NoWait bool `json:"noWait,omitempty" jsonschema:"description=Wait for manifest resources to be ready before continuing"` + NoWait bool `json:"noWait,omitempty" jsonschema:"description=Whether to not wait for manifest resources to be ready before continuing"` } // DeprecatedZarfComponentScripts are scripts that run before or after a component is deployed @@ -156,17 +156,17 @@ type ZarfComponentActionWait struct { // ZarfComponentActionWaitCluster specifies a condition to wait for before continuing type ZarfComponentActionWaitCluster struct { - Kind string `json:"kind" jsonschema:"description=The kind of resource to wait for (e.g. Pod; Deployment; etc.)"` - Identifier string `json:"name" jsonschema:"description=The name of the resource or selector to wait for (e.g. podinfo; app=podinfo; etc.)"` + Kind string `json:"kind" jsonschema:"description=The kind of resource to wait for,example=Pod,example=Deployment)"` + Identifier string `json:"name" jsonschema:"description=The name of the resource or selector to wait for,example=podinfo,example=app=podinfo"` Namespace string `json:"namespace,omitempty" jsonschema:"description=The namespace of the resource to wait for"` - Condition string `json:"condition,omitempty" jsonschema:"description=The condition to wait for (e.g. Ready; Available; etc.). Defaults to exist, a special condition that will wait for the resource to exist."` + Condition string `json:"condition,omitempty" jsonschema:"description=The condition to wait for; defaults to exist, a special condition that will wait for the resource to exist,example=Ready,example=Available"` } // ZarfComponentActionWaitNetwork specifies a condition to wait for before continuing type ZarfComponentActionWaitNetwork struct { - Protocol string `json:"protocol" jsonschema:"description=The protocol to wait for (e.g. tcp; http; etc.).,enum=tcp,enum=http,enum=https"` - Address string `json:"address" jsonschema:"description=The address to wait for (e.g. localhost:8080; 1.1.1.1; etc.)"` - Code int `json:"code,omitempty" jsonschema:"description=The HTTP status code to wait for if using http or https (e.g. 200; 404; etc.)"` + Protocol string `json:"protocol" jsonschema:"description=The protocol to wait for,enum=tcp,enum=http,enum=https"` + Address string `json:"address" jsonschema:"description=The address to wait for,example=localhost:8080,example=1.1.1.1"` + Code int `json:"code,omitempty" jsonschema:"description=The HTTP status code to wait for if using http or https,example=200,example=404"` } // ZarfContainerTarget defines the destination info for a ZarfData target @@ -186,7 +186,7 @@ type ZarfDataInjection struct { // ZarfComponentImport structure for including imported Zarf components. type ZarfComponentImport struct { - ComponentName string `json:"name,omitempty"` + ComponentName string `json:"name,omitempty" jsonschema:"description=The name of the component to import from the referenced zarf.yaml"` // For further explanation see https://regex101.com/library/Ldx8yG and https://regex101.com/r/Ldx8yG/1 - Path string `json:"path" jsonschema:"pattern=^(?!.*###ZARF_PKG_VAR_).*$"` + Path string `json:"path" jsonschema:"description=The relative path to a directory containing a zarf.yaml to import from,pattern=^(?!.*###ZARF_PKG_VAR_).*$"` } diff --git a/src/types/package.go b/src/types/package.go index 59f20cd169..c66745c1cf 100644 --- a/src/types/package.go +++ b/src/types/package.go @@ -22,18 +22,18 @@ type ZarfMetadata struct { URL string `json:"url,omitempty" jsonschema:"description=Link to package information when online"` Image string `json:"image,omitempty" jsonschema:"description=An image URL to embed in this package (Reserved for future use in Zarf UI)"` Uncompressed bool `json:"uncompressed,omitempty" jsonschema:"description=Disable compression of this package"` - Architecture string `json:"architecture,omitempty" jsonschema:"description=The target cluster architecture of this package,example=arm64,example=amd64"` + Architecture string `json:"architecture,omitempty" jsonschema:"description=The target cluster architecture for this package,example=arm64,example=amd64"` YOLO bool `json:"yolo,omitempty" jsonschema:"description=Yaml OnLy Online (YOLO): True enables deploying a Zarf package without first running zarf init against the cluster. This is ideal for connected environments where you want to use existing VCS and container registries."` } // ZarfBuildData is written during the packager.Create() operation to track details of the created package. type ZarfBuildData struct { - Terminal string `json:"terminal"` - User string `json:"user"` - Architecture string `json:"architecture"` - Timestamp string `json:"timestamp"` - Version string `json:"version"` - Migrations []string `json:"migrations"` + Terminal string `json:"terminal" jsonschema:"description=The machine name that created this package"` + User string `json:"user" jsonschema:"description=The username who created this package"` + Architecture string `json:"architecture" jsonschema:"description=The architecture this package was created on"` + Timestamp string `json:"timestamp" jsonschema:"description=The timestamp when this package was created"` + Version string `json:"version" jsonschema:"description=The version of Zarf used to build this package"` + Migrations []string `json:"migrations" jsonschema:"description=Any migrations that have been run on this package"` } // ZarfPackageVariable are variables that can be used to dynamically template K8s resources. diff --git a/src/ui/lib/api-types.ts b/src/ui/lib/api-types.ts index 4cdfadd2c2..475e0d7e12 100644 --- a/src/ui/lib/api-types.ts +++ b/src/ui/lib/api-types.ts @@ -182,12 +182,30 @@ export interface ZarfPackage { * Zarf-generated package build data */ export interface ZarfBuildData { + /** + * The architecture this package was created on + */ architecture: string; - migrations: string[]; - terminal: string; - timestamp: string; - user: string; - version: string; + /** + * Any migrations that have been run on this package + */ + migrations: string[]; + /** + * The machine name that created this package + */ + terminal: string; + /** + * The timestamp when this package was created + */ + timestamp: string; + /** + * The username who created this package + */ + user: string; + /** + * The version of Zarf used to build this package + */ + version: string; } export interface ZarfComponent { @@ -204,7 +222,7 @@ export interface ZarfComponent { */ cosignKeyPath?: string; /** - * Datasets to inject into a pod in the target cluster + * Datasets to inject into a container in the target cluster */ dataInjections?: ZarfDataInjection[]; /** @@ -230,7 +248,10 @@ export interface ZarfComponent { /** * Import a component from another Zarf package */ - import?: ZarfComponentImport; + import?: ZarfComponentImport; + /** + * Kubernetes manifests to be included in a generated Helm chart on package deploy + */ manifests?: ZarfManifest[]; /** * The name of the component @@ -249,7 +270,7 @@ export interface ZarfComponent { */ required?: boolean; /** - * [DEPRECATED] - (replaced by actions) Custom commands to run before or after package + * [DEPRECATED] (replaced by actions) Custom commands to run before or after package * deployment */ scripts?: DeprecatedZarfComponentScripts; @@ -367,13 +388,16 @@ export interface ZarfComponentActionWait { */ export interface ZarfComponentActionWaitCluster { /** - * The condition to wait for (e.g. Ready; Available; etc.). Defaults to exist + * The condition to wait for; defaults to exist */ condition?: string; /** - * The kind of resource to wait for (e.g. Pod; Deployment; etc.) + * The kind of resource to wait for */ kind: string; + /** + * The name of the resource or selector to wait for + */ name: string; /** * The namespace of the resource to wait for @@ -387,21 +411,21 @@ export interface ZarfComponentActionWaitCluster { */ export interface ZarfComponentActionWaitNetwork { /** - * The address to wait for (e.g. localhost:8080; 1.1.1.1; etc.) + * The address to wait for */ address: string; /** - * The HTTP status code to wait for if using http or https (e.g. 200; 404; etc.) + * The HTTP status code to wait for if using http or https */ code?: number; /** - * The protocol to wait for (e.g. tcp; http; etc.). + * The protocol to wait for */ protocol: Protocol; } /** - * The protocol to wait for (e.g. tcp; http; etc.). + * The protocol to wait for */ export enum Protocol { HTTP = "http", @@ -454,7 +478,7 @@ export interface ZarfChart { */ namespace: string; /** - * Wait for chart resources to be ready before continuing + * Whether to not wait for chart resources to be ready before continuing */ noWait?: boolean; /** @@ -521,11 +545,11 @@ export interface ZarfFile { */ executable?: boolean; /** - * SHA256 checksum of the file if the source is a URL + * Optional SHA256 checksum of the file */ shasum?: string; /** - * Local file path or remote URL to add to the package + * Local file path or remote URL to pull into the package */ source: string; /** @@ -542,8 +566,14 @@ export interface ZarfFile { * Import a component from another Zarf package */ export interface ZarfComponentImport { + /** + * The name of the component to import from the referenced zarf.yaml + */ name?: string; - path: string; + /** + * The relative path to a directory containing a zarf.yaml to import from + */ + path: string; } export interface ZarfManifest { @@ -569,7 +599,7 @@ export interface ZarfManifest { */ namespace?: string; /** - * Wait for manifest resources to be ready before continuing + * Whether to not wait for manifest resources to be ready before continuing */ noWait?: boolean; } @@ -597,7 +627,7 @@ export interface ZarfComponentOnlyCluster { */ architecture?: Architecture; /** - * A list of kubernetes distros this package works with (Reserved for future use in Zarf UI) + * A list of kubernetes distros this package works with (Reserved for future use) */ distros?: string[]; } @@ -620,7 +650,7 @@ export enum LocalOS { } /** - * [DEPRECATED] - (replaced by actions) Custom commands to run before or after package + * [DEPRECATED] (replaced by actions) Custom commands to run before or after package * deployment */ export interface DeprecatedZarfComponentScripts { @@ -679,7 +709,7 @@ export enum Kind { */ export interface ZarfMetadata { /** - * The target cluster architecture of this package + * The target cluster architecture for this package */ architecture?: string; /** diff --git a/zarf.schema.json b/zarf.schema.json index 6f6f4be413..a34044e6c2 100644 --- a/zarf.schema.json +++ b/zarf.schema.json @@ -52,25 +52,31 @@ ], "properties": { "terminal": { - "type": "string" + "type": "string", + "description": "The machine name that created this package" }, "user": { - "type": "string" + "type": "string", + "description": "The username who created this package" }, "architecture": { - "type": "string" + "type": "string", + "description": "The architecture this package was created on" }, "timestamp": { - "type": "string" + "type": "string", + "description": "The timestamp when this package was created" }, "version": { - "type": "string" + "type": "string", + "description": "The version of Zarf used to build this package" }, "migrations": { "items": { "type": "string" }, - "type": "array" + "type": "array", + "description": "Any migrations that have been run on this package" } }, "additionalProperties": false, @@ -112,7 +118,10 @@ }, "gitPath": { "type": "string", - "description": "The path to the chart in the repo if using a git repo instead of a helm repo" + "description": "The path to the chart in the repo if using a git repo instead of a helm repo", + "examples": [ + "charts/your-chart" + ] }, "localPath": { "type": "string", @@ -120,7 +129,7 @@ }, "noWait": { "type": "boolean", - "description": "Wait for chart resources to be ready before continuing" + "description": "Whether to not wait for chart resources to be ready before continuing" } }, "additionalProperties": false, @@ -183,7 +192,7 @@ "scripts": { "$schema": "http://json-schema.org/draft-04/schema#", "$ref": "#/definitions/DeprecatedZarfComponentScripts", - "description": "[DEPRECATED] - (replaced by actions) Custom commands to run before or after package deployment" + "description": "[DEPRECATED] (replaced by actions) Custom commands to run before or after package deployment" }, "actions": { "$schema": "http://json-schema.org/draft-04/schema#", @@ -211,7 +220,8 @@ "$schema": "http://json-schema.org/draft-04/schema#", "$ref": "#/definitions/ZarfManifest" }, - "type": "array" + "type": "array", + "description": "Kubernetes manifests to be included in a generated Helm chart on package deploy" }, "images": { "items": { @@ -233,7 +243,7 @@ "$ref": "#/definitions/ZarfDataInjection" }, "type": "array", - "description": "Datasets to inject into a pod in the target cluster" + "description": "Datasets to inject into a container in the target cluster" } }, "additionalProperties": false, @@ -379,10 +389,19 @@ "properties": { "kind": { "type": "string", - "description": "The kind of resource to wait for (e.g. Pod; Deployment; etc.)" + "description": "The kind of resource to wait for", + "examples": [ + "Pod", + "Deployment)" + ] }, "name": { - "type": "string" + "type": "string", + "description": "The name of the resource or selector to wait for", + "examples": [ + "podinfo", + "app\u0026#61;podinfo" + ] }, "namespace": { "type": "string", @@ -390,7 +409,11 @@ }, "condition": { "type": "string", - "description": "The condition to wait for (e.g. Ready; Available; etc.). Defaults to exist" + "description": "The condition to wait for; defaults to exist", + "examples": [ + "Ready", + "Available" + ] } }, "additionalProperties": false, @@ -409,15 +432,23 @@ "https" ], "type": "string", - "description": "The protocol to wait for (e.g. tcp; http; etc.)." + "description": "The protocol to wait for" }, "address": { "type": "string", - "description": "The address to wait for (e.g. localhost:8080; 1.1.1.1; etc.)" + "description": "The address to wait for", + "examples": [ + "localhost:8080", + "1.1.1.1" + ] }, "code": { "type": "integer", - "description": "The HTTP status code to wait for if using http or https (e.g. 200; 404; etc.)" + "description": "The HTTP status code to wait for if using http or https", + "examples": [ + 200, + 404 + ] } }, "additionalProperties": false, @@ -448,11 +479,13 @@ ], "properties": { "name": { - "type": "string" + "type": "string", + "description": "The name of the component to import from the referenced zarf.yaml" }, "path": { "pattern": "^(?!.*###ZARF_PKG_VAR_).*$", - "type": "string" + "type": "string", + "description": "The relative path to a directory containing a zarf.yaml to import from" } }, "additionalProperties": false, @@ -473,7 +506,7 @@ "type": "string" }, "type": "array", - "description": "A list of kubernetes distros this package works with (Reserved for future use in Zarf UI)" + "description": "A list of kubernetes distros this package works with (Reserved for future use)" } }, "additionalProperties": false, @@ -561,11 +594,11 @@ "properties": { "source": { "type": "string", - "description": "Local file path or remote URL to add to the package" + "description": "Local file path or remote URL to pull into the package" }, "shasum": { "type": "string", - "description": "SHA256 checksum of the file if the source is a URL" + "description": "Optional SHA256 checksum of the file" }, "target": { "type": "string", @@ -619,7 +652,7 @@ }, "noWait": { "type": "boolean", - "description": "Wait for manifest resources to be ready before continuing" + "description": "Whether to not wait for manifest resources to be ready before continuing" } }, "additionalProperties": false, @@ -657,7 +690,7 @@ }, "architecture": { "type": "string", - "description": "The target cluster architecture of this package", + "description": "The target cluster architecture for this package", "examples": [ "arm64", "amd64" From 912ff553019cf8296f5548230e797f7eb466c4ea Mon Sep 17 00:00:00 2001 From: Wayne Starr Date: Fri, 24 Feb 2023 15:16:36 -0600 Subject: [PATCH 10/12] Remove *items --- docs/4-user-guide/3-zarf-schema.md | 52 +++++++++---------- .../section_properties_details.md | 2 +- 2 files changed, 27 insertions(+), 27 deletions(-) diff --git a/docs/4-user-guide/3-zarf-schema.md b/docs/4-user-guide/3-zarf-schema.md index 85ecc38d46..9157e0111b 100644 --- a/docs/4-user-guide/3-zarf-schema.md +++ b/docs/4-user-guide/3-zarf-schema.md @@ -38,7 +38,7 @@ Must be one of:  
- ## metadata + ## metadata **Description:** Package metadata @@ -197,7 +197,7 @@ Must be one of:  
- ## build + ## build **Description:** Zarf-generated package build data @@ -336,7 +336,7 @@ Must be one of:  
- ## components + ## components ![Required](https://img.shields.io/badge/Required-red) **Description:** List of components to deploy in this package @@ -435,7 +435,7 @@ Must be one of:  
- ## components > components items > only + ## components > only **Description:** Filter when this component is included in package creation or deployment @@ -475,7 +475,7 @@ Must be one of:  
- ## components > components items > only > cluster + ## components > only > cluster **Description:** Only deploy component to specified clusters @@ -579,7 +579,7 @@ Must be one of:  
- ## components > components items > import + ## components > import **Description:** Import a component from another Zarf package @@ -637,7 +637,7 @@ Must be one of:  
- ## components > components items > scripts + ## components > scripts **Description:** [DEPRECATED] (replaced by actions) Custom commands to run before or after package deployment @@ -786,7 +786,7 @@ Must be one of:  
- ## components > components items > actions + ## components > actions **Description:** Custom commands to run at various stages of a package lifecycle @@ -803,7 +803,7 @@ Must be one of:  
- ## components > components items > actions > onCreate + ## components > actions > onCreate **Description:** Actions to run during package creation @@ -820,7 +820,7 @@ Must be one of:  
- ## components > components items > actions > onCreate > defaults + ## components > actions > onCreate > defaults **Description:** Default configuration for all actions in this set @@ -931,7 +931,7 @@ Must be one of:  
- ## components > components items > actions > onCreate > before + ## components > actions > onCreate > before **Description:** Actions to run at the start of an operation @@ -1102,7 +1102,7 @@ Must be one of:  
- ## components > components items > actions > onCreate > before > before items > wait + ## components > actions > onCreate > before > wait **Description:** Wait for a condition to be met before continuing. Must specify either cmd or wait for the action. See the 'zarf tools wait-for' command for more info. @@ -1119,7 +1119,7 @@ Must be one of:  
- ## components > components items > actions > onCreate > before > before items > wait > cluster + ## components > actions > onCreate > before > wait > cluster **Description:** Wait for a condition to be met in the cluster before continuing. Only one of cluster or network can be specified. @@ -1222,7 +1222,7 @@ Must be one of:  
- ## components > components items > actions > onCreate > before > before items > wait > network + ## components > actions > onCreate > before > wait > network **Description:** Wait for a condition to be met on the network before continuing. Only one of cluster or network can be specified. @@ -1317,7 +1317,7 @@ Must be one of:  
- ## components > components items > actions > onCreate > after + ## components > actions > onCreate > after **Description:** Actions to run at the end of an operation @@ -1348,7 +1348,7 @@ Must be one of:  
- ## components > components items > actions > onCreate > onSuccess + ## components > actions > onCreate > onSuccess **Description:** Actions to run if all operations succeed @@ -1379,7 +1379,7 @@ Must be one of:  
- ## components > components items > actions > onCreate > onFailure + ## components > actions > onCreate > onFailure **Description:** Actions to run if all operations fail @@ -1413,7 +1413,7 @@ Must be one of:  
- ## components > components items > actions > onDeploy + ## components > actions > onDeploy **Description:** Actions to run during package deployment @@ -1433,7 +1433,7 @@ Must be one of:  
- ## components > components items > actions > onRemove + ## components > actions > onRemove **Description:** Actions to run during package removal @@ -1456,7 +1456,7 @@ Must be one of:  
- ## components > components items > files + ## components > files **Description:** Files to place on disk during package deployment @@ -1582,7 +1582,7 @@ Must be one of:  
- ## components > components items > charts + ## components > charts **Description:** Helm charts to install during package deploy @@ -1819,7 +1819,7 @@ Must be one of:  
- ## components > components items > manifests + ## components > manifests **Description:** Kubernetes manifests to be included in a generated Helm chart on package deploy @@ -2024,7 +2024,7 @@ Must be one of:  
- ## components > components items > dataInjections + ## components > dataInjections **Description:** Datasets to inject into a container in the target cluster @@ -2070,7 +2070,7 @@ Must be one of:  
- ## components > components items > dataInjections > dataInjections items > target + ## components > dataInjections > target ![Required](https://img.shields.io/badge/Required-red) **Description:** The target pod + container to inject the data into @@ -2190,7 +2190,7 @@ Must be one of:  
- ## variables + ## variables **Description:** Variable template values applied on deploy for K8s resources @@ -2291,7 +2291,7 @@ Must be one of:  
- ## constants + ## constants **Description:** Constant template values applied on deploy for K8s resources diff --git a/hack/zarf-jsfh-template/section_properties_details.md b/hack/zarf-jsfh-template/section_properties_details.md index 884668a5ba..eb9fc3c902 100644 --- a/hack/zarf-jsfh-template/section_properties_details.md +++ b/hack/zarf-jsfh-template/section_properties_details.md @@ -31,7 +31,7 @@ {% if sub_property.type_name == "object" or sub_property.type_name == "array" %} ## {% with schema=sub_property %} {%- for node in schema.nodes_from_root -%} - {% if node.name_for_breadcrumbs == "root" %}{% continue %}{% endif %} + {%- if node.name_for_breadcrumbs == "root" or node.name_for_breadcrumbs.endswith(" items") -%}{% continue %}{%- endif -%} {{ node.name_for_breadcrumbs }}{%- if not loop.last %} > {% endif -%} {%- endfor -%} {% endwith %} From a09f3c66fc43e31fe7d630d67b1951b03c7327ab Mon Sep 17 00:00:00 2001 From: Wayne Starr Date: Sat, 25 Feb 2023 19:04:38 -0600 Subject: [PATCH 11/12] Fixup CODEOWNERS --- CODEOWNERS | 15 ++++++++------- {hack => docs/.templates}/jsfh-config.json | 2 +- .../.templates/jsonschemaforhumans}/base.md | 0 .../jsonschemaforhumans}/breadcrumbs.md | 0 .../.templates/jsonschemaforhumans}/content.md | 0 .../jsonschemaforhumans}/section_array.md | 0 .../section_conditional_subschema.md | 0 .../jsonschemaforhumans}/section_description.md | 0 .../jsonschemaforhumans}/section_examples.md | 0 .../jsonschemaforhumans}/section_not.md | 0 .../jsonschemaforhumans}/section_one_of.md | 0 .../section_properties_details.md | 0 .../section_undocumented_required_properties.md | 0 .../jsonschemaforhumans}/tabbed_section.md | 0 hack/create-zarf-schema.sh | 2 +- 15 files changed, 10 insertions(+), 9 deletions(-) rename {hack => docs/.templates}/jsfh-config.json (69%) rename {hack/zarf-jsfh-template => docs/.templates/jsonschemaforhumans}/base.md (100%) rename {hack/zarf-jsfh-template => docs/.templates/jsonschemaforhumans}/breadcrumbs.md (100%) rename {hack/zarf-jsfh-template => docs/.templates/jsonschemaforhumans}/content.md (100%) rename {hack/zarf-jsfh-template => docs/.templates/jsonschemaforhumans}/section_array.md (100%) rename {hack/zarf-jsfh-template => docs/.templates/jsonschemaforhumans}/section_conditional_subschema.md (100%) rename {hack/zarf-jsfh-template => docs/.templates/jsonschemaforhumans}/section_description.md (100%) rename {hack/zarf-jsfh-template => docs/.templates/jsonschemaforhumans}/section_examples.md (100%) rename {hack/zarf-jsfh-template => docs/.templates/jsonschemaforhumans}/section_not.md (100%) rename {hack/zarf-jsfh-template => docs/.templates/jsonschemaforhumans}/section_one_of.md (100%) rename {hack/zarf-jsfh-template => docs/.templates/jsonschemaforhumans}/section_properties_details.md (100%) rename {hack/zarf-jsfh-template => docs/.templates/jsonschemaforhumans}/section_undocumented_required_properties.md (100%) rename {hack/zarf-jsfh-template => docs/.templates/jsonschemaforhumans}/tabbed_section.md (100%) diff --git a/CODEOWNERS b/CODEOWNERS index 69bab7b96c..3f9e376caa 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -16,13 +16,14 @@ main.go @jeff-mccoy @YrrepNoj @Racer159 /zarf.yaml @jeff-mccoy @YrrepNoj @Racer159 # Web UI-specific -/package*.json @mike-winberry @Racer159 @Noxsios @jeff-mccoy @YrrepNoj -/src/internal/api @mike-winberry @Racer159 @Noxsios @jeff-mccoy @YrrepNoj -/src/ui/ @mike-winberry @Racer159 @Noxsios @jeff-mccoy @YrrepNoj -/playwright.config.ts @mike-winberry @Racer159 @Noxsios @jeff-mccoy @YrrepNoj -/svelte.config.js @mike-winberry @Racer159 @Noxsios @jeff-mccoy @YrrepNoj -/tsconfig.json @mike-winberry @Racer159 @Noxsios @jeff-mccoy @YrrepNoj -/vite.config.ts @mike-winberry @Racer159 @Noxsios @jeff-mccoy @YrrepNoj +/package*.json @mike-winberry @Racer159 @Noxsios @jeff-mccoy @YrrepNoj +/src/internal/api @mike-winberry @Racer159 @Noxsios @jeff-mccoy @YrrepNoj +/src/ui/ @mike-winberry @Racer159 @Noxsios @jeff-mccoy @YrrepNoj +/playwright.config.ts @mike-winberry @Racer159 @Noxsios @jeff-mccoy @YrrepNoj +/svelte.config.js @mike-winberry @Racer159 @Noxsios @jeff-mccoy @YrrepNoj +/tsconfig.json @mike-winberry @Racer159 @Noxsios @jeff-mccoy @YrrepNoj +/vite.config.ts @mike-winberry @Racer159 @Noxsios @jeff-mccoy @YrrepNoj +/docs-website/ @mike-winberry @Racer159 @Noxsios @jeff-mccoy @YrrepNoj # Privileged pipeline files /.github/ @jeff-mccoy @YrrepNoj @Racer159 diff --git a/hack/jsfh-config.json b/docs/.templates/jsfh-config.json similarity index 69% rename from hack/jsfh-config.json rename to docs/.templates/jsfh-config.json index 8cc0a099db..4f949f5c15 100644 --- a/hack/jsfh-config.json +++ b/docs/.templates/jsfh-config.json @@ -1,5 +1,5 @@ { - "custom_template_path": "hack/zarf-jsfh-template/base.md", + "custom_template_path": "docs/.templates/jsonschemaforhumans/base.md", "template_md_options": { "badge_as_image": true, "show_heading_numbers": false }, "show_toc": false, "show_breadcrumbs": false, diff --git a/hack/zarf-jsfh-template/base.md b/docs/.templates/jsonschemaforhumans/base.md similarity index 100% rename from hack/zarf-jsfh-template/base.md rename to docs/.templates/jsonschemaforhumans/base.md diff --git a/hack/zarf-jsfh-template/breadcrumbs.md b/docs/.templates/jsonschemaforhumans/breadcrumbs.md similarity index 100% rename from hack/zarf-jsfh-template/breadcrumbs.md rename to docs/.templates/jsonschemaforhumans/breadcrumbs.md diff --git a/hack/zarf-jsfh-template/content.md b/docs/.templates/jsonschemaforhumans/content.md similarity index 100% rename from hack/zarf-jsfh-template/content.md rename to docs/.templates/jsonschemaforhumans/content.md diff --git a/hack/zarf-jsfh-template/section_array.md b/docs/.templates/jsonschemaforhumans/section_array.md similarity index 100% rename from hack/zarf-jsfh-template/section_array.md rename to docs/.templates/jsonschemaforhumans/section_array.md diff --git a/hack/zarf-jsfh-template/section_conditional_subschema.md b/docs/.templates/jsonschemaforhumans/section_conditional_subschema.md similarity index 100% rename from hack/zarf-jsfh-template/section_conditional_subschema.md rename to docs/.templates/jsonschemaforhumans/section_conditional_subschema.md diff --git a/hack/zarf-jsfh-template/section_description.md b/docs/.templates/jsonschemaforhumans/section_description.md similarity index 100% rename from hack/zarf-jsfh-template/section_description.md rename to docs/.templates/jsonschemaforhumans/section_description.md diff --git a/hack/zarf-jsfh-template/section_examples.md b/docs/.templates/jsonschemaforhumans/section_examples.md similarity index 100% rename from hack/zarf-jsfh-template/section_examples.md rename to docs/.templates/jsonschemaforhumans/section_examples.md diff --git a/hack/zarf-jsfh-template/section_not.md b/docs/.templates/jsonschemaforhumans/section_not.md similarity index 100% rename from hack/zarf-jsfh-template/section_not.md rename to docs/.templates/jsonschemaforhumans/section_not.md diff --git a/hack/zarf-jsfh-template/section_one_of.md b/docs/.templates/jsonschemaforhumans/section_one_of.md similarity index 100% rename from hack/zarf-jsfh-template/section_one_of.md rename to docs/.templates/jsonschemaforhumans/section_one_of.md diff --git a/hack/zarf-jsfh-template/section_properties_details.md b/docs/.templates/jsonschemaforhumans/section_properties_details.md similarity index 100% rename from hack/zarf-jsfh-template/section_properties_details.md rename to docs/.templates/jsonschemaforhumans/section_properties_details.md diff --git a/hack/zarf-jsfh-template/section_undocumented_required_properties.md b/docs/.templates/jsonschemaforhumans/section_undocumented_required_properties.md similarity index 100% rename from hack/zarf-jsfh-template/section_undocumented_required_properties.md rename to docs/.templates/jsonschemaforhumans/section_undocumented_required_properties.md diff --git a/hack/zarf-jsfh-template/tabbed_section.md b/docs/.templates/jsonschemaforhumans/tabbed_section.md similarity index 100% rename from hack/zarf-jsfh-template/tabbed_section.md rename to docs/.templates/jsonschemaforhumans/tabbed_section.md diff --git a/hack/create-zarf-schema.sh b/hack/create-zarf-schema.sh index 991a130e9c..fc274f2cc9 100755 --- a/hack/create-zarf-schema.sh +++ b/hack/create-zarf-schema.sh @@ -7,4 +7,4 @@ go run main.go internal config-schema > zarf.schema.json go run main.go internal api-schema | npx quicktype -s schema -o src/ui/lib/api-types.ts # Create docs from the zarf.yaml JSON schema -docker run -v $(pwd):/app -w /app --rm python:3.8-alpine /bin/sh -c "pip install json-schema-for-humans && generate-schema-doc --config-file hack/jsfh-config.json zarf.schema.json docs/4-user-guide/3-zarf-schema.md" +docker run -v $(pwd):/app -w /app --rm python:3.8-alpine /bin/sh -c "pip install json-schema-for-humans && generate-schema-doc --config-file docs/.templates/jsfh-config.json zarf.schema.json docs/4-user-guide/3-zarf-schema.md" From ee0f4e895b86850187cb005c7bc7d1ddb1cd06b2 Mon Sep 17 00:00:00 2001 From: Wayne Starr Date: Sat, 25 Feb 2023 19:05:30 -0600 Subject: [PATCH 12/12] Fixup CODEOWNERS --- CODEOWNERS | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/CODEOWNERS b/CODEOWNERS index 3f9e376caa..1fb99796d4 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -6,7 +6,7 @@ /examples/ @JasonvanBrackel @RothAndrew @jeff-mccoy @YrrepNoj @Racer159 *.md @Madeline-UX @JasonvanBrackel @RothAndrew @jeff-mccoy @YrrepNoj @Racer159 -# Core code +# Core code /src/ @jeff-mccoy @YrrepNoj @Racer159 /go.* @jeff-mccoy @YrrepNoj @Racer159 main.go @jeff-mccoy @YrrepNoj @Racer159 @@ -15,7 +15,7 @@ main.go @jeff-mccoy @YrrepNoj @Racer159 /packages/ @jeff-mccoy @YrrepNoj @Racer159 /zarf.yaml @jeff-mccoy @YrrepNoj @Racer159 -# Web UI-specific +# Web UI-specific /package*.json @mike-winberry @Racer159 @Noxsios @jeff-mccoy @YrrepNoj /src/internal/api @mike-winberry @Racer159 @Noxsios @jeff-mccoy @YrrepNoj /src/ui/ @mike-winberry @Racer159 @Noxsios @jeff-mccoy @YrrepNoj @@ -23,7 +23,7 @@ main.go @jeff-mccoy @YrrepNoj @Racer159 /svelte.config.js @mike-winberry @Racer159 @Noxsios @jeff-mccoy @YrrepNoj /tsconfig.json @mike-winberry @Racer159 @Noxsios @jeff-mccoy @YrrepNoj /vite.config.ts @mike-winberry @Racer159 @Noxsios @jeff-mccoy @YrrepNoj -/docs-website/ @mike-winberry @Racer159 @Noxsios @jeff-mccoy @YrrepNoj +/docs-website/ @mike-winberry @Racer159 @Noxsios @jeff-mccoy @YrrepNoj # Privileged pipeline files /.github/ @jeff-mccoy @YrrepNoj @Racer159 @@ -38,5 +38,5 @@ main.go @jeff-mccoy @YrrepNoj @Racer159 # Additional privileged files /CODEOWNERS @jeff-mccoy @runyontr -/cosign.pub @jeff-mccoy @runyontr -/LICENSE @jeff-mccoy @runyontr +/cosign.pub @jeff-mccoy @runyontr +/LICENSE @jeff-mccoy @runyontr