Skip to content

Commit

Permalink
fix(docs): tweaks to config file reference docs
Browse files Browse the repository at this point in the history
  • Loading branch information
thsig authored and eysi09 committed Nov 1, 2018
1 parent d04e97b commit de5e4a5
Show file tree
Hide file tree
Showing 8 changed files with 81 additions and 82 deletions.
8 changes: 4 additions & 4 deletions docs/reference/command-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ Examples:

Call a service ingress endpoint.

This command resolves the deployed ingress endpoint for the given service and path, calls the given endpoint and
Resolves the deployed ingress endpoint for the given service and path, calls the given endpoint and
outputs the result.

Examples:
Expand All @@ -79,7 +79,7 @@ Note: Currently only supports simple GET requests for HTTP/HTTPS ingresses.

Creates a new Garden project.

This command walks the user through setting up a new Garden project and
Walks the user through setting up a new Garden project and
generates scaffolding based on user input.

Examples:
Expand Down Expand Up @@ -656,7 +656,7 @@ Examples:

Update remote sources.

This command updates the remote sources declared in the project level `garden.yml` config file.
Updates the remote sources declared in the project level `garden.yml` config file.

Examples:

Expand All @@ -677,7 +677,7 @@ Examples:

Update remote modules.

This command updates remote modules, i.e. modules that have a `repositoryUrl` field
Updates remote modules, i.e. modules that have a `repositoryUrl` field
in their `garden.yml` config that points to a remote repository.

Examples:
Expand Down
100 changes: 49 additions & 51 deletions docs/reference/config-files-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@ module:

description:

# A remote respository URL. Currently only supports git servers. Must contain a hash part
# A remote repository URL. Currently only supports git servers. Must contain a hash suffix
# pointing to a specific branch or tag, with the format: <git remote url>#<branch|tag>
#
# Garden will import the repository source code into this module, but read the config from
# the local garden.yml file
# Garden will import the repository source code into this module, but read the module's
# config from the local garden.yml file.
#
# Example: "git+https://github.com/org/repo.git#v2.0"
#
Expand All @@ -55,16 +55,16 @@ module:
variables:
{}

# Set to false to disable pushing this module to remote registries.
# When false, disables pushing this module to remote registries.
#
# Optional.
allowPublish: true

# Specify how to build the module. Note that plugins may specify additional keys on this object.
# Specify how to build the module. Note that plugins may define additional keys on this object.
#
# Optional.
build:
# The command to run inside the module directory to perform the build.
# The command to run inside the module's directory to perform the build.
#
# Example:
# - npm
Expand All @@ -82,7 +82,7 @@ module:
#
# Optional.
dependencies:
- # Module name to build ahead of this module
- # Module name to build ahead of this module.
#
# Required.
name:
Expand All @@ -103,7 +103,7 @@ module:
# Optional.
target:

# The configuration for a Garden project. This should be specified in the garden.yml file in your
# Configuration for a Garden project. This should be specified in the garden.yml file in your
# project root.
#
# Optional.
Expand All @@ -120,8 +120,8 @@ project:
# Optional.
defaultEnvironment:

# Default environment settings, that are inherited (but can be overridden) by each configured
# environment
# Default environment settings. These are inherited (but can be overridden) by each configured
# environment.
#
# Example:
# providers: []
Expand All @@ -134,7 +134,7 @@ project:
#
# Optional.
providers:
- # The name of the provider plugin to configure.
- # The name of the provider plugin to use.
#
# Example: "local-kubernetes"
#
Expand Down Expand Up @@ -162,7 +162,7 @@ project:
#
# Optional.
providers:
- # The name of the provider plugin to configure.
- # The name of the provider plugin to use.
#
# Example: "local-kubernetes"
#
Expand All @@ -176,13 +176,13 @@ project:
{}

# Valid RFC1035/RFC1123 (DNS) label (may contain lowercase letters, numbers and dashes, must
# start with a letter,and cannot end with a dash) and additionally cannot contain
# consecutive dashes or be longer than 63 characters.
# start with a letter, and cannot end with a dash) and additionally cannot contain
# consecutive dashes, or be longer than 63 characters.
#
# Required.
name:

# A list of remote sources to import into project
# A list of remote sources to import into project.
#
# Optional.
sources:
Expand All @@ -191,7 +191,7 @@ project:
# Required.
name:

