# openbao

OpenBao, a secrets manager, on integrated Raft storage with Kubernetes auth

This page is generated from [`kix/packages/experimental/openbao`](https://github.com/kix-run/kix/tree/main/kix/packages/experimental/openbao).

| | |
| --- | --- |
| Stability | Experimental |
| `package` value | `packages.experimental.openbao` |
| Default software version | `2.7.3` |
| Default aliases | `openbao` |

## Dependencies

Kix matches each dependency below to another package instance by instance name, alias, or role. To bind a specific instance, set [`deps.<name>`](/docs/reference/instances-and-composition/#deps) in your cluster definition. See [Declaring dependencies](/docs/reference/package-anatomy/#declaring-dependencies) for how required and optional dependencies work.

| Dependency | Requirement |
| --- | --- |
| `certManager` | Required |
| `prometheus` | Optional |
| `storageClasses` | Optional |
| `unsealKey` | Optional |

## Options

### `env`

Extra environment variables of the server container. The addresses, Raft, and seal variables are set by the package.

- **Type:** ``attribute set of (null or string or env var source with `valueFrom`)``
- **Default:** `{ }`

### `image`

Image of the server and of the reconcile Job, which runs its `bao` CLI.

- **Type:** `submodule`
- **Default:**

  ```nix
  {
    digest = "sha256:ba4b133eb9586630024e71a617e66f37f29cc3534cdd46a6233e098ceded8dc9";
    pullPolicy = "IfNotPresent";
    repository = "quay.io/openbao/openbao";
    tag = "2.7.3";
  }
  ```

### `image.digest`

Resolved manifest digest, `sha256:` followed by 64 hex characters. What will actually run. Null means not resolved.

- **Type:** `null or string`
- **Default:** the package's digest while `tag` is the package's tag, otherwise null

### `image.note`

Whatever a person wanted to say about this pin. Kix never reads it and a promotion never discards it. Declared here for the same reason as the three fields above: a pin carries its own record-keeping, and the option accepts the whole pin rather than a subset of it.

- **Type:** `null or string`
- **Default:** `null`

### `image.promotedBy`

Who resolved this pin, for the record. Null when unknown.

- **Type:** `null or string`
- **Default:** `null`

### `image.pullPolicy`

imagePullPolicy for containers using this image. Null leaves it to Kubernetes.

- **Type:** `null or string`
- **Default:** `"IfNotPresent"`

### `image.repository`

Image repository, registry host included.

- **Type:** `string`
- **Default:** `"quay.io/openbao/openbao"`

### `image.resolvedAt`

When this pin was resolved, RFC 3339. Null when unknown.

- **Type:** `null or string`
- **Default:** `null`

### `image.sourceRev`

Revision of the source the image was built from, when Kix built it. Null for upstream images.

- **Type:** `null or string`
- **Default:** `null`

### `image.tag`

Image tag. What was asked for.

- **Type:** `string`
- **Default:** `"2.7.3"`

### `kubernetesAuth.roles`

Roles of the Kubernetes auth method at `auth/kubernetes`, by name, as the body of `auth/kubernetes/role/<name>`, written by the reconcile Job. `kix-reconcile` is refused. A role removed here stays in OpenBao, and the Job's log lists it.

- **Type:** `attribute set of (open submodule of attribute set of anything)`
- **Default:** `{ }`
- **Example:**

  ```nix
  {
    external-secrets = {
      bound_service_account_names = [
        "app-store"
      ];
      bound_service_account_namespaces = [
        "app"
      ];
      token_policies = [
        "app-read"
      ];
    };
  }
  ```

### `kubernetesAuth.roles.<name>.bound_service_account_names`

ServiceAccounts that may log in with this role; `*` allows any.

- **Type:** `non-empty (list of non-empty string)`
- **Example:**

  ```nix
  [
    "external-secrets"
  ]
  ```

### `kubernetesAuth.roles.<name>.bound_service_account_namespaces`

Namespaces of those ServiceAccounts; `*` allows any.

- **Type:** `non-empty (list of non-empty string)`
- **Example:**

  ```nix
  [
    "app"
  ]
  ```

### `kubernetesAuth.roles.<name>.token_policies`

Policies of the tokens this role issues: names from `policies`, or `default`.

- **Type:** `list of non-empty string`
- **Default:** `[ ]`

### `metrics.enabled`

Enable metrics endpoint and monitoring resources (ServiceMonitor, PrometheusRules) when prometheus is available.

- **Type:** `boolean`
- **Default:** `true`

### `metrics.interval`

Scrape interval (e.g. "30s"). Null = use Prometheus default.

- **Type:** `null or string`
- **Default:** `null`

### `policies`

ACL policies in HCL, by name, written by the reconcile Job. `root` and `kix-reconcile` are refused. A policy removed here stays in OpenBao, and the Job's log lists it.

- **Type:** `attribute set of strings concatenated with "\n"`
- **Default:** `{ }`
- **Example:**

  ```nix
  {
    app-read = "path \"secret/data/app/*\" { capabilities = [\"read\"] }";
  }
  ```

### `resources`

Container resource requests and limits. Each field keeps its default until set, and null removes a default.

- **Type:** `submodule`
- **Default:**

  ```nix
  {
    limits = {
      cpu = "2";
      memory = "1Gi";
    };
    requests = {
      cpu = "250m";
      memory = "256Mi";
    };
  }
  ```

### `resources.claims`

Dynamic resource claims the container uses. Null leaves it unset.

- **Type:** `null or (list of (submodule))`
- **Default:** `null`

### `resources.claims.*.name`

Name of an entry in the pod's `resourceClaims`.

- **Type:** `string`

### `resources.claims.*.request`

Request within the claim to use. Null uses the whole claim.

- **Type:** `null or string`
- **Default:** `null`

### `resources.limits`

Resource quantities by name.

- **Type:** `open submodule of attribute set of Kubernetes quantity, such as "500m" or "1Gi" (a non-negative decimal or integer with an optional suffix m, k, M, G, T, P, E, Ki, Mi, Gi, Ti, Pi or Ei)`
- **Default:** `{ }`

### `resources.limits.cpu`

The cpu quantity. Null leaves it unset.

- **Type:** `null or Kubernetes quantity, such as "500m" or "1Gi" (a non-negative decimal or integer with an optional suffix m, k, M, G, T, P, E, Ki, Mi, Gi, Ti, Pi or Ei)`
- **Default:** `"2"`

### `resources.limits.ephemeral-storage`

The ephemeral-storage quantity. Null leaves it unset.

- **Type:** `null or Kubernetes quantity, such as "500m" or "1Gi" (a non-negative decimal or integer with an optional suffix m, k, M, G, T, P, E, Ki, Mi, Gi, Ti, Pi or Ei)`
- **Default:** `null`

### `resources.limits.memory`

The memory quantity. Null leaves it unset.

- **Type:** `null or Kubernetes quantity, such as "500m" or "1Gi" (a non-negative decimal or integer with an optional suffix m, k, M, G, T, P, E, Ki, Mi, Gi, Ti, Pi or Ei)`
- **Default:** `"1Gi"`

### `resources.requests`

Resource quantities by name.

- **Type:** `open submodule of attribute set of Kubernetes quantity, such as "500m" or "1Gi" (a non-negative decimal or integer with an optional suffix m, k, M, G, T, P, E, Ki, Mi, Gi, Ti, Pi or Ei)`
- **Default:** `{ }`

### `resources.requests.cpu`

The cpu quantity. Null leaves it unset.

- **Type:** `null or Kubernetes quantity, such as "500m" or "1Gi" (a non-negative decimal or integer with an optional suffix m, k, M, G, T, P, E, Ki, Mi, Gi, Ti, Pi or Ei)`
- **Default:** `"250m"`

### `resources.requests.ephemeral-storage`

The ephemeral-storage quantity. Null leaves it unset.

- **Type:** `null or Kubernetes quantity, such as "500m" or "1Gi" (a non-negative decimal or integer with an optional suffix m, k, M, G, T, P, E, Ki, Mi, Gi, Ti, Pi or Ei)`
- **Default:** `null`

### `resources.requests.memory`

The memory quantity. Null leaves it unset.

- **Type:** `null or Kubernetes quantity, such as "500m" or "1Gi" (a non-negative decimal or integer with an optional suffix m, k, M, G, T, P, E, Ki, Mi, Gi, Ti, Pi or Ei)`
- **Default:** `"256Mi"`

### `seal.keyId`

Identifier OpenBao records with data sealed by the static key (`current_key_id`). The package does not rotate keys: a changed `unsealKey` value leaves restarted pods unable to unseal until the old value is restored.

- **Type:** `string matching the pattern [A-Za-z0-9_.-]+`
- **Default:** `"1"`

### `seal.type`

`static`: OpenBao unseals itself with the key from the `unsealKey`
dependency and initializes itself on its first start. Anyone who
can read that Secret and a volume can decrypt the data.
`shamir`: a person initializes OpenBao and unseals every pod after
each start; `policies`, `kubernetesAuth.roles`, and
`secretsEngines` must be empty.

- **Type:** `one of "static", "shamir"`
- **Default:** `"static"`

### `secretsEngines`

Secrets engines by mount path, as the body of `sys/mounts/<path>`. The reconcile Job enables a missing engine and leaves an existing one of the same type unchanged; one of another type fails the Job.

- **Type:** `attribute set of (open submodule of attribute set of anything)`
- **Default:** `{ }`
- **Example:**

  ```nix
  {
    secret = {
      options = {
        version = "2";
      };
      type = "kv";
    };
  }
  ```

### `secretsEngines.<name>.options`

Engine options; a `kv` engine takes `version`.

- **Type:** `attribute set of string`
- **Default:** `{ }`
- **Example:**

  ```nix
  {
    version = "2";
  }
  ```

### `secretsEngines.<name>.type`

The secrets engine type, such as `kv` or `pki`.

- **Type:** `non-empty string`
- **Example:** `"kv"`

### `settings`

Server configuration keys merged over the package's, as JSON. The package sets `listener`, `storage`, `seal`, `api_addr`, `cluster_addr`, and `initialize`, and refuses them here; with metrics, also `telemetry.disable_hostname`, `telemetry.prometheus_retention_time`, and `telemetry.metrics_prefix`.

- **Type:** `attribute set of anything`
- **Default:** `{ }`
- **Example:**

  ```nix
  {
    log_level = "debug";
  }
  ```

### `storage.size`

Volume requested for each pod, holding the Raft log and snapshots.

- **Type:** `Kubernetes quantity, such as "500m" or "1Gi" (a non-negative decimal or integer with an optional suffix m, k, M, G, T, P, E, Ki, Mi, Gi, Ti, Pi or Ei)`
- **Default:** `"10Gi"`

### `storage.storageClassName`

StorageClass of the volumes. Null takes the class from the storageClasses dependency, or with none the cluster default.

- **Type:** `null or string`
- **Default:** `null`