Browse Source

Add documentation for namespace

Fixes: #416
pull/465/head
Ryan Nowak 6 years ago
committed by Justin Kotalik
parent
commit
baf3e55daf
  1. 14
      docs/reference/commandline/tye-deploy.md
  2. 14
      docs/reference/commandline/tye-undeploy.md
  3. 9
      docs/reference/schema.md
  4. 4
      src/schema/tye-schema.json

14
docs/reference/commandline/tye-deploy.md

@ -7,7 +7,7 @@
## Synopsis
```text
tye deploy [-?|-h|--help] [-i|--interactive] [-v|--verbosity <Debug|Info|Quiet>] [-f|--force] [<PATH>]
tye deploy [-?|-h|--help] [-i|--interactive] [-n|--namespace <n>] [-v|--verbosity <Debug|Info|Quiet>] [-f|--force] [<PATH>]
```
## Description
@ -19,7 +19,13 @@ The `tye deploy` command will deploy an application to Kubernetes. `tye deploy`
- Generate a Kubernetes Deployment and Service for each project.
- Apply the generated Deployment and Service to your current Kubernetes context.
`tye deploy` operates in the current Kubernetes namespace. Use `kubectl config view --minify --output 'jsonpath={..namespace}'` to view the current namespace.
`tye deploy` chooses the Kubernetes namespace to operate in according to the following priority:
- The value of `--namespace` passed at the command line
- The value of `namespace` configured in `tye.yaml` (if present)
- The Kubernetes namespace for the current context
> :bulb: Use `kubectl config view --minify --output 'jsonpath={..namespace}'` to view the current namespace.
## Arguments
@ -39,6 +45,10 @@ If a directory path is specified, `tye deploy` will default to using these files
Does an interactive deployment that will accept input for values that are required by default.
- `-n|--namespace`
Specifies the Kubernetes namespace for deployment. Overrides a namespace value set in `tye.yaml`.
- `-v|--verbosity <Debug|Info|Quiet>`
The verbosity of logs emitted by `tye deploy`. Defaults to Info.

14
docs/reference/commandline/tye-undeploy.md

@ -7,7 +7,7 @@
## Synopsis
```text
tye undeploy [-?|-h|--help] [-i|--interactive] [-v|--verbosity <Debug|Info|Quiet>] [--what-if] [<PATH>]
tye undeploy [-?|-h|--help] [-i|--interactive] [-n|--namespace <n>] [-v|--verbosity <Debug|Info|Quiet>] [--what-if] [<PATH>]
```
## Description
@ -19,7 +19,13 @@ The `tye undeploy` command will delete a deployed application from Kubernetes. `
- Offer a choice to delete each resource (interactive)
- Delete each resource (if applicable)
`tye undeploy` operates in the current Kubernetes namespace. Use `kubectl config view --minify --output 'jsonpath={..namespace}'` to view the current namespace.
`tye undeploy` chooses the Kubernetes namespace to operate in according to the following priority:
- The value of `--namespace` passed at the command line
- The value of `namespace` configured in `tye.yaml` (if present)
- The Kubernetes namespace for the current context
> :bulb: Use `kubectl config view --minify --output 'jsonpath={..namespace}'` to view the current namespace.
Undeploy decides which resources to delete based on the `app.kubernetes.io/part-of=...` label. This label will be set to the application name for all resources created by Tye. `tye undeploy` does not rely on the list of services in `tye.yaml` or a solution file.
@ -41,6 +47,10 @@ If a directory path is specified, `tye undeploy` will default to using these fil
Does an interactive undeploy that will prompt for deletion of each resource.
- `-n|--namespace`
Specifies the Kubernetes namespace for deployment. Overrides a namespace value set in `tye.yaml`.
- `-v|--verbosity <Debug|Info|Quiet>`
The verbosity of logs emitted by `tye undeploy`. Defaults to Info.

9
docs/reference/schema.md

@ -46,6 +46,7 @@ services:
```yaml
name: myapplication
registry: exampleuser
namespace: examplenamespace
services:
```
@ -68,6 +69,14 @@ The registry could be a DockerHub username (`exampleuser`) or the hostname of a
If this is not specified in configuration, interactive deployments will prompt for it.
#### `namespace` (string)
Allows configuring the Kubernetes namespace used by commands that operate on Kubernetes. If unconfigured, Tye will use the namespace of the current Kubernetes context.
The namespace specified in `tye.yaml` can be overridden at the command line.
> :bulb: Use `kubectl config view --minify --output 'jsonpath={..namespace}'` to view the current namespace.
#### `services` (`Service[]`) *required*
Specifies the list of services. Applications must have at least one service.

4
src/schema/tye-schema.json

@ -13,6 +13,10 @@
"description": "Dockerhub username or hostname of remote registry. Used for tagging images.",
"type": "string"
},
"namespace": {
"description": "The Kubernetes namespace to use.",
"type": "string"
},
"services": {
"description": "The application's services.",
"type": "array",

Loading…
Cancel
Save