# Connector

> Connector is how a tenant's documents get in (or notifications get out).

Source: https://docs.go-lumen.ai/es/reference/resources/connector

## At a glance

| Propiedad | Valor |
| --- | --- |
| **apiVersion** | `lumen.ai/v1alpha1` |
| **kind** | `Connector` |
| **Resource name** | `connectors` |
| **Scope** | Namespaced (lives in a workspace's namespace) |

## Spec

Fields under `spec:`. Nested fields are indented under their parent.

| Campo | Tipo | Valor por defecto | Descripción |
| --- | --- | --- | --- |
| `classRef` (obligatorio) | object |  | ClassReference names a cluster-scoped class. **Regla:** classRef is immutable |
| `classRef.name` (obligatorio) | string |  | (minLength 1) |
| `config` | object (free-form) |  | Config is validated against the class's configSchema. Values the driver generates (an email-forward address) are written here by the mutating webhook at create and are immutable after, so they survive export, version control and recreation. |
| `credentials` | object |  | ConnectorCredentials are never values. Exactly one source is set. **Regla:** set exactly one of store or secretRef |
| `credentials.secretRef` | object |  | SecretRef is a Secret in the Connector's namespace. |
| `credentials.secretRef.name` (obligatorio) | string |  | (minLength 1) |
| `credentials.store` | object |  | Store is a path in the tenant's SecretStore slice. |
| `credentials.store.path` (obligatorio) | string |  | (minLength 1) |
| `paused` | boolean |  | Paused stops the connector receiving or polling without deleting it. |

## Status

Written by Lumen; do not set it. Only the phase and the conditions are described here.

| Campo | Tipo | Valor por defecto | Descripción |
| --- | --- | --- | --- |
| `conditions` | list of object |  |  |
| `conditions[].lastTransitionTime` (obligatorio) | string |  | lastTransitionTime is the last time the condition transitioned from one status to another. This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. |
| `conditions[].message` (obligatorio) | string |  | message is a human readable message indicating details about the transition. This may be an empty string. (maxLength 32768) |
| `conditions[].observedGeneration` | integer |  | observedGeneration represents the .metadata.generation that the condition was set based upon. For instance, if .metadata.generation is currently 12, but the .status.conditions\[x\].observedGeneration is 9, the condition is out of date with respect to the current state of the instance. (minimum 0) |
| `conditions[].reason` (obligatorio) | string |  | reason contains a programmatic identifier indicating the reason for the condition's last transition. Producers of specific condition types may define expected values and meanings for this field, and whether the values are considered a guaranteed API. The value should be a CamelCase string. This field may not be empty. (minLength 1; maxLength 1024; pattern \`^\[A-Za-z\](\[A-Za-z0-9\_,:\]\*\[A-Za-z0-9\_\])?$\`) |
| `conditions[].status` (obligatorio) | string |  | status of the condition, one of True, False, Unknown. (one of True, False, Unknown) |
| `conditions[].type` (obligatorio) | string |  | type of condition in CamelCase or in foo.example.com/CamelCase. (maxLength 316; pattern \`^(\[a-z0-9\](\[-a-z0-9\]\*\[a-z0-9\])?(\\.\[a-z0-9\](\[-a-z0-9\]\*\[a-z0-9\])?)\*/)?((\[A-Za-z0-9\]\[-A-Za-z0-9\_.\]\*)?\[A-Za-z0-9\])$\`) |

## kubectl columns

| Column | Type | JSONPath |
| --- | --- | --- |
| Class | string | `.spec.classRef.name` |
| Paused | boolean | `.spec.paused` |
| Ready | string | `.status.conditions[?(@.type=="Ready")].status` |
| Age | date | `.metadata.creationTimestamp` |

## Example

```yaml title="connector.yaml"
apiVersion: lumen.ai/v1alpha1
kind: Connector
metadata:
  name: invoices-inbox
  namespace: tenant-acme
spec:
  classRef: {name: email-forward}
  config:
    allowedSenders: ["*@supplier.example"]
```
