Skip to content

Commit

Permalink
docs: fix missing reference for container provider
Browse files Browse the repository at this point in the history
  • Loading branch information
edvald committed Aug 24, 2020
1 parent a9c781e commit f322937
Show file tree
Hide file tree
Showing 5 changed files with 80 additions and 5 deletions.
6 changes: 1 addition & 5 deletions core/src/docs/generate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ export async function writeConfigReferenceDocs(docsRoot: string) {
{ name: "conftest" },
{ name: "conftest-container" },
{ name: "conftest-kubernetes" },
{ name: "container" },
{ name: "exec" },
{ name: "hadolint" },
{ name: "kubernetes" },
Expand All @@ -78,11 +79,6 @@ export async function writeConfigReferenceDocs(docsRoot: string) {
for (const plugin of plugins) {
const name = plugin.name

// Currently nothing to document for these
if (name === "container") {
continue
}

const path = resolve(providerDir, `${name}.md`)
console.log("->", path)
writeFileSync(path, renderProviderReference(name, plugin, pluginsByName))
Expand Down
4 changes: 4 additions & 0 deletions core/src/plugins/container/container.ts
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,10 @@ async function suggestModules({ name, path }: SuggestModulesParams): Promise<Sug

export const gardenPlugin = createGardenPlugin({
name: "container",
docs: dedent`
Provides the [container](${getModuleTypeUrl("container")}) module type.
_Note that this provider is currently automatically included, and you do not need to configure it in your project configuration._
`,
createModuleTypes: [
{
name: "container",
Expand Down
1 change: 1 addition & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
* [`conftest-container`](./reference/providers/conftest-container.md)
* [`conftest-kubernetes`](./reference/providers/conftest-kubernetes.md)
* [`conftest`](./reference/providers/conftest.md)
* [`container`](./reference/providers/container.md)
* [`exec`](./reference/providers/exec.md)
* [`hadolint`](./reference/providers/hadolint.md)
* [`kubernetes`](./reference/providers/kubernetes.md)
Expand Down
1 change: 1 addition & 0 deletions docs/reference/providers/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ title: Providers
# Providers

* [`conftest`](./conftest.md)
* [`container`](./container.md)
* [`conftest-container`](./conftest-container.md)
* [`kubernetes`](./kubernetes.md)
* [`conftest-kubernetes`](./conftest-kubernetes.md)
Expand Down
73 changes: 73 additions & 0 deletions docs/reference/providers/container.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
---
title: "`container` Provider"
tocTitle: "`container`"
---

# `container` Provider

## Description

Provides the [container](https://docs.garden.io/reference/module-types/container) module type.
_Note that this provider is currently automatically included, and you do not need to configure it in your project configuration._

Below is the full schema reference for the provider configuration. For an introduction to configuring a Garden project with providers, please look at our [configuration guide](../../using-garden/configuration-overview.md).

The reference is divided into two sections. The [first section](#complete-yaml-schema) contains the complete YAML schema, and the [second section](#configuration-keys) describes each schema key.

## Complete YAML Schema

The values in the schema below are the default values.

```yaml
providers:
- # The name of the provider plugin to use.
name:

# If specified, this provider will only be used in the listed environments. Note that an empty array effectively
# disables the provider. To use a provider in all environments, omit this field.
environments:
```
## Configuration Keys
### `providers[]`

| Type | Default | Required |
| --------------- | ------- | -------- |
| `array[object]` | `[]` | No |

### `providers[].name`

[providers](#providers) > name

The name of the provider plugin to use.

| Type | Required |
| -------- | -------- |
| `string` | Yes |

Example:

```yaml
providers:
- name: "local-kubernetes"
```

### `providers[].environments[]`

[providers](#providers) > environments

If specified, this provider will only be used in the listed environments. Note that an empty array effectively disables the provider. To use a provider in all environments, omit this field.

| Type | Required |
| --------------- | -------- |
| `array[string]` | No |

Example:

```yaml
providers:
- environments:
- dev
- stage
```

0 comments on commit f322937

Please sign in to comment.