# stackgres-object-storage

Backup storage for StackGres clusters (SGObjectStorage)

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

| | |
| --- | --- |
| Stability | Experimental |
| `package` value | `packages.experimental.stackgres-object-storage` |
| Default aliases | `sgObjectStorage` |

## How-to guides

- [Deploy StackGres](/docs/how-to/package-task-guides/deploy-stackgres/)

## 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 |
| --- | --- |
| `stackgresOperator` | Required |
| `endpointService` | Optional |
| `storageCredentials` | Optional |

## Options

### `bucket`

An existing bucket (for `azureBlob`, a container) that you own. A
prefix within it goes in the cluster's `backups[].path`.

- **Type:** `non-empty string`

### `credentialKeys`

The key of the `storageCredentials` Secret behind each selector of
`type`. A selector left null reads the key with its own name:
`s3` and `s3Compatible` read `accessKeyId` and `secretAccessKey`,
`gcs` reads `serviceAccountJSON`, and `azureBlob` reads
`storageAccount` and `accessKey`. A key set for a selector the type
does not read is refused.

- **Type:** `submodule`
- **Default:** `{ }`

### `credentialKeys.accessKey`

Secret key for the `accessKey` selector; null reads the key `accessKey`.

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

### `credentialKeys.accessKeyId`

Secret key for the `accessKeyId` selector; null reads the key `accessKeyId`.

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

### `credentialKeys.caCertificate`

`s3Compatible` only: the Secret key holding the CA certificate of an endpoint whose certificate a public CA did not issue. Null sets no CA.

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

### `credentialKeys.secretAccessKey`

Secret key for the `secretAccessKey` selector; null reads the key `secretAccessKey`.

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

### `credentialKeys.serviceAccountJSON`

Secret key for the `serviceAccountJSON` selector; null reads the key `serviceAccountJSON`.

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

### `credentialKeys.storageAccount`

Secret key for the `storageAccount` selector; null reads the key `storageAccount`.

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

### `extraSpec`

Merged over the SGObjectStorage spec. `type`, `<type>.bucket`, and the credential selectors the package writes are refused.

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

  ```nix
  {
    s3Compatible = {
      enablePathStyleAddressing = true;
      endpoint = "https://s3.example.com";
      region = "example-1";
    };
  }
  ```

### `type`

Storage service: `s3` (AWS S3), `s3Compatible` (any S3 API, with an endpoint in `extraSpec.s3Compatible.endpoint`), `gcs`, or `azureBlob`.

- **Type:** `one of "azureBlob", "gcs", "s3", "s3Compatible"`