Instruqt Labs (beta)
  • Instruqt
  • Getting started
    • Setting up Version Control
    • Install Instruqt CLI
    • Creating your first lab
    • Configuration basics
    • Exploring the lab configuration
    • Adding your first chapter
    • Configuring sandboxes
    • Adding quizzes
    • Adding tasks and gating content
    • Finishing up
  • Documentation
    • Writing Lab Content
      • Project Structure
      • Markdown and Components
    • Integrations
      • Version Control
    • Lab reference
      • Content
        • Lab
        • Page
        • Activities
          • Task
          • Quiz
            • Multiple Choice
            • Single Choice
            • Text Answer
            • Numeric Answer
        • Layout
        • Tabs
          • Terminal
          • Service
          • Editor
          • External Website
          • Note
      • Sandbox
        • Containers
          • Container
          • Sidecar Container
        • Kubernetes
          • Cluster
          • Config
          • Helm
        • Nomad
          • Cluster
          • Job
        • Networking
          • Network
          • Ingress
        • Cloud Accounts
          • AWS
          • Azure
          • Google Cloud
        • Terraform
        • Template
        • Exec
        • Copy
        • Certificates
          • Root
          • Leaf
        • Random
          • Number
          • ID
          • UUID
          • Password
          • Creature
      • Functions
    • Tools
      • Instruqt CLI
    • Glossary
Powered by GitBook
On this page
  • Helm
  • HelmRepository
  • HealthCheckKubernetes
Edit on GitHub
Export as PDF
  1. Documentation
  2. Lab reference
  3. Sandbox
  4. Kubernetes

Helm

Helm

The helm resource allows Helm charts to be provisioned to k8s_cluster resources.


resource "helm" "name" {
  ...
}

Attributes

Attribute
Description

Chart chart required type: string

The name of the chart within the repository, or a souce such as a git repository, URL, or file path where the chart file exist.

A reference to a kubernetes clusters to apply the chart to. The system waits until the referenced cluster is healthy before attempting t apply any charts.

ValuesString values_string type: map[string]string

Map containing helm values to apply with the chart.

Version version type: string

Semver of the chart to install, only used when `repository` is specified.

Values values type: string

File path to a valid Helm values file to be used when applying the config.

The details for the Helm chart repository where the chart exists. If this property is not specifed, the chart location is assumed to be either a local directory or Git reference.

Namespace namespace type: string

Kubernetes namespace to apply the chart to.

CreateNamespace create_namespace type: bool

If the namespace does not exist, should the helm resource attempt to create it.

SkipCRDs skip_crds type: bool

If the chart defines custom resource definitions, should these be ignored.

Retry retry type: int

Enables the ability to retry the installation of a chart.

Timeout timeout type: string

Maximum time the application phase of a chart can run before failing. This duration is different to the health_check that runs after a chart has been applied.

Health check to run after installing the chart.

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 meta.id string

The full ID of the resource e.g. `resource.type.name`. This is computed from the full resource path:

Meta Type meta.type string

The type of the resource. This taken from the type label of the resource definition.

Meta Name meta.name string

The name of the resource. This taken from the name label of the resource definition.


HelmRepository

A helm_repository stanza defines the details for a remote helm repository.


helm_repository {
  ...
}

Attributes

Attribute
Description

Name name required type: string

The name of the repository.

URL url required type: string

The repository URL.

Computed Attributes

These attributes are computed when the config is parsed and applied, and are therefore only known at parsetime or runtime.


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

Attribute
Description

Timeout timeout required type: string

The maximum duration to wait before marking the health check as failed. Expressed as a Go duration, e.g. `1s` = 1 second, `100ms` = 100 milliseconds.

Pods pods required type: []string

An array of kubernetes selector syntax. The healthcheck ensures that all containers defined by the selector are running before passing the healthcheck.

Computed Attributes

These attributes are computed when the config is parsed and applied, and are therefore only known at parsetime or runtime.

PreviousConfigNextNomad

Last updated 1 month ago

Cluster cluster required type: Reference to

Repository repository type: block

HealthCheck health_check type: block

chart   = "hashicorp/vault"
cluster = resource.k8s_cluster.k3s
values_string = {
  "global.storage" = "128Mb"
}
version = "v0.18.0"
values = "./values.yaml"
repository {
  name = "hashicorp"
  url  = "https://helm.releases.hashicorp.com"
}
namespace = "default"
create_namespace = true
skip_crds = true
retry = 3
timeout = "60s"
health_check {
  pods = ["app.kubernetes.io/name=vault"]
}
// given the following resource
resource "container" "ubuntu" {
  ...
}

// the resulting id will be
resource.container.ubuntu
// given the following resource
resource "container" "ubuntu" {
  ...
}

// the resulting type will be
container
// given the following resource
resource "container" "ubuntu" {
  ...
}

// the resulting name will be
ubuntu
name = "hashicorp"
url  = "https://helm.releases.hashicorp.com"
timeout = "60s"
pods = ["app.kubernetes.io/name=vault"]
Cluster
HelmRepository
HealthCheckKubernetes