> ## Documentation Index
> Fetch the complete documentation index at: https://docs.firebolt.io/llms.txt
> Use this file to discover all available pages before exploring further.

# FireboltEngineClass overview

> Optional namespaced classes of shared FireboltEngine settings, including pod template, storage, engine config, and rollout and auto-stop defaults.

## Overview

`FireboltEngineClass` is an optional namespaced resource that holds reusable FireboltEngine settings: a pod-template fragment plus defaults for `storage`, `customEngineConfig`, `rollout`, `drainCheckEnabled`, `drainCheckInterval`, and `autoStop`. Engines in the same namespace reference it through `spec.engineClassRef` so scheduling, identity, sidecars, engine image, storage, engine config, and rollout and auto-stop policy stay consistent without duplicating YAML on every engine.

Each inherited field resolves the engine value first, then the class value, then the Firebolt Operator's default. An engine that sets a field owns it. The class fills it in otherwise.

The pattern echoes known Kubernetes patterns like `StorageClass` or `GatewayClass` in the "shared template referenced by name"
sense, but `FireboltEngineClass` is **namespaced** rather than cluster-scoped.

Multiple classes can exist per namespace. The engine picks one by name. Usage is optional. The
[FireboltEngineClass design](./fireboltengineclass-design) documents the merge precedence
with `FireboltEngine.spec.template`, deletion, and rollout behavior when a class changes.

For the allowlist of user-settable vs. operator-owned template fields, see the [FireboltEngineClass CRD reference](../crd-reference/fireboltengineclass-crd-reference).

## Inspecting status

```bash theme={"theme":{"light":"css-variables","dark":"css-variables"}}
kubectl get firengc -n firebolt
```

```
NAME                BOUND   READY   AGE
compute-optimized   3       True    24h
```

## Examples

### Create a FireboltEngineClass

The `FireboltEngineClass` can hold shared pod-level properties for engines in the same namespace.

```yaml theme={"theme":{"light":"css-variables","dark":"css-variables"}}
apiVersion: compute.firebolt.io/v1alpha1
kind: FireboltEngineClass
metadata:
  name: default
  namespace: firebolt
spec:
  template:
    metadata:
      labels:
        owner: firebolt
    spec:
      containers:
        - name: engine
          image: ghcr.io/firebolt-db/engine:dev
```

Apply the manifest:

```bash theme={"theme":{"light":"css-variables","dark":"css-variables"}}
kubectl apply --server-side -f firebolt-engine-class.yaml
```

### Create a FireboltEngine

The `FireboltEngine` can reference a `FireboltEngineClass` through `spec.engineClassRef`.

```yaml theme={"theme":{"light":"css-variables","dark":"css-variables"}}
apiVersion: compute.firebolt.io/v1alpha1
kind: FireboltEngine
metadata:
  name: my-engine
  namespace: firebolt
spec:
  instanceRef: demo-instance
  engineClassRef: default
  replicas: 1
  customEngineConfig:
    storage:
      type: minio
      api_scheme: "s3://"
      bucket_name: my-engine-bucket
      minio:
        endpoint: http://floci.firebolt.svc.cluster.local:4566
  template:
    spec:
      containers:
        - name: engine
          resources:
            requests:
              cpu: "2"
              memory: "3Gi"
            limits:
              memory: "3Gi"
```

Apply the manifest:

```bash theme={"theme":{"light":"css-variables","dark":"css-variables"}}
kubectl apply --server-side -f engine.yaml
```

### Additional resources

See the [FireboltEngineClass CRD reference](../crd-reference/fireboltengineclass-crd-reference) for the full field surface.
See [`firebolt-engine-class.yaml`](https://github.com/firebolt-db/firebolt-kubernetes-operator/tree/main/examples/firebolt-engine-class.yaml), [`instance-with-engines.yaml`](https://github.com/firebolt-db/firebolt-kubernetes-operator/tree/main/examples/instance-with-engines.yaml).
