> ## Documentation Index
> Fetch the complete documentation index at: https://firebolt-aggregate-helm-docs-pr-97.mintlify.site/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 reference a class by name through `spec.engineClassRef`. The Firebolt Operator resolves that name namespaced-first: a `FireboltEngineClass` in the Engine's namespace if present, otherwise a [`ClusterFireboltEngineClass`](../crd-reference/clusterfireboltengineclass-crd-reference) of the same name. A namespaced object of the same name is an explicit override of the cluster SKU.

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

Multiple classes can exist per namespace. The Engine picks one by name, and using a class is optional. See [EngineClass configuration inheritance](./configuration-inheritance) for template precedence, per-Engine overrides, deletion, and rollout behavior.

For the allowlist of user-settable and Firebolt 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 namespaced `FireboltEngineClass` or a cluster `ClusterFireboltEngineClass` 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:
      managed_table_storage: s3
      managed_table_bucket_name: my-engine-bucket
      aws:
        endpoint: http://floci.firebolt.svc.cluster.local:4566
        path_style_addressing: true # non-AWS S3-compatible store; ignored for AWS S3
  template:
    spec:
      containers:
        - name: engine
          # floci is zero-auth, but the engine still signs S3 requests — supply any creds via env.
          env:
            - name: AWS_ACCESS_KEY_ID
              value: firebolt
            - name: AWS_SECRET_ACCESS_KEY
              value: firebolt
          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).
