# cluster-issuer

A cert-manager ClusterIssuer; `kix.expose` uses it for Ingress TLS

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

| | |
| --- | --- |
| Stability | Experimental |
| `package` value | `packages.experimental.cluster-issuer` |
| Default aliases | `clusterIssuer` |

## How-to guides

- [Configure cert-manager issuers](/docs/how-to/package-task-guides/configure-cert-manager-issuers/)

## 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 |
| `issuerCredentials` | Optional |

## Options

### `spec`

The ClusterIssuer `spec`, in cert-manager's API. Set exactly one issuer
type: `acme`, `ca`, `selfSigned`, `vault`, or `venafi`. A self-signed
issuer is `{ selfSigned = { }; }`.

Fields the vendored ClusterIssuer CRD does not define, and values of a
type it does not allow, fail the build. A field set to null is left
out.
`acme.privateKeySecretRef.name` defaults to
`<instance>-acme-account-key`, a Secret cert-manager creates.

Leave `name` out of every other Secret key selector (such as
`dns01.cloudflare.apiTokenSecretRef`) and set only `key`: the package
fills in the Secret of the `issuerCredentials` dependency and checks
that it declares the key. An issuer that needs several credentials,
such as an ACME external account binding and a DNS token, keeps them
as several keys of that one Secret. `name = kix.untrackedRef "<name>"`
names a Secret Kix does not check.

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

  ```nix
  {
    acme = {
      server = "https://acme-v02.api.letsencrypt.org/directory";
      email = "<your-email>";
      solvers = [
        {
          dns01.cloudflare.apiTokenSecretRef.key = "api-token";
          selector.dnsZones = [ "example.com" ];
        }
      ];
    };
  }
  ```