Config
Config
Section titled “Config”The kubernetes_config
resource allows Kubernetes configuraton to be applied to a kubernetes_cluster
.
You can specify a list of paths or individual files and health checks for the resources.
A kubernetes_config
only completes once the configuration has been successfully applied and any health checks have passed.
This allows you to create complex dependencies for your applications.
The system monitors changes to the config defined in the paths property and automatically recreates this resource when the
configuration is applied.
resource "kubernetes_config" "name" { ...}
Attributes
Section titled “Attributes”Attribute | Description |
---|---|
Cluster | The reference to a cluster to apply the jobs to.
|
Paths | Paths to the Kubernetes config files to apply to the cluster.
|
WaitUntilReady | Determines if the resource waits until all config defined in the paths has been accepted and started by the server.
|
HealthCheck | Optional health check to perform after the jobs have been applied, this resource will not complete until the health
|
timeout = ”60s” | |
pods = [ |
"component=server,app=consul","component=client,app=consul"
] } |
Computed Attributes
Section titled “Computed Attributes”These attributes are computed when the config is parsed and applied, and are
therefore only known at parsetime or runtime.
Attribute | Description |
---|---|
Meta ID | The full ID of the resource e.g.
|
resource “container” “ubuntu” { | |
… | |
} |
// the resulting id will be resource.container.ubuntu | |
Meta Type meta.type
string
The type of the resource.
This taken from the type label of the resource definition.
| |// given the following resource resource “container” “ubuntu” { … }
// the resulting type will be container
Meta Name meta.name
string
The name of the resource.
This taken from the name label of the resource definition.
|// given the following resource resource “container” “ubuntu” { … }
// the resulting name will be ubuntu
\
HealthCheckKubernetes
Section titled “HealthCheckKubernetes”A health_check
stanza allows the definition of a health check which must pass before the resource is marked as successfully created.
health_check { ...}
Attributes
Section titled “Attributes”Attribute | Description |
---|---|
Timeout | The maximum duration to wait before marking the health check as failed.
|
Pods | An array of kubernetes selector syntax.
|
Computed Attributes
Section titled “Computed Attributes”These attributes are computed when the config is parsed and applied, and are
therefore only known at parsetime or runtime.