Local Kubernetes

Below is the schema reference for the local-kubernetes provider. For an introduction to configuring a Garden project with providers, please look at our configuration guide.

The reference is divided into two sections. The first section lists and describes the available schema keys. The second section contains the complete YAML schema.

Configuration keys

apiVersion

The schema version of this project's config (currently not used).

Type

Required

Allowed Values

string

Yes

"garden.io/v0"

kind

Type

Required

Allowed Values

string

Yes

"Project"

name

The name of the project.

Type

Required

string

Yes

Example:

name: "my-sweet-project"

defaultEnvironment

The default environment to use when calling commands without the --env parameter.

Type

Required

string

No

environmentDefaults

Default environment settings. These are inherited (but can be overridden) by each configured environment.

Type

Required

object

No

Example:

environmentDefaults:
providers: []
variables: {}

environmentDefaults.providers[]

environmentDefaults > providers

A list of providers that should be used for this environment, and their configuration. Please refer to individual plugins/providers for details on how to configure them.

Type

Required

array[object]

No

environmentDefaults.providers[].name

environmentDefaults > providers > name

The name of the provider plugin to use.

Type

Required

string

Yes

Example:

environmentDefaults:
providers: []
variables: {}
...
providers:
- name: "local-kubernetes"

environmentDefaults.variables

environmentDefaults > variables

A key/value map of variables that modules can reference when using this environment.

Type

Required

object

No

sources

A list of remote sources to import into project.

Type

Required

array[object]

No

sources[].name

sources > name

The name of the source to import

Type

Required

string

Yes

sources[].repositoryUrl

sources > repositoryUrl

A remote repository URL. Currently only supports git servers. Must contain a hash suffix pointing to a specific branch or tag, with the format: #

Type

Required

string

Yes

Example:

sources:
- repositoryUrl: "git+https://github.com/org/repo.git#v2.0"

environments

Type

Required

array[object]

No

environments[].providers[]

environments > providers

Type

Required

array[object]

No

environments[].providers[].defaultHostname

environments > providers > defaultHostname

A default hostname to use when no hostname is explicitly configured for a service.

Type

Required

string

No

Example:

environments:
- providers:
- defaultHostname: "api.mydomain.com"

environments[].providers[].defaultUsername

environments > providers > defaultUsername

Set a default username (used for namespacing within a cluster).

Type

Required

string

No

environments[].providers[].forceSsl

environments > providers > forceSsl

Require SSL on all services. If set to true, an error is raised when no certificate is available for a configured hostname.

Type

Required

boolean

No

environments[].providers[].imagePullSecrets[]

environments > providers > imagePullSecrets

References to docker-registry secrets to use for authenticating with remote registries when pulling images. This is necessary if you reference private images in your module configuration, and is required when configuring a remote Kubernetes environment.

Type

Required

array[object]

No

environments[].providers[].imagePullSecrets[].name

environments > providers > imagePullSecrets > name

The name of the Kubernetes secret.

Type

Required

string

Yes

Example:

environments:
- providers:
- imagePullSecrets:
- name: "my-secret"

environments[].providers[].imagePullSecrets[].namespace

environments > providers > imagePullSecrets > namespace

The namespace where the secret is stored. If necessary, the secret may be copied to the appropriate namespace before use.

Type

Required

string

No

environments[].providers[].tlsCertificates[]

environments > providers > tlsCertificates

One or more certificates to use for ingress.

Type

Required

array[object]

No

environments[].providers[].tlsCertificates[].name

environments > providers > tlsCertificates > name

A unique identifier for this certificate.

Type

Required

string

Yes

Example:

environments:
- providers:
- tlsCertificates:
- name: "wildcard"

environments[].providers[].tlsCertificates[].hostnames[]

environments > providers > tlsCertificates > hostnames

A list of hostnames that this certificate should be used for. If you don't specify these, they will be automatically read from the certificate.

Type

Required

array[string]

No

Example:

environments:
- providers:
- tlsCertificates:
- hostnames:
- www.mydomain.com

environments[].providers[].tlsCertificates[].secretRef

environments > providers > tlsCertificates > secretRef

A reference to the Kubernetes secret that contains the TLS certificate and key for the domain.

Type

Required

object

No

Example:

environments:
- providers:
- tlsCertificates:
- secretRef:
name: my-tls-secret
namespace: default

environments[].providers[].tlsCertificates[].secretRef.name

environments > providers > tlsCertificates > secretRef > name

The name of the Kubernetes secret.

Type

Required

string

Yes

Example:

environments:
- providers:
- tlsCertificates:
- secretRef:
name: my-tls-secret
namespace: default
...
name: "my-secret"

environments[].providers[].tlsCertificates[].secretRef.namespace

environments > providers > tlsCertificates > secretRef > namespace

The namespace where the secret is stored. If necessary, the secret may be copied to the appropriate namespace before use.

Type

Required

string

No

environments[].providers[].name

environments > providers > name

The name of the provider plugin to use.

Type

Required

string

Yes

Example:

environments:
- providers:
- name: "local-kubernetes"

environments[].providers[].context

environments > providers > context

The kubectl context to use to connect to the Kubernetes cluster.

Type

Required

string

No

Example:

environments:
- providers:
- context: "my-dev-context"

environments[].providers[].namespace

environments > providers > namespace

Specify which namespace to deploy services to (defaults to the project name). Note that the framework generates other namespaces as well with this name as a prefix.

Type

Required

string

No

environments[].providers[].setupIngressController

environments > providers > setupIngressController

Set this to null or false to skip installing/enabling the nginx ingress controller.

Type

Required

string

No

Complete YAML schema

apiVersion: garden.io/v0
kind: Project
name:
defaultEnvironment: ''
environmentDefaults:
providers:
- name:
variables: {}
sources:
- name:
repositoryUrl:
environments:
- providers:
- defaultHostname:
defaultUsername:
forceSsl: false
imagePullSecrets:
- name:
namespace: default
tlsCertificates:
- name:
hostnames:
secretRef:
name:
namespace: default
name: local-kubernetes
context:
namespace:
setupIngressController: nginx