# A remote respository URL. Currently only supports git servers. Must contain a hash part
# A remote repository URL. Currently only supports git servers. Must contain a hash suffix
# pointing to a specific branch or tag, with the format: <git remote url>#<branch|tag>
#
# Example: "git+https://github.com/org/repo.git#v2.0"
Expand Down Expand Up @@ -226,11 +226,11 @@ module:

description:

# A remote respository URL. Currently only supports git servers. Must contain a hash part
# A remote repository URL. Currently only supports git servers. Must contain a hash suffix
# pointing to a specific branch or tag, with the format: <git remote url>#<branch|tag>
#
# Garden will import the repository source code into this module, but read the config from
# the local garden.yml file
# Garden will import the repository source code into this module, but read the module's
# config from the local garden.yml file.
#
# Example: "git+https://github.com/org/repo.git#v2.0"
#
Expand All @@ -246,16 +246,16 @@ module:
variables:
{}

# Set to false to disable pushing this module to remote registries.
# When false, disables pushing this module to remote registries.
#
# Optional.
allowPublish: true

# Specify how to build the module. Note that plugins may specify additional keys on this object.
# Specify how to build the module. Note that plugins may define additional keys on this object.
#
# Optional.
build:
# The command to run inside the module directory to perform the build.
# The command to run inside the module's directory to perform the build.
#
# Example:
# - npm
Expand All @@ -273,7 +273,7 @@ module:
#
# Optional.
dependencies:
- # Module name to build ahead of this module
- # Module name to build ahead of this module.
#
# Required.
name:
Expand Down Expand Up @@ -313,7 +313,7 @@ module:
# Required.
name:

# The names of services that must be running before the test is run.
# Names of the services that must be running before the test is run.
#
# Optional.
dependencies:
Expand Down Expand Up @@ -362,11 +362,11 @@ module:

description:

# A remote respository URL. Currently only supports git servers. Must contain a hash part
# A remote repository URL. Currently only supports git servers. Must contain a hash suffix
# pointing to a specific branch or tag, with the format: <git remote url>#<branch|tag>
#
# Garden will import the repository source code into this module, but read the config from
# the local garden.yml file
# Garden will import the repository source code into this module, but read the module's
# config from the local garden.yml file.
#
# Example: "git+https://github.com/org/repo.git#v2.0"
#
Expand All @@ -382,16 +382,16 @@ module:
variables:
{}

# Set to false to disable pushing this module to remote registries.
# When false, disables pushing this module to remote registries.
#
# Optional.
allowPublish: true

# Specify how to build the module. Note that plugins may specify additional keys on this object.
# Specify how to build the module. Note that plugins may define additional keys on this object.
#
# Optional.
build:
# The command to run inside the module directory to perform the build.
# The command to run inside the module's directory to perform the build.
#
# Example:
# - npm
Expand All @@ -409,7 +409,7 @@ module:
#
# Optional.
dependencies:
- # Module name to build ahead of this module
- # Module name to build ahead of this module.
#
# Required.
name:
Expand All @@ -430,16 +430,16 @@ module:
# Optional.
target:

# Specify build arguments when building the container image.
# Specify build arguments to use when building the container image.
#
# Optional.
buildArgs:
{}

# Specify the image name for the container. Should be a valid docker image identifier. If
# specified and the module does not contain a Dockerfile, this image will be used to deploy the
# container services. If specified and the module does contain a Dockerfile, this identifier is
# used when pushing the built image.
# Specify the image name for the container. Should be a valid Docker image identifier. If
# specified and the module does not contain a Dockerfile, this image will be used to deploy
# services for this module. If specified and the module does contain a Dockerfile, this
# identifier is used when pushing the built image.
#
# Optional.
image:
Expand All @@ -449,16 +449,16 @@ module:
# Optional.
dockerfile:

# List of services to deploy from this container module.
# The list of services to deploy from this container module.
#
# Optional.
services:
# The required attributes of a service. This is generally further defined by plugins.
#
# Optional.
- # Valid RFC1035/RFC1123 (DNS) label (may contain lowercase letters, numbers and dashes, must
# start with a letter,and cannot end with a dash) and additionally cannot contain
# consecutive dashes or be longer than 63 characters.
# start with a letter, and cannot end with a dash) and additionally cannot contain
# consecutive dashes, or be longer than 63 characters.
#
# Required.
name:
Expand All @@ -468,13 +468,13 @@ module:
# Optional.
dependencies:
# Valid RFC1035/RFC1123 (DNS) label (may contain lowercase letters, numbers and dashes,
# must start with a letter,and cannot end with a dash) and additionally cannot contain
# consecutive dashes or be longer than 63 characters.
# must start with a letter, and cannot end with a dash) and additionally cannot contain
# consecutive dashes, or be longer than 63 characters.
#
# Optional.
-

