From d90b362b93b904e4cb059675dbfde8a54940b885 Mon Sep 17 00:00:00 2001 From: Jessica Yuen <im.jessicayuen@gmail.com> Date: Thu, 16 Nov 2017 16:21:36 -0800 Subject: [PATCH] First pass at CLI documentation formatting fixes --- cmd/apply.go | 32 ++-- cmd/delete.go | 24 +-- cmd/diff.go | 58 +++---- cmd/env.go | 147 +++++++++-------- cmd/init.go | 56 +++---- cmd/param.go | 47 +++--- cmd/pkg.go | 20 +-- cmd/prototype.go | 168 ++++++++++---------- cmd/registry.go | 4 +- cmd/update.go | 24 +-- cmd/validate.go | 24 +-- docs/cli-reference/ks_apply.md | 32 ++-- docs/cli-reference/ks_delete.md | 24 +-- docs/cli-reference/ks_diff.md | 58 +++---- docs/cli-reference/ks_env.md | 38 ++--- docs/cli-reference/ks_env_add.md | 69 ++++---- docs/cli-reference/ks_env_rm.md | 14 +- docs/cli-reference/ks_env_set.md | 20 +-- docs/cli-reference/ks_generate.md | 16 +- docs/cli-reference/ks_init.md | 56 +++---- docs/cli-reference/ks_param.md | 3 +- docs/cli-reference/ks_param_diff.md | 10 +- docs/cli-reference/ks_param_list.md | 18 +-- docs/cli-reference/ks_param_set.md | 16 +- docs/cli-reference/ks_pkg_describe.md | 2 +- docs/cli-reference/ks_pkg_install.md | 18 +-- docs/cli-reference/ks_prototype.md | 56 +++---- docs/cli-reference/ks_prototype_describe.md | 28 ++-- docs/cli-reference/ks_prototype_preview.md | 28 ++-- docs/cli-reference/ks_prototype_search.md | 6 +- docs/cli-reference/ks_prototype_use.md | 46 +++--- docs/cli-reference/ks_registry.md | 2 +- docs/cli-reference/ks_registry_describe.md | 2 +- docs/cli-reference/ks_registry_list.md | 4 +- docs/cli-reference/ks_validate.md | 24 +-- 35 files changed, 593 insertions(+), 601 deletions(-) diff --git a/cmd/apply.go b/cmd/apply.go index 6dcc85df..c35e17c0 100644 --- a/cmd/apply.go +++ b/cmd/apply.go @@ -121,28 +121,28 @@ var applyCmd = &cobra.Command{ return c.Run(objs, wd) }, Long: `Update (or optionally create) Kubernetes resources on the cluster using the -local configuration. Use the '--create' flag to control whether we create them +local configuration. Use the` + " `--create` " + `flag to control whether we create them if they do not exist (default: true). ksonnet applications are accepted, as well as normal JSON, YAML, and Jsonnet files.`, - Example: ` # Create or update all resources described in a ksonnet application, and - # running in the 'dev' environment. Can be used in any subdirectory of the - # application. - ks apply dev + Example: `# Create or update all resources described in a ksonnet application, and +# running in the 'dev' environment. Can be used in any subdirectory of the +# application. +ks apply dev - # Create or update resources described in a YAML file. Automatically picks up - # the cluster's location from '$KUBECONFIG'. - ks appy -f ./pod.yaml +# Create or update resources described in a YAML file. Automatically picks up +# the cluster's location from '$KUBECONFIG'. +ks appy -f ./pod.yaml - # Create or update resources described in the JSON file. Changes are deployed - # to the cluster pointed at the 'dev' environment. - ks apply dev -f ./pod.json +# Create or update resources described in the JSON file. Changes are deployed +# to the cluster pointed at the 'dev' environment. +ks apply dev -f ./pod.json - # Update resources described in a YAML file, and running in cluster referred - # to by './kubeconfig'. - ks apply --kubeconfig=./kubeconfig -f ./pod.yaml +# Update resources described in a YAML file, and running in cluster referred +# to by './kubeconfig'. +ks apply --kubeconfig=./kubeconfig -f ./pod.yaml - # Display set of actions we will execute when we run 'apply'. - ks apply dev --dry-run`, +# Display set of actions we will execute when we run 'apply'. +ks apply dev --dry-run`, } diff --git a/cmd/delete.go b/cmd/delete.go index 6e5968ba..c3e0750e 100644 --- a/cmd/delete.go +++ b/cmd/delete.go @@ -88,19 +88,19 @@ configuration. ksonnet applications are accepted, as well as normal JSON, YAML, and Jsonnet files.`, - Example: ` # Delete all resources described in a ksonnet application, from the 'dev' - # environment. Can be used in any subdirectory of the application. - ks delete dev + Example: `# Delete all resources described in a ksonnet application, from the 'dev' +# environment. Can be used in any subdirectory of the application. +ks delete dev - # Delete resources described in a YAML file. Automatically picks up the - # cluster's location from '$KUBECONFIG'. - ks delete -f ./pod.yaml +# Delete resources described in a YAML file. Automatically picks up the +# cluster's location from '$KUBECONFIG'. +ks delete -f ./pod.yaml - # Delete resources described in the JSON file from the 'dev' environment. Can - # be used in any subdirectory of the application. - ks delete dev -f ./pod.json +# Delete resources described in the JSON file from the 'dev' environment. Can +# be used in any subdirectory of the application. +ks delete dev -f ./pod.json - # Delete resources described in a YAML file, and running in the cluster - # specified by the current context in specified kubeconfig file. - ks delete --kubeconfig=./kubeconfig -f ./pod.yaml`, +# Delete resources described in a YAML file, and running in the cluster +# specified by the current context in specified kubeconfig file. +ks delete --kubeconfig=./kubeconfig -f ./pod.yaml`, } diff --git a/cmd/diff.go b/cmd/diff.go index 8e4e147a..f7a46e80 100644 --- a/cmd/diff.go +++ b/cmd/diff.go @@ -88,35 +88,35 @@ configurations. ksonnet applications are accepted, as well as normal JSON, YAML, and Jsonnet files.`, - Example: ` # Show diff between resources described in a the local 'dev' environment - # specified by the ksonnet application and the remote cluster referenced by - # the same 'dev' environment. Can be used in any subdirectory of the application. - ksonnet diff dev - - # Show diff between resources at remote clusters. This requires ksonnet - # application defined environments. Diff between the cluster defined at the - # 'us-west/dev' environment, and the cluster defined at the 'us-west/prod' - # environment. Can be used in any subdirectory of the application. - ksonnet diff remote:us-west/dev remote:us-west/prod - - # Show diff between resources at a remote and a local cluster. This requires - # ksonnet application defined environments. Diff between the cluster defined - # at the 'us-west/dev' environment, and the cluster defined at the - # 'us-west/prod' environment. Can be used in any subdirectory of the - # application. - ksonnet diff local:us-west/dev remote:us-west/prod - - # Show diff between resources described in a YAML file and the cluster - # referenced in '$KUBECONFIG'. - ks diff -f ./pod.yaml - - # Show diff between resources described in a JSON file and the cluster - # referenced by the environment 'dev'. - ks diff dev -f ./pod.json - - # Show diff between resources described in a YAML file and the cluster - # referred to by './kubeconfig'. - ks diff --kubeconfig=./kubeconfig -f ./pod.yaml`, + Example: `# Show diff between resources described in a the local 'dev' environment +# specified by the ksonnet application and the remote cluster referenced by +# the same 'dev' environment. Can be used in any subdirectory of the application. +ksonnet diff dev + +# Show diff between resources at remote clusters. This requires ksonnet +# application defined environments. Diff between the cluster defined at the +# 'us-west/dev' environment, and the cluster defined at the 'us-west/prod' +# environment. Can be used in any subdirectory of the application. +ksonnet diff remote:us-west/dev remote:us-west/prod + +# Show diff between resources at a remote and a local cluster. This requires +# ksonnet application defined environments. Diff between the cluster defined +# at the 'us-west/dev' environment, and the cluster defined at the +# 'us-west/prod' environment. Can be used in any subdirectory of the +# application. +ksonnet diff local:us-west/dev remote:us-west/prod + +# Show diff between resources described in a YAML file and the cluster +# referenced in '$KUBECONFIG'. +ks diff -f ./pod.yaml + +# Show diff between resources described in a JSON file and the cluster +# referenced by the environment 'dev'. +ks diff dev -f ./pod.json + +# Show diff between resources described in a YAML file and the cluster +# referred to by './kubeconfig'. +ks diff --kubeconfig=./kubeconfig -f ./pod.yaml`, } func initDiffCmd(cmd *cobra.Command, wd metadata.AbsPath, envFq1, envFq2 *string, files []string, diffStrategy string) (kubecfg.DiffCmd, error) { diff --git a/cmd/env.go b/cmd/env.go index 38cbf26b..7e881818 100644 --- a/cmd/env.go +++ b/cmd/env.go @@ -56,7 +56,7 @@ var envCmd = &cobra.Command{ Use: "env", Short: `Manage ksonnet environments`, Long: `An environment acts as a sort of "named cluster", allowing for commands like -'ks apply dev', which applies the ksonnet application to the "dev cluster". +` + " `ks apply dev` " + `, which applies the ksonnet application to the 'dev cluster'. Additionally, environments allow users to cache data about the cluster it points to, including data needed to run 'verify', and a version of ksonnet-lib that is generated based on the flags the API server was started with (e.g., RBAC enabled @@ -68,25 +68,27 @@ often contained in a kubeconfig file), and Environments are represented as a hierarchy in the 'environments' directory of a ksonnet application. For example, in the example below, there are two environments: 'default' and 'us-west/staging'. Each contains a cached version of -ksonnet-lib, and a 'spec.json' that contains the server and server cert that +` + " `ksonnet-lib` " + `, and a` + " `spec.json` " + `that contains the server and server cert that uniquely identifies the cluster. -environments/ - default/ [Default generated environment] - .metadata/ - k.libsonnet - k8s.libsonnet - swagger.json - spec.json - default.jsonnet - us-west/ - staging/ [Example of user-generated env] - .metadata/ - k.libsonnet - k8s.libsonnet - swagger.json - spec.json [This will contain the API server address of the environment and other environment metadata] - staging.jsonnet`, + environments/ + default/ [Default generated environment] + .metadata/ + k.libsonnet + k8s.libsonnet + swagger.json + spec.json + default.jsonnet + params.libsonnet + us-west/ + staging/ [Example of user-generated env] + .metadata/ + k.libsonnet + k8s.libsonnet + swagger.json + spec.json [This will contain the API server address of the environment and other environment metadata] + staging.jsonnet + params.libsonnet`, RunE: func(cmd *cobra.Command, args []string) error { return fmt.Errorf("Command 'env' requires a subcommand\n\n%s", cmd.UsageString()) }, @@ -157,48 +159,49 @@ var envAddCmd = &cobra.Command{ }, Long: `Add a new environment to a ksonnet project. Names are restricted to not -include punctuation, so names like '../foo' are not allowed. +include punctuation, so names like` + " `../foo` " + `are not allowed. An environment acts as a sort of "named cluster", allowing for commands like -'ks apply dev', which applies the ksonnet application to the "dev cluster". -For more information on what an environment is and how they work, run 'help -env'. +` + " `ks apply dev` " + `, which applies the ksonnet application to the "dev cluster". +For more information on what an environment is and how they work, run` + " `ks help env` " + `. Environments are represented as a hierarchy in the 'environments' directory of a -ksonnet application, and hence 'env add' will add to this directory structure. +ksonnet application, and hence` + " `ks env add` " + `will add to this directory structure. For example, in the example below, there are two environments: 'default' and -'us-west/staging'. 'env add' will add a similar directory to this environment. - -environments/ - default/ [Default generated environment] - .metadata/ - k.libsonnet - k8s.libsonnet - swagger.json - spec.json - default.jsonnet - us-west/ - staging/ [Example of user-generated env] - .metadata/ - k.libsonnet - k8s.libsonnet - swagger.json - spec.json [This will contain the API server address of the environment and other environment metadata], - staging.jsonnet`, - Example: ` # Initialize a new staging environment at 'us-west'. - # The environment will be setup using the current context in your kubecfg file. The directory - # structure rooted at 'us-west' in the documentation above will be generated. - ks env add us-west/staging - - # Initialize a new staging environment at 'us-west' with the namespace 'staging', using - # the OpenAPI specification generated in the Kubernetes v1.7.1 build to generate 'ksonnet-lib'. - ks env add us-west/staging --api-spec=version:v1.7.1 --namespace=staging - - # Initialize a new environment using the 'dev' context in your kubeconfig file. - ks env add my-env --context=dev - - # Initialize a new environment using a server address. - ks env add my-env --server=https://ksonnet-1.us-west.elb.amazonaws.com`, +'us-west/staging'.` + " `ks env add` " + `will add a similar directory to this environment. + + environments/ + default/ [Default generated environment] + .metadata/ + k.libsonnet + k8s.libsonnet + swagger.json + spec.json + default.jsonnet + params.libsonnet + us-west/ + staging/ [Example of user-generated env] + .metadata/ + k.libsonnet + k8s.libsonnet + swagger.json + spec.json [This will contain the API server address of the environment and other environment metadata], + staging.jsonnet + params.libsonnet`, + Example: `# Initialize a new staging environment at 'us-west'. +# The environment will be setup using the current context in your kubecfg file. The directory +# structure rooted at 'us-west' in the documentation above will be generated. +ks env add us-west/staging + +# Initialize a new staging environment at 'us-west' with the namespace 'staging', using +# the OpenAPI specification generated in the Kubernetes v1.7.1 build to generate 'ksonnet-lib'. +ks env add us-west/staging --api-spec=version:v1.7.1 --namespace=staging + +# Initialize a new environment using the 'dev' context in your kubeconfig file. +ks env add my-env --context=dev + +# Initialize a new environment using a server address. +ks env add my-env --server=https://ksonnet-1.us-west.elb.amazonaws.com`, } var envRmCmd = &cobra.Command{ @@ -230,15 +233,11 @@ var envRmCmd = &cobra.Command{ return c.Run() }, Long: `Delete an environment from a ksonnet project. This is the same -as removing the <env-name> environment directory and all files contained. If the -project exists in a hierarchy (e.g., 'us-east/staging') and deleting the -environment results in an empty environments directory (e.g., if deleting -'us-east/staging' resulted in an empty 'us-east/' directory), then all empty -parent directories are subsequently deleted.`, - Example: ` # Remove the directory 'us-west/staging' and all contents - # in the 'environments' directory. This will also remove the parent directory - # 'us-west' if it is empty. - ks env rm us-west/staging`, +as removing the <env-name> environment directory and all files contained. All empty +parent directories are also subsequently deleted.`, + Example: `# Remove the directory 'us-west/staging' and all contents in the 'environments' +# directory. This will also remove the parent directory 'us-west' if it is empty. +ks env rm us-west/staging`, } var envListCmd = &cobra.Command{ @@ -324,19 +323,19 @@ var envSetCmd = &cobra.Command{ Long: `Set environment fields such as the name, and server. Changing the name of an environment will also update the directory structure in 'environments'.`, - Example: ` # Updates the API server address of the environment 'us-west/staging'. - ks env set us-west/staging --server=http://example.com + Example: `# Updates the API server address of the environment 'us-west/staging'. +ks env set us-west/staging --server=http://example.com - # Updates the namespace of the environment 'us-west/staging'. - ks env set us-west/staging --namespace=staging +# Updates the namespace of the environment 'us-west/staging'. +ks env set us-west/staging --namespace=staging - # Updates both the name and the server of the environment 'us-west/staging'. - # Updating the name will update the directory structure in 'environments'. - ks env set us-west/staging --server=http://example.com --name=us-east/staging +# Updates both the name and the server of the environment 'us-west/staging'. +# Updating the name will update the directory structure in 'environments'. +ks env set us-west/staging --server=http://example.com --name=us-east/staging - # Updates API server address of the environment 'us-west/staging' based on the - # server in the context 'staging-west' in your kubeconfig file. - ks env set us-west/staging --context=staging-west`, +# Updates API server address of the environment 'us-west/staging' based on the +# server in the context 'staging-west' in your kubeconfig file. +ks env set us-west/staging --context=staging-west`, } func commonEnvFlags(flags *pflag.FlagSet) (server, namespace, context string, err error) { diff --git a/cmd/init.go b/cmd/init.go index 61ca3cdd..2921693a 100644 --- a/cmd/init.go +++ b/cmd/init.go @@ -77,43 +77,39 @@ var initCmd = &cobra.Command{ return c.Run() }, - Long: `Initialize a ksonnet project in a new directory, 'app-name'. This process + Long: `Initialize a ksonnet project in a new directory,` + " `app-name`" + `. This process consists of two steps: 1. Generating ksonnet-lib. Users can set flags to generate the library based on a variety of data, including server configuration and an OpenAPI specification of a Kubernetes build. By default, this is generated from the capabilities of the cluster specified in the cluster of the current context - specified in $KUBECONFIG. + specified in` + " `$KUBECONFIG`" + `. 2. Generating the following tree in the current directory. - app-name/ - .gitignore Default .gitignore; can customize VCS - .ksonnet/ Metadata for ksonnet - envs/ - default/ Default generated environment] - k.libsonnet - k8s.libsonnet - swagger.json - spec.json - components/ Top-level Kubernetes objects defining application - lib/ user-written .libsonnet files - vendor/ mixin libraries, prototypes + app-name/ + .gitignore Default .gitignore; can customize VCS + .ksonnet/ Metadata for ksonnet + environments/ + default/ [Default generated environment] + components/ Top-level Kubernetes objects defining application + lib/ user-written .libsonnet files + vendor/ part libraries, prototypes `, - Example: ` # Initialize ksonnet application, using the capabilities of live cluster - # specified in the $KUBECONFIG environment variable (specifically: the - # current context) to generate 'ksonnet-lib'. - ks init app-name - - # Initialize ksonnet application, using the OpenAPI specification generated - # in the Kubenetes v1.7.1 build to generate 'ksonnet-lib'. - ks init app-name --api-spec=version:v1.7.1 - - # Initialize ksonnet application, using an OpenAPI specification file - # generated by a build of Kubernetes to generate 'ksonnet-lib'. - ks init app-name --api-spec=file:swagger.json - - # Initialize ksonnet application, using the context 'dev' from the kubeconfig - # file. - ks init app-name --context=dev`, + Example: `# Initialize ksonnet application, using the capabilities of live cluster +# specified in the $KUBECONFIG environment variable (specifically: the +# current context) to generate 'ksonnet-lib'. +ks init app-name + +# Initialize ksonnet application, using the OpenAPI specification generated +# in the Kubenetes v1.7.1 build to generate 'ksonnet-lib'. +ks init app-name --api-spec=version:v1.7.1 + +# Initialize ksonnet application, using an OpenAPI specification file +# generated by a build of Kubernetes to generate 'ksonnet-lib'. +ks init app-name --api-spec=file:swagger.json + +# Initialize ksonnet application, using the context 'dev' from the kubeconfig +# file. +ks init app-name --context=dev`, } diff --git a/cmd/param.go b/cmd/param.go index cd24de27..e5a8c34a 100644 --- a/cmd/param.go +++ b/cmd/param.go @@ -54,7 +54,8 @@ demands. Environments are ksonnet "named clusters". For more information on environments, run: - ks env --help + + ks env --help `, RunE: func(cmd *cobra.Command, args []string) error { return fmt.Errorf("Command 'param' requires a subcommand\n\n%s", cmd.UsageString()) @@ -83,20 +84,20 @@ var paramSetCmd = &cobra.Command{ return c.Run() }, - Long: `"Set component or environment parameters such as replica count or name. + Long: `Set component or environment parameters such as replica count or name. Parameters are set individually, one at a time. If you require customization of more fields, we suggest that you modify your ksonnet project's -'components/params.libsonnet' file directly. Likewise, for greater customization +` + " `components/params.libsonnet` " + `file directly. Likewise, for greater customization of environment parameters, we suggest modifying the -'environments/:name/params.libsonnet' file. +` + " `environments/:name/params.libsonnet` " + `file. `, - Example: ` # Updates the replica count of the 'guestbook' component to 4. - ks param set guestbook replicas 4 + Example: `# Updates the replica count of the 'guestbook' component to 4. +ks param set guestbook replicas 4 - # Updates the replica count of the 'guestbook' component to 2 for the environment - # 'dev' - ks param set guestbook replicas 2 --env=dev`, +# Updates the replica count of the 'guestbook' component to 2 for the environment +# 'dev' +ks param set guestbook replicas 2 --env=dev`, } var paramListCmd = &cobra.Command{ @@ -122,24 +123,24 @@ var paramListCmd = &cobra.Command{ return c.Run(cmd.OutOrStdout()) }, - Long: `"List all component parameters or environment parameters. + Long: `List all component parameters or environment parameters. This command will display all parameters for the component specified. If a component is not specified, parameters for all components will be listed. Furthermore, parameters can be listed on a per-environment basis. `, - Example: ` # List all component parameters - ks param list + Example: `# List all component parameters +ks param list - # List all parameters for the component "guestbook" - ks param list guestbook +# List all parameters for the component "guestbook" +ks param list guestbook - # List all parameters for the environment "dev" - ks param list --env=dev +# List all parameters for the environment "dev" +ks param list --env=dev - # List all parameters for the component "guestbook" in the environment "dev" - ks param list guestbook --env=dev`, +# List all parameters for the component "guestbook" in the environment "dev" +ks param list guestbook --env=dev`, } var paramDiffCmd = &cobra.Command{ @@ -163,14 +164,14 @@ var paramDiffCmd = &cobra.Command{ return c.Run(cmd.OutOrStdout()) }, - Long: `"Pretty prints differences between the component parameters of two environments. + Long: `Pretty prints differences between the component parameters of two environments. A component flag is accepted to diff against a single component. By default, the diff is performed against all components. `, - Example: ` # Diff between the component parameters on environments 'dev' and 'prod' - ks param diff dev prod + Example: `# Diff between the component parameters on environments 'dev' and 'prod' +ks param diff dev prod - # Diff between the component 'guestbook' on environments 'dev' and 'prod' - ks param diff dev prod --component=guestbook`, +# Diff between the component 'guestbook' on environments 'dev' and 'prod' +ks param diff dev prod --component=guestbook`, } diff --git a/cmd/pkg.go b/cmd/pkg.go index bf61331a..7cd442b5 100644 --- a/cmd/pkg.go +++ b/cmd/pkg.go @@ -81,29 +81,29 @@ var pkgInstallCmd = &cobra.Command{ }, Long: `Cache a ksonnet library locally, and make it available for use in the current ksonnet project. This particularly means that we record enough information in -'app.yaml' for new users to retrieve the dependency after a fresh clone of the +` + " `app.yaml` " + `for new users to retrieve the dependency after a fresh clone of the app repository. For example, inside a ksonnet application directory, run: - ks pkg install incubator/nginx@v0.1 + ks pkg install incubator/nginx@v0.1 This can then be referenced in a source file in the ksonnet project: - local nginx = import "kspkg://nginx"; + local nginx = import "kspkg://nginx"; By default, ksonnet knows about two registries: incubator and stable, which are the release channels for official ksonnet libraries. Additional registries can -be added with the 'ks registry' command. +be added with the` + " `ks registry` " + `command. Note that multiple versions of the same ksonnet library can be cached and used -in the same project, by explicitly passing in the '--name' flag. For example: +in the same project, by explicitly passing in the` + " `--name` " + `flag. For example: - ks pkg install incubator/nginx@v0.1 --name nginxv1 - ks pkg install incubator/nginx@v0.2 --name nginxv2 + ks pkg install incubator/nginx@v0.1 --name nginxv1 + ks pkg install incubator/nginx@v0.2 --name nginxv2 -With these commands, a user can 'import "kspkg://nginx1"', and -'import "kspkg://nginx2"' with no conflict.`, +With these commands, a user can` + " `import \"kspkg://nginxv1\"` " + `, and +` + " `import \"kspkg://nginxv2\"` " + `with no conflict.`, } var pkgDescribeCmd = &cobra.Command{ @@ -162,7 +162,7 @@ var pkgDescribeCmd = &cobra.Command{ }, Long: `Output documentation for some ksonnet registry prototype uniquely identified in - the current ksonnet project by some 'registry-name'.`, +the current ksonnet project by some 'registry-name'.`, } var pkgListCmd = &cobra.Command{ diff --git a/cmd/prototype.go b/cmd/prototype.go index 8e552313..d87f137d 100644 --- a/cmd/prototype.go +++ b/cmd/prototype.go @@ -50,40 +50,40 @@ var prototypeCmd = &cobra.Command{ Prototypes are Kubernetes app configuration templates with "holes" that can be filled in by (e.g.) the ksonnet CLI tool or a language server. For example, a -prototype for a 'apps.v1beta1.Deployment' might require a name and image, and +prototype for a` + " `apps.v1beta1.Deployment` " + `might require a name and image, and the ksonnet CLI could expand this to a fully-formed 'Deployment' object. Commands: - use Instantiate prototype, filling in parameters from flags, and - emitting the generated code to stdout. - describe Display documentation and details about a prototype - search Search for a prototype`, - - Example: ` # Display documentation about prototype - # 'io.ksonnet.pkg.prototype.simple-deployment', including: - # - # (1) a description of what gets generated during instantiation - # (2) a list of parameters that are required to be passed in with CLI flags - # - # NOTE: Many subcommands only require the user to specify enough of the - # identifier to disambiguate it among other known prototypes, which is why - # 'simple-deployment' is given as argument instead of the fully-qualified - # name. - ks prototype describe simple-deployment - - # Instantiate prototype 'io.ksonnet.pkg.prototype.simple-deployment', using - # the 'nginx' image, and port 80 exposed. - # - # SEE ALSO: Note above for a description of why this subcommand can take - # 'simple-deployment' instead of the fully-qualified prototype name. - ks prototype use simple-deployment \ - --name=nginx \ - --image=nginx \ - --port=80 \ - --portName=http - - # Search known prototype metadata for the string 'deployment'. - ks prototype search deployment`, + use Instantiate prototype, filling in parameters from flags, and + emitting the generated code to stdout. + describe Display documentation and details about a prototype + search Search for a prototype`, + + Example: `# Display documentation about prototype +# 'io.ksonnet.pkg.prototype.simple-deployment', including: +# +# (1) a description of what gets generated during instantiation +# (2) a list of parameters that are required to be passed in with CLI flags +# +# NOTE: Many subcommands only require the user to specify enough of the +# identifier to disambiguate it among other known prototypes, which is why +# 'simple-deployment' is given as argument instead of the fully-qualified +# name. +ks prototype describe simple-deployment + +# Instantiate prototype 'io.ksonnet.pkg.prototype.simple-deployment', using +# the 'nginx' image, and port 80 exposed. +# +# SEE ALSO: Note above for a description of why this subcommand can take +# 'simple-deployment' instead of the fully-qualified prototype name. +ks prototype use simple-deployment \ + --name=nginx \ + --image=nginx \ + --port=80 \ + --portName=http + +# Search known prototype metadata for the string 'deployment'. +ks prototype search deployment`, } var prototypeListCmd = &cobra.Command{ @@ -173,27 +173,27 @@ var prototypeDescribeCmd = &cobra.Command{ return nil }, Long: `Output documentation, examples, and other information for some ksonnet -prototype uniquely identified by some (possibly partial) 'prototype-name'. This +prototype uniquely identified by some (possibly partial)` + " `prototype-name`" + `. This includes: - (1) a description of what gets generated during instantiation - (2) a list of parameters that are required to be passed in with CLI flags + 1. a description of what gets generated during instantiation + 2. a list of parameters that are required to be passed in with CLI flags -'prototype-name' need only contain enough of the suffix of a name to uniquely +` + "`prototype-name` " + `need only contain enough of the suffix of a name to uniquely disambiguate it among known names. For example, 'deployment' may resolve ambiguously, in which case 'use' will fail, while 'simple-deployment' might be unique enough to resolve to 'io.ksonnet.pkg.prototype.simple-deployment'.`, - Example: ` # Display documentation about prototype, including: - ks prototype describe io.ksonnet.pkg.prototype.simple-deployment + Example: `# Display documentation about prototype, including: +ks prototype describe io.ksonnet.pkg.prototype.simple-deployment - # Display documentation about prototype using a unique suffix of an - # identifier. That is, this command only requires a long enough suffix to - # uniquely identify a ksonnet prototype. In this example, the suffix - # 'simple-deployment' is enough to uniquely identify - # 'io.ksonnet.pkg.prototype.simple-deployment', but 'deployment' might not - # be, as several names end with that suffix. - ks prototype describe simple-deployment`, +# Display documentation about prototype using a unique suffix of an +# identifier. That is, this command only requires a long enough suffix to +# uniquely identify a ksonnet prototype. In this example, the suffix +# 'simple-deployment' is enough to uniquely identify +# 'io.ksonnet.pkg.prototype.simple-deployment', but 'deployment' might not +# be, as several names end with that suffix. +ks prototype describe simple-deployment`, } var prototypeSearchCmd = &cobra.Command{ @@ -218,9 +218,9 @@ var prototypeSearchCmd = &cobra.Command{ return nil }, - Long: `Search ksonnet for prototypes whose names contain 'name-substring'.`, - Example: ` # Search known prototype metadata for the string 'deployment'. - ks prototype search deployment`, + Long: `Search ksonnet for prototypes whose names contain` + " `name-substring` " + `.`, + Example: `# Search known prototype metadata for the string 'deployment'. +ks prototype search deployment`, } var prototypePreviewCmd = &cobra.Command{ @@ -292,25 +292,25 @@ var prototypePreviewCmd = &cobra.Command{ return nil }, Long: `Expand prototype uniquely identified by (possibly partial) -'prototype-name', filling in parameters from flags, and emitting the generated +` + " `prototype-name` " + `, filling in parameters from flags, and emitting the generated code to stdout. -Note also that 'prototype-name' need only contain enough of the suffix of a name +Note also that` + " `prototype-name` " + `need only contain enough of the suffix of a name to uniquely disambiguate it among known names. For example, 'deployment' may -resolve ambiguously, in which case 'use' will fail, while 'deployment' might be +resolve ambiguously, in which case` + " `use` " + `will fail, while 'deployment' might be unique enough to resolve to 'io.ksonnet.pkg.single-port-deployment'.`, - Example: ` # Preview prototype 'io.ksonnet.pkg.single-port-deployment', using the - # 'nginx' image, and port 80 exposed. - ks prototype preview io.ksonnet.pkg.prototype.simple-deployment \ - --name=nginx \ - --image=nginx - - # Preview prototype using a unique suffix of an identifier. See - # introduction of help message for more information on how this works. - ks prototype preview simple-deployment \ - --name=nginx \ - --image=nginx`, + Example: `# Preview prototype 'io.ksonnet.pkg.single-port-deployment', using the +# 'nginx' image, and port 80 exposed. +ks prototype preview io.ksonnet.pkg.prototype.simple-deployment \ + --name=nginx \ + --image=nginx + +# Preview prototype using a unique suffix of an identifier. See +# introduction of help message for more information on how this works. +ks prototype preview simple-deployment \ + --name=nginx \ + --image=nginx`, } // generateCmd acts as an alias for `prototype use` @@ -397,37 +397,37 @@ var prototypeUseCmd = &cobra.Command{ return manager.CreateComponent(componentName, text, params, templateType) }, - Long: `Expand prototype uniquely identified by (possibly partial) 'prototype-name', + Long: `Expand prototype uniquely identified by (possibly partial)` + " `prototype-name` " + `, filling in parameters from flags, and placing it into the file -'components/componentName', with the appropriate extension set. For example, the +` + " `components/componentName` " + `, with the appropriate extension set. For example, the following command will expand template 'io.ksonnet.pkg.single-port-deployment' -and place it in the file 'components/nginx-depl.jsonnet' (since by default +and place it in the file` + " `components/nginx-depl.jsonnet` " + `(since by default ksonnet will expand templates as Jsonnet). - ks prototype use io.ksonnet.pkg.single-port-deployment nginx-depl \ - --name=nginx \ - --image=nginx + ks prototype use io.ksonnet.pkg.single-port-deployment nginx-depl \ + --name=nginx \ + --image=nginx -Note also that 'prototype-name' need only contain enough of the suffix of a name +Note also that` + " `prototype-name` " + `need only contain enough of the suffix of a name to uniquely disambiguate it among known names. For example, 'deployment' may -resolve ambiguously, in which case 'use' will fail, while 'deployment' might be +resolve ambiguously, in which case` + " `use` " + `will fail, while 'deployment' might be unique enough to resolve to 'io.ksonnet.pkg.single-port-deployment'.`, - Example: ` # Instantiate prototype 'io.ksonnet.pkg.single-port-deployment', using the - # 'nginx' image. The expanded prototype is placed in - # 'components/nginx-depl.jsonnet'. - ks prototype use io.ksonnet.pkg.prototype.simple-deployment nginx-depl \ - --name=nginx \ - --image=nginx - - # Instantiate prototype 'io.ksonnet.pkg.single-port-deployment' using the - # unique suffix, 'deployment'. The expanded prototype is again placed in - # 'components/nginx-depl.jsonnet'. See introduction of help message for more - # information on how this works. Note that if you have imported another - # prototype with this suffix, this may resolve ambiguously for you. - ks prototype use deployment nginx-depl \ - --name=nginx \ - --image=nginx`, + Example: `# Instantiate prototype 'io.ksonnet.pkg.single-port-deployment', using the +# 'nginx' image. The expanded prototype is placed in +# 'components/nginx-depl.jsonnet'. +ks prototype use io.ksonnet.pkg.prototype.simple-deployment nginx-depl \ + --name=nginx \ + --image=nginx + +# Instantiate prototype 'io.ksonnet.pkg.single-port-deployment' using the +# unique suffix, 'deployment'. The expanded prototype is again placed in +# 'components/nginx-depl.jsonnet'. See introduction of help message for more +# information on how this works. Note that if you have imported another +# prototype with this suffix, this may resolve ambiguously for you. +ks prototype use deployment nginx-depl \ + --name=nginx \ + --image=nginx`, } func bindPrototypeFlags(cmd *cobra.Command, proto *prototype.SpecificationSchema) { diff --git a/cmd/registry.go b/cmd/registry.go index 7149d18f..bf467396 100644 --- a/cmd/registry.go +++ b/cmd/registry.go @@ -39,7 +39,7 @@ manage in a ksonnet project using the CLI. A typical library contains: var registryListCmd = &cobra.Command{ Use: "list", - Short: `List all registries known to current ksonnet app`, + Short: `List all registries known to the current ksonnet app.`, RunE: func(cmd *cobra.Command, args []string) error { const ( nameHeader = "NAME" @@ -142,5 +142,5 @@ var registryDescribeCmd = &cobra.Command{ }, Long: `Output documentation for some ksonnet registry prototype uniquely identified in -the current ksonnet project by some 'registry-name'.`, +the current ksonnet project by some` + " `registry-name`" + `.`, } diff --git a/cmd/update.go b/cmd/update.go index 31630a35..651dd2a1 100644 --- a/cmd/update.go +++ b/cmd/update.go @@ -109,19 +109,19 @@ if they do not exist (default: true). ksonnet applications are accepted, as well as normal JSON, YAML, and Jsonnet files.`, - Example: ` # Create or update all resources described in a ksonnet application, and - # running in the 'dev' environment. Can be used in any subdirectory of the - # application. - ks update dev + Example: `# Create or update all resources described in a ksonnet application, and +# running in the 'dev' environment. Can be used in any subdirectory of the +# application. +ks update dev - # Create or update resources described in a YAML file. Automatically picks up - # the cluster's location from '$KUBECONFIG'. - ks update -f ./pod.yaml +# Create or update resources described in a YAML file. Automatically picks up +# the cluster's location from '$KUBECONFIG'. +ks update -f ./pod.yaml - # Update resources described in a YAML file, and running in cluster referred - # to by './kubeconfig'. - ks update --kubeconfig=./kubeconfig -f ./pod.yaml +# Update resources described in a YAML file, and running in cluster referred +# to by './kubeconfig'. +ks update --kubeconfig=./kubeconfig -f ./pod.yaml - # Display set of actions we will execute when we run 'update'. - ks update dev --dry-run`, +# Display set of actions we will execute when we run 'update'. +ks update dev --dry-run`, } diff --git a/cmd/validate.go b/cmd/validate.go index 28302fe5..141dd78c 100644 --- a/cmd/validate.go +++ b/cmd/validate.go @@ -72,19 +72,19 @@ specification. ksonnet applications are accepted, as well as normal JSON, YAML, and Jsonnet files.`, - Example: ` # Validate all resources described in a ksonnet application, expanding - # ksonnet code with 'dev' environment where necessary (i.e., not YAML, JSON, - # or non-ksonnet Jsonnet code). - ksonnet validate dev + Example: `# Validate all resources described in a ksonnet application, expanding +# ksonnet code with 'dev' environment where necessary (i.e., not YAML, JSON, +# or non-ksonnet Jsonnet code). +ksonnet validate dev - # Validate resources described in a YAML file. - ksonnet validate -f ./pod.yaml +# Validate resources described in a YAML file. +ksonnet validate -f ./pod.yaml - # Validate resources described in the JSON file against existing resources - # in the cluster the 'dev' environment is pointing at. - ksonnet validate dev -f ./pod.yaml +# Validate resources described in the JSON file against existing resources +# in the cluster the 'dev' environment is pointing at. +ksonnet validate dev -f ./pod.yaml - # Validate resources described in a Jsonnet file. Does not expand using - # environment bindings. - ksonnet validate -f ./pod.jsonnet`, +# Validate resources described in a Jsonnet file. Does not expand using +# environment bindings. +ksonnet validate -f ./pod.jsonnet`, } diff --git a/docs/cli-reference/ks_apply.md b/docs/cli-reference/ks_apply.md index b011d51d..9a2a19b2 100644 --- a/docs/cli-reference/ks_apply.md +++ b/docs/cli-reference/ks_apply.md @@ -6,7 +6,7 @@ Apply local configuration to remote cluster Update (or optionally create) Kubernetes resources on the cluster using the -local configuration. Use the '--create' flag to control whether we create them +local configuration. Use the `--create` flag to control whether we create them if they do not exist (default: true). ksonnet applications are accepted, as well as normal JSON, YAML, and Jsonnet @@ -19,25 +19,25 @@ ks apply [env-name] [-f <file-or-dir>] ### Examples ``` - # Create or update all resources described in a ksonnet application, and - # running in the 'dev' environment. Can be used in any subdirectory of the - # application. - ks apply dev +# Create or update all resources described in a ksonnet application, and +# running in the 'dev' environment. Can be used in any subdirectory of the +# application. +ks apply dev - # Create or update resources described in a YAML file. Automatically picks up - # the cluster's location from '$KUBECONFIG'. - ks appy -f ./pod.yaml +# Create or update resources described in a YAML file. Automatically picks up +# the cluster's location from '$KUBECONFIG'. +ks appy -f ./pod.yaml - # Create or update resources described in the JSON file. Changes are deployed - # to the cluster pointed at the 'dev' environment. - ks apply dev -f ./pod.json +# Create or update resources described in the JSON file. Changes are deployed +# to the cluster pointed at the 'dev' environment. +ks apply dev -f ./pod.json - # Update resources described in a YAML file, and running in cluster referred - # to by './kubeconfig'. - ks apply --kubeconfig=./kubeconfig -f ./pod.yaml +# Update resources described in a YAML file, and running in cluster referred +# to by './kubeconfig'. +ks apply --kubeconfig=./kubeconfig -f ./pod.yaml - # Display set of actions we will execute when we run 'apply'. - ks apply dev --dry-run +# Display set of actions we will execute when we run 'apply'. +ks apply dev --dry-run ``` ### Options diff --git a/docs/cli-reference/ks_delete.md b/docs/cli-reference/ks_delete.md index 380bdfc5..77c3071c 100644 --- a/docs/cli-reference/ks_delete.md +++ b/docs/cli-reference/ks_delete.md @@ -18,21 +18,21 @@ ks delete [env-name] [-f <file-or-dir>] ### Examples ``` - # Delete all resources described in a ksonnet application, from the 'dev' - # environment. Can be used in any subdirectory of the application. - ks delete dev +# Delete all resources described in a ksonnet application, from the 'dev' +# environment. Can be used in any subdirectory of the application. +ks delete dev - # Delete resources described in a YAML file. Automatically picks up the - # cluster's location from '$KUBECONFIG'. - ks delete -f ./pod.yaml +# Delete resources described in a YAML file. Automatically picks up the +# cluster's location from '$KUBECONFIG'. +ks delete -f ./pod.yaml - # Delete resources described in the JSON file from the 'dev' environment. Can - # be used in any subdirectory of the application. - ks delete dev -f ./pod.json +# Delete resources described in the JSON file from the 'dev' environment. Can +# be used in any subdirectory of the application. +ks delete dev -f ./pod.json - # Delete resources described in a YAML file, and running in the cluster - # specified by the current context in specified kubeconfig file. - ks delete --kubeconfig=./kubeconfig -f ./pod.yaml +# Delete resources described in a YAML file, and running in the cluster +# specified by the current context in specified kubeconfig file. +ks delete --kubeconfig=./kubeconfig -f ./pod.yaml ``` ### Options diff --git a/docs/cli-reference/ks_diff.md b/docs/cli-reference/ks_diff.md index 617e273e..dab22535 100644 --- a/docs/cli-reference/ks_diff.md +++ b/docs/cli-reference/ks_diff.md @@ -18,35 +18,35 @@ ks diff [<env1> [<env2>]] [-f <file-or-dir>] ### Examples ``` - # Show diff between resources described in a the local 'dev' environment - # specified by the ksonnet application and the remote cluster referenced by - # the same 'dev' environment. Can be used in any subdirectory of the application. - ksonnet diff dev - - # Show diff between resources at remote clusters. This requires ksonnet - # application defined environments. Diff between the cluster defined at the - # 'us-west/dev' environment, and the cluster defined at the 'us-west/prod' - # environment. Can be used in any subdirectory of the application. - ksonnet diff remote:us-west/dev remote:us-west/prod - - # Show diff between resources at a remote and a local cluster. This requires - # ksonnet application defined environments. Diff between the cluster defined - # at the 'us-west/dev' environment, and the cluster defined at the - # 'us-west/prod' environment. Can be used in any subdirectory of the - # application. - ksonnet diff local:us-west/dev remote:us-west/prod - - # Show diff between resources described in a YAML file and the cluster - # referenced in '$KUBECONFIG'. - ks diff -f ./pod.yaml - - # Show diff between resources described in a JSON file and the cluster - # referenced by the environment 'dev'. - ks diff dev -f ./pod.json - - # Show diff between resources described in a YAML file and the cluster - # referred to by './kubeconfig'. - ks diff --kubeconfig=./kubeconfig -f ./pod.yaml +# Show diff between resources described in a the local 'dev' environment +# specified by the ksonnet application and the remote cluster referenced by +# the same 'dev' environment. Can be used in any subdirectory of the application. +ksonnet diff dev + +# Show diff between resources at remote clusters. This requires ksonnet +# application defined environments. Diff between the cluster defined at the +# 'us-west/dev' environment, and the cluster defined at the 'us-west/prod' +# environment. Can be used in any subdirectory of the application. +ksonnet diff remote:us-west/dev remote:us-west/prod + +# Show diff between resources at a remote and a local cluster. This requires +# ksonnet application defined environments. Diff between the cluster defined +# at the 'us-west/dev' environment, and the cluster defined at the +# 'us-west/prod' environment. Can be used in any subdirectory of the +# application. +ksonnet diff local:us-west/dev remote:us-west/prod + +# Show diff between resources described in a YAML file and the cluster +# referenced in '$KUBECONFIG'. +ks diff -f ./pod.yaml + +# Show diff between resources described in a JSON file and the cluster +# referenced by the environment 'dev'. +ks diff dev -f ./pod.json + +# Show diff between resources described in a YAML file and the cluster +# referred to by './kubeconfig'. +ks diff --kubeconfig=./kubeconfig -f ./pod.yaml ``` ### Options diff --git a/docs/cli-reference/ks_env.md b/docs/cli-reference/ks_env.md index debd7934..6d397b57 100644 --- a/docs/cli-reference/ks_env.md +++ b/docs/cli-reference/ks_env.md @@ -6,7 +6,7 @@ Manage ksonnet environments An environment acts as a sort of "named cluster", allowing for commands like -'ks apply dev', which applies the ksonnet application to the "dev cluster". + `ks apply dev` , which applies the ksonnet application to the 'dev cluster'. Additionally, environments allow users to cache data about the cluster it points to, including data needed to run 'verify', and a version of ksonnet-lib that is generated based on the flags the API server was started with (e.g., RBAC enabled @@ -18,25 +18,27 @@ often contained in a kubeconfig file), and Environments are represented as a hierarchy in the 'environments' directory of a ksonnet application. For example, in the example below, there are two environments: 'default' and 'us-west/staging'. Each contains a cached version of -ksonnet-lib, and a 'spec.json' that contains the server and server cert that + `ksonnet-lib` , and a `spec.json` that contains the server and server cert that uniquely identifies the cluster. -environments/ - default/ [Default generated environment] - .metadata/ - k.libsonnet - k8s.libsonnet - swagger.json - spec.json - default.jsonnet - us-west/ - staging/ [Example of user-generated env] - .metadata/ - k.libsonnet - k8s.libsonnet - swagger.json - spec.json [This will contain the API server address of the environment and other environment metadata] - staging.jsonnet + environments/ + default/ [Default generated environment] + .metadata/ + k.libsonnet + k8s.libsonnet + swagger.json + spec.json + default.jsonnet + params.libsonnet + us-west/ + staging/ [Example of user-generated env] + .metadata/ + k.libsonnet + k8s.libsonnet + swagger.json + spec.json [This will contain the API server address of the environment and other environment metadata] + staging.jsonnet + params.libsonnet ``` ks env diff --git a/docs/cli-reference/ks_env_add.md b/docs/cli-reference/ks_env_add.md index 5cea3512..5608089d 100644 --- a/docs/cli-reference/ks_env_add.md +++ b/docs/cli-reference/ks_env_add.md @@ -6,34 +6,35 @@ Add a new environment to a ksonnet project Add a new environment to a ksonnet project. Names are restricted to not -include punctuation, so names like '../foo' are not allowed. +include punctuation, so names like `../foo` are not allowed. An environment acts as a sort of "named cluster", allowing for commands like -'ks apply dev', which applies the ksonnet application to the "dev cluster". -For more information on what an environment is and how they work, run 'help -env'. + `ks apply dev` , which applies the ksonnet application to the "dev cluster". +For more information on what an environment is and how they work, run `ks help env` . Environments are represented as a hierarchy in the 'environments' directory of a -ksonnet application, and hence 'env add' will add to this directory structure. +ksonnet application, and hence `ks env add` will add to this directory structure. For example, in the example below, there are two environments: 'default' and -'us-west/staging'. 'env add' will add a similar directory to this environment. - -environments/ - default/ [Default generated environment] - .metadata/ - k.libsonnet - k8s.libsonnet - swagger.json - spec.json - default.jsonnet - us-west/ - staging/ [Example of user-generated env] - .metadata/ - k.libsonnet - k8s.libsonnet - swagger.json - spec.json [This will contain the API server address of the environment and other environment metadata], - staging.jsonnet +'us-west/staging'. `ks env add` will add a similar directory to this environment. + + environments/ + default/ [Default generated environment] + .metadata/ + k.libsonnet + k8s.libsonnet + swagger.json + spec.json + default.jsonnet + params.libsonnet + us-west/ + staging/ [Example of user-generated env] + .metadata/ + k.libsonnet + k8s.libsonnet + swagger.json + spec.json [This will contain the API server address of the environment and other environment metadata], + staging.jsonnet + params.libsonnet ``` ks env add <env-name> @@ -42,20 +43,20 @@ ks env add <env-name> ### Examples ``` - # Initialize a new staging environment at 'us-west'. - # The environment will be setup using the current context in your kubecfg file. The directory - # structure rooted at 'us-west' in the documentation above will be generated. - ks env add us-west/staging +# Initialize a new staging environment at 'us-west'. +# The environment will be setup using the current context in your kubecfg file. The directory +# structure rooted at 'us-west' in the documentation above will be generated. +ks env add us-west/staging - # Initialize a new staging environment at 'us-west' with the namespace 'staging', using - # the OpenAPI specification generated in the Kubernetes v1.7.1 build to generate 'ksonnet-lib'. - ks env add us-west/staging --api-spec=version:v1.7.1 --namespace=staging +# Initialize a new staging environment at 'us-west' with the namespace 'staging', using +# the OpenAPI specification generated in the Kubernetes v1.7.1 build to generate 'ksonnet-lib'. +ks env add us-west/staging --api-spec=version:v1.7.1 --namespace=staging - # Initialize a new environment using the 'dev' context in your kubeconfig file. - ks env add my-env --context=dev +# Initialize a new environment using the 'dev' context in your kubeconfig file. +ks env add my-env --context=dev - # Initialize a new environment using a server address. - ks env add my-env --server=https://ksonnet-1.us-west.elb.amazonaws.com +# Initialize a new environment using a server address. +ks env add my-env --server=https://ksonnet-1.us-west.elb.amazonaws.com ``` ### Options diff --git a/docs/cli-reference/ks_env_rm.md b/docs/cli-reference/ks_env_rm.md index 5f373ccb..654a8858 100644 --- a/docs/cli-reference/ks_env_rm.md +++ b/docs/cli-reference/ks_env_rm.md @@ -6,11 +6,8 @@ Delete an environment from a ksonnet project Delete an environment from a ksonnet project. This is the same -as removing the <env-name> environment directory and all files contained. If the -project exists in a hierarchy (e.g., 'us-east/staging') and deleting the -environment results in an empty environments directory (e.g., if deleting -'us-east/staging' resulted in an empty 'us-east/' directory), then all empty -parent directories are subsequently deleted. +as removing the <env-name> environment directory and all files contained. All empty +parent directories are also subsequently deleted. ``` ks env rm <env-name> @@ -19,10 +16,9 @@ ks env rm <env-name> ### Examples ``` - # Remove the directory 'us-west/staging' and all contents - # in the 'environments' directory. This will also remove the parent directory - # 'us-west' if it is empty. - ks env rm us-west/staging +# Remove the directory 'us-west/staging' and all contents in the 'environments' +# directory. This will also remove the parent directory 'us-west' if it is empty. +ks env rm us-west/staging ``` ### Options inherited from parent commands diff --git a/docs/cli-reference/ks_env_set.md b/docs/cli-reference/ks_env_set.md index 78f55086..3a4a4ff6 100644 --- a/docs/cli-reference/ks_env_set.md +++ b/docs/cli-reference/ks_env_set.md @@ -16,19 +16,19 @@ ks env set <env-name> ### Examples ``` - # Updates the API server address of the environment 'us-west/staging'. - ks env set us-west/staging --server=http://example.com +# Updates the API server address of the environment 'us-west/staging'. +ks env set us-west/staging --server=http://example.com - # Updates the namespace of the environment 'us-west/staging'. - ks env set us-west/staging --namespace=staging +# Updates the namespace of the environment 'us-west/staging'. +ks env set us-west/staging --namespace=staging - # Updates both the name and the server of the environment 'us-west/staging'. - # Updating the name will update the directory structure in 'environments'. - ks env set us-west/staging --server=http://example.com --name=us-east/staging +# Updates both the name and the server of the environment 'us-west/staging'. +# Updating the name will update the directory structure in 'environments'. +ks env set us-west/staging --server=http://example.com --name=us-east/staging - # Updates API server address of the environment 'us-west/staging' based on the - # server in the context 'staging-west' in your kubeconfig file. - ks env set us-west/staging --context=staging-west +# Updates API server address of the environment 'us-west/staging' based on the +# server in the context 'staging-west' in your kubeconfig file. +ks env set us-west/staging --context=staging-west ``` ### Options diff --git a/docs/cli-reference/ks_generate.md b/docs/cli-reference/ks_generate.md index d82b49dd..ad0cfa51 100644 --- a/docs/cli-reference/ks_generate.md +++ b/docs/cli-reference/ks_generate.md @@ -5,20 +5,20 @@ Expand prototype, place in components/ directory of ksonnet app ### Synopsis -Expand prototype uniquely identified by (possibly partial) 'prototype-name', +Expand prototype uniquely identified by (possibly partial) `prototype-name` , filling in parameters from flags, and placing it into the file -'components/componentName', with the appropriate extension set. For example, the + `components/componentName` , with the appropriate extension set. For example, the following command will expand template 'io.ksonnet.pkg.single-port-deployment' -and place it in the file 'components/nginx-depl.jsonnet' (since by default +and place it in the file `components/nginx-depl.jsonnet` (since by default ksonnet will expand templates as Jsonnet). - ks prototype use io.ksonnet.pkg.single-port-deployment nginx-depl \ - --name=nginx \ - --image=nginx + ks prototype use io.ksonnet.pkg.single-port-deployment nginx-depl \ + --name=nginx \ + --image=nginx -Note also that 'prototype-name' need only contain enough of the suffix of a name +Note also that `prototype-name` need only contain enough of the suffix of a name to uniquely disambiguate it among known names. For example, 'deployment' may -resolve ambiguously, in which case 'use' will fail, while 'deployment' might be +resolve ambiguously, in which case `use` will fail, while 'deployment' might be unique enough to resolve to 'io.ksonnet.pkg.single-port-deployment'. ``` diff --git a/docs/cli-reference/ks_init.md b/docs/cli-reference/ks_init.md index 0fb7dbf7..7613a73a 100644 --- a/docs/cli-reference/ks_init.md +++ b/docs/cli-reference/ks_init.md @@ -5,28 +5,24 @@ Initialize a ksonnet project ### Synopsis -Initialize a ksonnet project in a new directory, 'app-name'. This process +Initialize a ksonnet project in a new directory, `app-name`. This process consists of two steps: 1. Generating ksonnet-lib. Users can set flags to generate the library based on a variety of data, including server configuration and an OpenAPI specification of a Kubernetes build. By default, this is generated from the capabilities of the cluster specified in the cluster of the current context - specified in $KUBECONFIG. + specified in `$KUBECONFIG`. 2. Generating the following tree in the current directory. - app-name/ - .gitignore Default .gitignore; can customize VCS - .ksonnet/ Metadata for ksonnet - envs/ - default/ Default generated environment] - k.libsonnet - k8s.libsonnet - swagger.json - spec.json - components/ Top-level Kubernetes objects defining application - lib/ user-written .libsonnet files - vendor/ mixin libraries, prototypes + app-name/ + .gitignore Default .gitignore; can customize VCS + .ksonnet/ Metadata for ksonnet + environments/ + default/ [Default generated environment] + components/ Top-level Kubernetes objects defining application + lib/ user-written .libsonnet files + vendor/ part libraries, prototypes ``` @@ -36,22 +32,22 @@ ks init <app-name> ### Examples ``` - # Initialize ksonnet application, using the capabilities of live cluster - # specified in the $KUBECONFIG environment variable (specifically: the - # current context) to generate 'ksonnet-lib'. - ks init app-name - - # Initialize ksonnet application, using the OpenAPI specification generated - # in the Kubenetes v1.7.1 build to generate 'ksonnet-lib'. - ks init app-name --api-spec=version:v1.7.1 - - # Initialize ksonnet application, using an OpenAPI specification file - # generated by a build of Kubernetes to generate 'ksonnet-lib'. - ks init app-name --api-spec=file:swagger.json - - # Initialize ksonnet application, using the context 'dev' from the kubeconfig - # file. - ks init app-name --context=dev +# Initialize ksonnet application, using the capabilities of live cluster +# specified in the $KUBECONFIG environment variable (specifically: the +# current context) to generate 'ksonnet-lib'. +ks init app-name + +# Initialize ksonnet application, using the OpenAPI specification generated +# in the Kubenetes v1.7.1 build to generate 'ksonnet-lib'. +ks init app-name --api-spec=version:v1.7.1 + +# Initialize ksonnet application, using an OpenAPI specification file +# generated by a build of Kubernetes to generate 'ksonnet-lib'. +ks init app-name --api-spec=file:swagger.json + +# Initialize ksonnet application, using the context 'dev' from the kubeconfig +# file. +ks init app-name --context=dev ``` ### Options diff --git a/docs/cli-reference/ks_param.md b/docs/cli-reference/ks_param.md index a06aa10b..242a1108 100644 --- a/docs/cli-reference/ks_param.md +++ b/docs/cli-reference/ks_param.md @@ -16,7 +16,8 @@ demands. Environments are ksonnet "named clusters". For more information on environments, run: - ks env --help + + ks env --help ``` diff --git a/docs/cli-reference/ks_param_diff.md b/docs/cli-reference/ks_param_diff.md index b188812d..541721c2 100644 --- a/docs/cli-reference/ks_param_diff.md +++ b/docs/cli-reference/ks_param_diff.md @@ -5,7 +5,7 @@ Display differences between the component parameters of two environments ### Synopsis -"Pretty prints differences between the component parameters of two environments. +Pretty prints differences between the component parameters of two environments. A component flag is accepted to diff against a single component. By default, the diff is performed against all components. @@ -18,11 +18,11 @@ ks param diff <env1> <env2> ### Examples ``` - # Diff between the component parameters on environments 'dev' and 'prod' - ks param diff dev prod +# Diff between the component parameters on environments 'dev' and 'prod' +ks param diff dev prod - # Diff between the component 'guestbook' on environments 'dev' and 'prod' - ks param diff dev prod --component=guestbook +# Diff between the component 'guestbook' on environments 'dev' and 'prod' +ks param diff dev prod --component=guestbook ``` ### Options diff --git a/docs/cli-reference/ks_param_list.md b/docs/cli-reference/ks_param_list.md index 28858775..59e88337 100644 --- a/docs/cli-reference/ks_param_list.md +++ b/docs/cli-reference/ks_param_list.md @@ -5,7 +5,7 @@ List all parameters for a component(s) ### Synopsis -"List all component parameters or environment parameters. +List all component parameters or environment parameters. This command will display all parameters for the component specified. If a component is not specified, parameters for all components will be listed. @@ -20,17 +20,17 @@ ks param list <component-name> ### Examples ``` - # List all component parameters - ks param list +# List all component parameters +ks param list - # List all parameters for the component "guestbook" - ks param list guestbook +# List all parameters for the component "guestbook" +ks param list guestbook - # List all parameters for the environment "dev" - ks param list --env=dev +# List all parameters for the environment "dev" +ks param list --env=dev - # List all parameters for the component "guestbook" in the environment "dev" - ks param list guestbook --env=dev +# List all parameters for the component "guestbook" in the environment "dev" +ks param list guestbook --env=dev ``` ### Options diff --git a/docs/cli-reference/ks_param_set.md b/docs/cli-reference/ks_param_set.md index 7a9e8df1..4a187db0 100644 --- a/docs/cli-reference/ks_param_set.md +++ b/docs/cli-reference/ks_param_set.md @@ -5,13 +5,13 @@ Set component or environment parameters such as replica count or name ### Synopsis -"Set component or environment parameters such as replica count or name. +Set component or environment parameters such as replica count or name. Parameters are set individually, one at a time. If you require customization of more fields, we suggest that you modify your ksonnet project's -'components/params.libsonnet' file directly. Likewise, for greater customization + `components/params.libsonnet` file directly. Likewise, for greater customization of environment parameters, we suggest modifying the -'environments/:name/params.libsonnet' file. + `environments/:name/params.libsonnet` file. ``` @@ -21,12 +21,12 @@ ks param set <component-name> <param-key> <param-value> ### Examples ``` - # Updates the replica count of the 'guestbook' component to 4. - ks param set guestbook replicas 4 +# Updates the replica count of the 'guestbook' component to 4. +ks param set guestbook replicas 4 - # Updates the replica count of the 'guestbook' component to 2 for the environment - # 'dev' - ks param set guestbook replicas 2 --env=dev +# Updates the replica count of the 'guestbook' component to 2 for the environment +# 'dev' +ks param set guestbook replicas 2 --env=dev ``` ### Options diff --git a/docs/cli-reference/ks_pkg_describe.md b/docs/cli-reference/ks_pkg_describe.md index c117f910..514d16a2 100644 --- a/docs/cli-reference/ks_pkg_describe.md +++ b/docs/cli-reference/ks_pkg_describe.md @@ -6,7 +6,7 @@ Describe a ksonnet package Output documentation for some ksonnet registry prototype uniquely identified in - the current ksonnet project by some 'registry-name'. +the current ksonnet project by some 'registry-name'. ``` ks pkg describe [<registry-name>/]<package-name> diff --git a/docs/cli-reference/ks_pkg_install.md b/docs/cli-reference/ks_pkg_install.md index 018b4653..1eddae63 100644 --- a/docs/cli-reference/ks_pkg_install.md +++ b/docs/cli-reference/ks_pkg_install.md @@ -7,29 +7,29 @@ Install a package as a dependency in the current ksonnet application Cache a ksonnet library locally, and make it available for use in the current ksonnet project. This particularly means that we record enough information in -'app.yaml' for new users to retrieve the dependency after a fresh clone of the + `app.yaml` for new users to retrieve the dependency after a fresh clone of the app repository. For example, inside a ksonnet application directory, run: - ks pkg install incubator/nginx@v0.1 + ks pkg install incubator/nginx@v0.1 This can then be referenced in a source file in the ksonnet project: - local nginx = import "kspkg://nginx"; + local nginx = import "kspkg://nginx"; By default, ksonnet knows about two registries: incubator and stable, which are the release channels for official ksonnet libraries. Additional registries can -be added with the 'ks registry' command. +be added with the `ks registry` command. Note that multiple versions of the same ksonnet library can be cached and used -in the same project, by explicitly passing in the '--name' flag. For example: +in the same project, by explicitly passing in the `--name` flag. For example: - ks pkg install incubator/nginx@v0.1 --name nginxv1 - ks pkg install incubator/nginx@v0.2 --name nginxv2 + ks pkg install incubator/nginx@v0.1 --name nginxv1 + ks pkg install incubator/nginx@v0.2 --name nginxv2 -With these commands, a user can 'import "kspkg://nginx1"', and -'import "kspkg://nginx2"' with no conflict. +With these commands, a user can `import "kspkg://nginxv1"` , and + `import "kspkg://nginxv2"` with no conflict. ``` ks pkg install <registry>/<library>@<version> diff --git a/docs/cli-reference/ks_prototype.md b/docs/cli-reference/ks_prototype.md index 9f3962d4..9a369956 100644 --- a/docs/cli-reference/ks_prototype.md +++ b/docs/cli-reference/ks_prototype.md @@ -9,14 +9,14 @@ Manage, inspect, instantiate, and get examples for ksonnet prototypes. Prototypes are Kubernetes app configuration templates with "holes" that can be filled in by (e.g.) the ksonnet CLI tool or a language server. For example, a -prototype for a 'apps.v1beta1.Deployment' might require a name and image, and +prototype for a `apps.v1beta1.Deployment` might require a name and image, and the ksonnet CLI could expand this to a fully-formed 'Deployment' object. Commands: - use Instantiate prototype, filling in parameters from flags, and - emitting the generated code to stdout. - describe Display documentation and details about a prototype - search Search for a prototype + use Instantiate prototype, filling in parameters from flags, and + emitting the generated code to stdout. + describe Display documentation and details about a prototype + search Search for a prototype ``` ks prototype @@ -25,31 +25,31 @@ ks prototype ### Examples ``` - # Display documentation about prototype - # 'io.ksonnet.pkg.prototype.simple-deployment', including: - # - # (1) a description of what gets generated during instantiation - # (2) a list of parameters that are required to be passed in with CLI flags - # - # NOTE: Many subcommands only require the user to specify enough of the - # identifier to disambiguate it among other known prototypes, which is why - # 'simple-deployment' is given as argument instead of the fully-qualified - # name. - ks prototype describe simple-deployment +# Display documentation about prototype +# 'io.ksonnet.pkg.prototype.simple-deployment', including: +# +# (1) a description of what gets generated during instantiation +# (2) a list of parameters that are required to be passed in with CLI flags +# +# NOTE: Many subcommands only require the user to specify enough of the +# identifier to disambiguate it among other known prototypes, which is why +# 'simple-deployment' is given as argument instead of the fully-qualified +# name. +ks prototype describe simple-deployment - # Instantiate prototype 'io.ksonnet.pkg.prototype.simple-deployment', using - # the 'nginx' image, and port 80 exposed. - # - # SEE ALSO: Note above for a description of why this subcommand can take - # 'simple-deployment' instead of the fully-qualified prototype name. - ks prototype use simple-deployment \ - --name=nginx \ - --image=nginx \ - --port=80 \ - --portName=http +# Instantiate prototype 'io.ksonnet.pkg.prototype.simple-deployment', using +# the 'nginx' image, and port 80 exposed. +# +# SEE ALSO: Note above for a description of why this subcommand can take +# 'simple-deployment' instead of the fully-qualified prototype name. +ks prototype use simple-deployment \ + --name=nginx \ + --image=nginx \ + --port=80 \ + --portName=http - # Search known prototype metadata for the string 'deployment'. - ks prototype search deployment +# Search known prototype metadata for the string 'deployment'. +ks prototype search deployment ``` ### Options inherited from parent commands diff --git a/docs/cli-reference/ks_prototype_describe.md b/docs/cli-reference/ks_prototype_describe.md index dd4e0bb9..46f5af98 100644 --- a/docs/cli-reference/ks_prototype_describe.md +++ b/docs/cli-reference/ks_prototype_describe.md @@ -6,13 +6,13 @@ Describe a ksonnet prototype Output documentation, examples, and other information for some ksonnet -prototype uniquely identified by some (possibly partial) 'prototype-name'. This +prototype uniquely identified by some (possibly partial) `prototype-name`. This includes: - (1) a description of what gets generated during instantiation - (2) a list of parameters that are required to be passed in with CLI flags + 1. a description of what gets generated during instantiation + 2. a list of parameters that are required to be passed in with CLI flags -'prototype-name' need only contain enough of the suffix of a name to uniquely +`prototype-name` need only contain enough of the suffix of a name to uniquely disambiguate it among known names. For example, 'deployment' may resolve ambiguously, in which case 'use' will fail, while 'simple-deployment' might be unique enough to resolve to 'io.ksonnet.pkg.prototype.simple-deployment'. @@ -24,16 +24,16 @@ ks prototype describe <prototype-name> ### Examples ``` - # Display documentation about prototype, including: - ks prototype describe io.ksonnet.pkg.prototype.simple-deployment - - # Display documentation about prototype using a unique suffix of an - # identifier. That is, this command only requires a long enough suffix to - # uniquely identify a ksonnet prototype. In this example, the suffix - # 'simple-deployment' is enough to uniquely identify - # 'io.ksonnet.pkg.prototype.simple-deployment', but 'deployment' might not - # be, as several names end with that suffix. - ks prototype describe simple-deployment +# Display documentation about prototype, including: +ks prototype describe io.ksonnet.pkg.prototype.simple-deployment + +# Display documentation about prototype using a unique suffix of an +# identifier. That is, this command only requires a long enough suffix to +# uniquely identify a ksonnet prototype. In this example, the suffix +# 'simple-deployment' is enough to uniquely identify +# 'io.ksonnet.pkg.prototype.simple-deployment', but 'deployment' might not +# be, as several names end with that suffix. +ks prototype describe simple-deployment ``` ### Options inherited from parent commands diff --git a/docs/cli-reference/ks_prototype_preview.md b/docs/cli-reference/ks_prototype_preview.md index 69b124fc..2cecec55 100644 --- a/docs/cli-reference/ks_prototype_preview.md +++ b/docs/cli-reference/ks_prototype_preview.md @@ -6,12 +6,12 @@ Expand prototype, emitting the generated code to stdout Expand prototype uniquely identified by (possibly partial) -'prototype-name', filling in parameters from flags, and emitting the generated + `prototype-name` , filling in parameters from flags, and emitting the generated code to stdout. -Note also that 'prototype-name' need only contain enough of the suffix of a name +Note also that `prototype-name` need only contain enough of the suffix of a name to uniquely disambiguate it among known names. For example, 'deployment' may -resolve ambiguously, in which case 'use' will fail, while 'deployment' might be +resolve ambiguously, in which case `use` will fail, while 'deployment' might be unique enough to resolve to 'io.ksonnet.pkg.single-port-deployment'. ``` @@ -21,17 +21,17 @@ ks prototype preview <prototype-name> [type] [parameter-flags] ### Examples ``` - # Preview prototype 'io.ksonnet.pkg.single-port-deployment', using the - # 'nginx' image, and port 80 exposed. - ks prototype preview io.ksonnet.pkg.prototype.simple-deployment \ - --name=nginx \ - --image=nginx - - # Preview prototype using a unique suffix of an identifier. See - # introduction of help message for more information on how this works. - ks prototype preview simple-deployment \ - --name=nginx \ - --image=nginx +# Preview prototype 'io.ksonnet.pkg.single-port-deployment', using the +# 'nginx' image, and port 80 exposed. +ks prototype preview io.ksonnet.pkg.prototype.simple-deployment \ + --name=nginx \ + --image=nginx + +# Preview prototype using a unique suffix of an identifier. See +# introduction of help message for more information on how this works. +ks prototype preview simple-deployment \ + --name=nginx \ + --image=nginx ``` ### Options inherited from parent commands diff --git a/docs/cli-reference/ks_prototype_search.md b/docs/cli-reference/ks_prototype_search.md index feeee7f2..a679d931 100644 --- a/docs/cli-reference/ks_prototype_search.md +++ b/docs/cli-reference/ks_prototype_search.md @@ -5,7 +5,7 @@ Search for a ksonnet prototype ### Synopsis -Search ksonnet for prototypes whose names contain 'name-substring'. +Search ksonnet for prototypes whose names contain `name-substring` . ``` ks prototype search <name-substring> @@ -14,8 +14,8 @@ ks prototype search <name-substring> ### Examples ``` - # Search known prototype metadata for the string 'deployment'. - ks prototype search deployment +# Search known prototype metadata for the string 'deployment'. +ks prototype search deployment ``` ### Options inherited from parent commands diff --git a/docs/cli-reference/ks_prototype_use.md b/docs/cli-reference/ks_prototype_use.md index fe31d796..609a5ec5 100644 --- a/docs/cli-reference/ks_prototype_use.md +++ b/docs/cli-reference/ks_prototype_use.md @@ -5,20 +5,20 @@ Expand prototype, place in components/ directory of ksonnet app ### Synopsis -Expand prototype uniquely identified by (possibly partial) 'prototype-name', +Expand prototype uniquely identified by (possibly partial) `prototype-name` , filling in parameters from flags, and placing it into the file -'components/componentName', with the appropriate extension set. For example, the + `components/componentName` , with the appropriate extension set. For example, the following command will expand template 'io.ksonnet.pkg.single-port-deployment' -and place it in the file 'components/nginx-depl.jsonnet' (since by default +and place it in the file `components/nginx-depl.jsonnet` (since by default ksonnet will expand templates as Jsonnet). - ks prototype use io.ksonnet.pkg.single-port-deployment nginx-depl \ - --name=nginx \ - --image=nginx + ks prototype use io.ksonnet.pkg.single-port-deployment nginx-depl \ + --name=nginx \ + --image=nginx -Note also that 'prototype-name' need only contain enough of the suffix of a name +Note also that `prototype-name` need only contain enough of the suffix of a name to uniquely disambiguate it among known names. For example, 'deployment' may -resolve ambiguously, in which case 'use' will fail, while 'deployment' might be +resolve ambiguously, in which case `use` will fail, while 'deployment' might be unique enough to resolve to 'io.ksonnet.pkg.single-port-deployment'. ``` @@ -28,21 +28,21 @@ ks prototype use <prototype-name> <componentName> [type] [parameter-flags] ### Examples ``` - # Instantiate prototype 'io.ksonnet.pkg.single-port-deployment', using the - # 'nginx' image. The expanded prototype is placed in - # 'components/nginx-depl.jsonnet'. - ks prototype use io.ksonnet.pkg.prototype.simple-deployment nginx-depl \ - --name=nginx \ - --image=nginx - - # Instantiate prototype 'io.ksonnet.pkg.single-port-deployment' using the - # unique suffix, 'deployment'. The expanded prototype is again placed in - # 'components/nginx-depl.jsonnet'. See introduction of help message for more - # information on how this works. Note that if you have imported another - # prototype with this suffix, this may resolve ambiguously for you. - ks prototype use deployment nginx-depl \ - --name=nginx \ - --image=nginx +# Instantiate prototype 'io.ksonnet.pkg.single-port-deployment', using the +# 'nginx' image. The expanded prototype is placed in +# 'components/nginx-depl.jsonnet'. +ks prototype use io.ksonnet.pkg.prototype.simple-deployment nginx-depl \ + --name=nginx \ + --image=nginx + +# Instantiate prototype 'io.ksonnet.pkg.single-port-deployment' using the +# unique suffix, 'deployment'. The expanded prototype is again placed in +# 'components/nginx-depl.jsonnet'. See introduction of help message for more +# information on how this works. Note that if you have imported another +# prototype with this suffix, this may resolve ambiguously for you. +ks prototype use deployment nginx-depl \ + --name=nginx \ + --image=nginx ``` ### Options inherited from parent commands diff --git a/docs/cli-reference/ks_registry.md b/docs/cli-reference/ks_registry.md index 20a7a063..58a1a241 100644 --- a/docs/cli-reference/ks_registry.md +++ b/docs/cli-reference/ks_registry.md @@ -32,5 +32,5 @@ ks registry ### SEE ALSO * [ks](ks.md) - Synchronise Kubernetes resources with config files * [ks registry describe](ks_registry_describe.md) - Describe a ksonnet registry -* [ks registry list](ks_registry_list.md) - List all registries known to current ksonnet app +* [ks registry list](ks_registry_list.md) - List all registries known to the current ksonnet app. diff --git a/docs/cli-reference/ks_registry_describe.md b/docs/cli-reference/ks_registry_describe.md index f037452c..a822f6b7 100644 --- a/docs/cli-reference/ks_registry_describe.md +++ b/docs/cli-reference/ks_registry_describe.md @@ -6,7 +6,7 @@ Describe a ksonnet registry Output documentation for some ksonnet registry prototype uniquely identified in -the current ksonnet project by some 'registry-name'. +the current ksonnet project by some `registry-name`. ``` ks registry describe <registry-name> diff --git a/docs/cli-reference/ks_registry_list.md b/docs/cli-reference/ks_registry_list.md index 6c54bf41..75e9e2d4 100644 --- a/docs/cli-reference/ks_registry_list.md +++ b/docs/cli-reference/ks_registry_list.md @@ -1,11 +1,11 @@ ## ks registry list -List all registries known to current ksonnet app +List all registries known to the current ksonnet app. ### Synopsis -List all registries known to current ksonnet app +List all registries known to the current ksonnet app. ``` ks registry list diff --git a/docs/cli-reference/ks_validate.md b/docs/cli-reference/ks_validate.md index 8932f3ae..272397c9 100644 --- a/docs/cli-reference/ks_validate.md +++ b/docs/cli-reference/ks_validate.md @@ -18,21 +18,21 @@ ks validate [env-name] [-f <file-or-dir>] ### Examples ``` - # Validate all resources described in a ksonnet application, expanding - # ksonnet code with 'dev' environment where necessary (i.e., not YAML, JSON, - # or non-ksonnet Jsonnet code). - ksonnet validate dev +# Validate all resources described in a ksonnet application, expanding +# ksonnet code with 'dev' environment where necessary (i.e., not YAML, JSON, +# or non-ksonnet Jsonnet code). +ksonnet validate dev - # Validate resources described in a YAML file. - ksonnet validate -f ./pod.yaml +# Validate resources described in a YAML file. +ksonnet validate -f ./pod.yaml - # Validate resources described in the JSON file against existing resources - # in the cluster the 'dev' environment is pointing at. - ksonnet validate dev -f ./pod.yaml +# Validate resources described in the JSON file against existing resources +# in the cluster the 'dev' environment is pointing at. +ksonnet validate dev -f ./pod.yaml - # Validate resources described in a Jsonnet file. Does not expand using - # environment bindings. - ksonnet validate -f ./pod.jsonnet +# Validate resources described in a Jsonnet file. Does not expand using +# environment bindings. +ksonnet validate -f ./pod.jsonnet ``` ### Options -- GitLab