Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
185 changes: 104 additions & 81 deletions examples/values-templating/values/values.schema.json
Original file line number Diff line number Diff line change
@@ -1,115 +1,138 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"description": "Schema for values-templating example package values",
"properties": {
"site": {
"type": "object",
"description": "Site configuration and metadata",
"properties": {
"name": {
"type": "string",
"minLength": 1,
"description": "The name of the site you are deploying"
},
"styles": {
"type": "string",
"description": "CSS styles for the site"
},
"organization": {
"type": "string",
"description": "The organization providing the site"
},
"footer": {
"type": "string",
"description": "Custom footer text"
},
"title": {
"type": "string",
"description": "Site title"
},
"message": {
"type": "string",
"description": "Welcome message"
}
},
"required": ["name", "organization"]
},
"app": {
"type": "object",
"description": "Application deployment configuration",
"properties": {
"environment": {
"type": "string",
"enum": ["development", "staging", "production"],
"description": "Deployment environment"
},
"replicas": {
"type": "integer",
"minimum": 1,
"maximum": 10,
"description": "Number of application replicas"
},
"config_data": {
"type": "string",
"description": "Application configuration data"
"description": "Application configuration data",
"type": "string"
},
"optional_setting": {
"type": "string",
"description": "Optional configuration setting"
},
"required_setting": {
"type": "string",
"minLength": 1,
"description": "Required configuration setting"
"environment": {
"description": "Deployment environment",
"enum": [
"development",
"staging",
"production"
],
"type": "string"
},
"features": {
"type": "array",
"description": "List of enabled features",
"items": {
"type": "string"
},
"description": "List of enabled features"
"type": "array"
},
"image": {
"properties": {
"tag": {
"description": "Image tag version",
"pattern": "^v?[0-9]+\\.[0-9]+\\.[0-9]+$",
"type": "string"
}
},
"type": "object"
},
"name": {
"description": "Application name for Helm overrides",
"type": "string"
},
"optional_setting": {
"description": "Optional configuration setting",
"type": "string"
},
"port1": {
"type": "number"
},
"port2": {
"type": "number"
},
"port3": {
"type": "number"
},
"ports": {
"type": "array",
"description": "Network ports",
"items": {
"type": "integer",
"maximum": 65535,
"minimum": 1,
"maximum": 65535
"type": "number"
},
"description": "Network ports"
"type": "array"
},
"name": {
"type": "string",
"description": "Application name for Helm overrides"
"replicas": {
"description": "Number of application replicas",
"maximum": 10,
"minimum": 1,
"type": "number"
},
"image": {
"type": "object",
"properties": {
"tag": {
"type": "string",
"pattern": "^v?[0-9]+\\.[0-9]+\\.[0-9]+$",
"description": "Image tag version"
}
}
"required_setting": {
"description": "Required configuration setting",
"minLength": 1,
"type": "string"
}
},
"required": ["environment", "replicas", "required_setting"]
"required": [
"environment",
"replicas",
"required_setting"
],
"type": "object"
},
"database": {
"type": "object",
"description": "Database configuration",
"properties": {
"host": {
"type": "string",
"description": "Database host"
"description": "Database host",
"type": "string"
},
"host2": {
"type": "string",
"description": "Alternate database host"
"description": "Alternate database host",
"type": "string"
}
},
"type": "object"
},
"site": {
"description": "Site configuration and metadata",
"properties": {
"footer": {
"description": "Custom footer text",
"type": "string"
},
"message": {
"description": "Welcome message",
"type": "string"
},
"name": {
"description": "The name of the site you are deploying",
"minLength": 1,
"type": "string"
},
"organization": {
"description": "The organization providing the site",
"type": "string"
},
"styles": {
"description": "CSS styles for the site",
"type": "string"
},
"title": {
"description": "Site title",
"type": "string"
}
}
},
"required": [
"name",
"organization"
],
"type": "object"
}
},
"required": ["site", "app"]
"required": [
"site",
"app"
],
"type": "object"
}
1 change: 1 addition & 0 deletions site/src/content/docs/commands/zarf_dev.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ Commands useful for developing packages
* [zarf dev find-images](/commands/zarf_dev_find-images/) - Evaluates components in a Zarf file to identify images specified in their helm charts and manifests.
* [zarf dev generate](/commands/zarf_dev_generate/) - Creates a zarf.yaml automatically from a given remote (git) Helm chart
* [zarf dev generate-config](/commands/zarf_dev_generate-config/) - Generates a config file for Zarf
* [zarf dev generate-schema](/commands/zarf_dev_generate-schema/) - Generates a JSON schema for Zarf values based on the package definition and chart defaults
* [zarf dev inspect](/commands/zarf_dev_inspect/) - Commands to gather information about a Zarf package using its package definition
* [zarf dev lint](/commands/zarf_dev_lint/) - Lints the given package for valid schema and recommended practices
* [zarf dev patch-git](/commands/zarf_dev_patch-git/) - Converts all .git URLs to the specified Zarf HOST and with the Zarf URL pattern in a given FILE. NOTE:
Expand Down
42 changes: 42 additions & 0 deletions site/src/content/docs/commands/zarf_dev_generate-schema.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
---
title: zarf dev generate-schema
description: Zarf CLI command reference for <code>zarf dev generate-schema</code>.
tableOfContents: false
---

<!-- Page generated by Zarf; DO NOT EDIT -->

## zarf dev generate-schema

Generates a JSON schema for Zarf values based on the package definition and chart defaults

```
zarf dev generate-schema [ DIRECTORY ] [flags]
```

### Options

```
-f, --flavor string The flavor of components to include in the resulting package (i.e. have a matching or empty "only.flavor" key)
-h, --help help for generate-schema
--set stringToString Specify package templates to set on the command line (KEY=value) (default [])
```

### Options inherited from parent commands

```
-a, --architecture string Architecture for OCI images and Zarf packages
--features stringToString Provide a comma-separated list of feature names to bools to enable or disable. Ex. --features "foo=true,bar=false,baz=true" (default [])
--insecure-skip-tls-verify Skip checking server's certificate for validity. This flag should only be used if you have a specific reason and accept the reduced security posture.
--log-format string Select a logging format. Defaults to 'console'. Valid options are: 'console', 'json', 'dev'. (default "console")
-l, --log-level string Log level when running Zarf. Valid options are: warn, info, debug, trace (default "info")
--no-color Disable terminal color codes in logging and stdout prints.
--plain-http Force the connections over HTTP instead of HTTPS. This flag should only be used if you have a specific reason and accept the reduced security posture.
--tmpdir string Specify the temporary directory to use for intermediate files
--zarf-cache string Specify the location of the Zarf cache directory (default "~/.zarf-cache")
```

### SEE ALSO

* [zarf dev](/commands/zarf_dev/) - Commands useful for developing packages

Loading
Loading