# Key/value map, keys must be valid identifiers.
# Key/value map. Keys must be valid identifiers.
#
# Optional.
outputs:
Expand All @@ -500,8 +500,7 @@ module:
# Optional.
ingresses:
- # The hostname that should route to this service. Defaults to the default hostname
# configured
# in the provider configuration.
# configured in the provider configuration.
#
# Note that if you're developing locally you may need to add this hostname to your hosts
# file.
Expand Down Expand Up @@ -530,7 +529,7 @@ module:
#
# Optional.
healthCheck:
# Set this to check the service's health by making an HTTP request
# Set this to check the service's health by making an HTTP request.
#
# Optional.
httpGet:
Expand Down Expand Up @@ -559,8 +558,7 @@ module:
tcpPort:

# If this module uses the `hotReload` field, the container will be run with these arguments
# instead of those in `command` while a Garden command with the -w (watch) flag, or `garden
# dev`, is running.
# instead of those in `command` when the service is deployed with hot reloading enabled.
#
# Optional.
hotReloadCommand:
Expand All @@ -573,7 +571,7 @@ module:
#
# Required.
- # The name of the port (used when referencing the port elsewhere in the service
# configuration.
# configuration).
#
# Required.
name:
Expand Down Expand Up @@ -624,7 +622,7 @@ module:
# Required.
name:

# The names of services that must be running before the test is run.
# Names of the services that must be running before the test is run.
#
# Optional.
dependencies:
Expand All @@ -651,8 +649,8 @@ module:
# When this field is used, the files or directories specified within are automatically synced
# into the running container when they're modified. Additionally, any of this module's services
# that define a `hotReloadCommand` will be run with that command instead of the one specified in
# their `command` field. This behavior is only active while a Garden command with the -w (watch)
# flag, or `garden dev`, is running.
# their `command` field. Services are only deployed with hot reloading enabled when their names
# are passed to the `--hot-reload` option in a call to the `deploy` or `dev` command.
#
# Optional.
hotReload:
Expand Down
10 changes: 5 additions & 5 deletions garden-service/src/config/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ export const joiIdentifier = () => Joi.string()
.regex(identifierRegex)
.max(63)
.description(
"Valid RFC1035/RFC1123 (DNS) label (may contain lowercase letters, numbers and dashes, must start with a letter," +
"and cannot end with a dash) and additionally cannot contain consecutive dashes or be longer than 63 characters.",
"Valid RFC1035/RFC1123 (DNS) label (may contain lowercase letters, numbers and dashes, must start with a letter, " +
"and cannot end with a dash) and additionally cannot contain consecutive dashes, or be longer than 63 characters.",
)

export const joiStringMap = (valueSchema: JoiObject) => Joi
Expand All @@ -56,13 +56,13 @@ export const joiUserIdentifier = () => Joi.string()
export const joiIdentifierMap = (valueSchema: JoiObject) => Joi
.object().pattern(identifierRegex, valueSchema)
.default(() => ({}), "{}")
.description("Key/value map, keys must be valid identifiers.")
.description("Key/value map. Keys must be valid identifiers.")

export const joiVariables = () => Joi
.object().pattern(/[\w\d]+/i, joiPrimitive())
.default(() => ({}), "{}")
.unknown(false)
.description("Key/value map, keys may contain letters and numbers, and values must be primitives.")
.description("Key/value map. Keys may contain letters and numbers, and values must be primitives.")

export const joiEnvVarName = () => Joi
.string().regex(envVarRegex)
Expand Down Expand Up @@ -96,7 +96,7 @@ export const joiRepositoryUrl = () => Joi
],
})
.description(
"A remote respository URL. Currently only supports git servers. Must contain a hash part" +
"A remote repository URL. Currently only supports git servers. Must contain a hash suffix" +
" pointing to a specific branch or tag, with the format: <git remote url>#<branch|tag>",
)
.example("git+https://github.com/org/repo.git#v2.0")
Expand Down
Loading

0 comments on commit de5e4a5

Please sign in to comment.