Skip to main content
Enterprise

NetBoxEnterprise CRD Reference

The NetBoxEnterprise custom resource defines a complete NetBox Enterprise deployment. The nbe-operator watches these resources and reconciles them into the appropriate Kubernetes objects.

API Details:

FieldValue
Groupnetboxlabs.com
Versionv1alpha1
KindNetBoxEnterprise
ScopeNamespaced
Short namenbe

Full CRD: netboxenterprises.netboxlabs.com-v2.1.1.yaml

Minimal Example

apiVersion: netboxlabs.com/v1alpha1
kind: NetBoxEnterprise
metadata:
name: netbox
namespace: netbox
spec:
netbox:
replicas: 1
worker:
replicas: 1
postgresql:
external: false
redis:
external: false

Full Example

apiVersion: netboxlabs.com/v1alpha1
kind: NetBoxEnterprise
metadata:
name: netbox
namespace: netbox
spec:
suspend: false
maintenanceMode: false

labels:
app.kubernetes.io/managed-by: netbox-operator

imagePullSecrets:
- netbox-enterprise-registry

netbox:
replicas: 2
httpPort: 8080
mediaStorageSize: "10Gi"
urls:
- "https://netbox.example.com"
resources:
cpu: 500
memory: 1024
limits:
cpu: 2000
memory: 2048
worker:
replicas: 2
resources:
cpu: 200
memory: 256
limits:
cpu: 1000
memory: 1500
config:
metricsEnabled: true
allowedHosts:
- "*"

postgresql:
external: false
instances: 2
version: "18"
storageSize: "20Gi"
resources:
cpu: 500
memory: 1024
limits:
cpu: 2000
memory: 2048

redis:
external: false
clusterSize: 3
persistence: true
storageSize: "2Gi"
resources:
cpu: 250
memory: 256
limits:
cpu: 500
memory: 512

diode:
enabled: true
reconciler:
replicas: 1
ingester:
replicas: 1
auth:
replicas: 1
hydra:
replicas: 1
config:
reconciler:
# autoApplyChangesets: true # false recommended if using Assurance
logLevel: INFO

Spec Reference

Top-Level Fields

FieldTypeDefaultDescription
suspendboolfalsePause reconciliation — existing workloads keep running
maintenanceModeboolfalseScale down all app components, keep databases running
labelsmap[string]stringLabels applied to all managed resources
annotationsmap[string]stringAnnotations applied to all managed resources
imagePullPolicystringIfNotPresentDefault image pull policy
imagePullSecrets[]stringPull secrets for private registries
registrystringContainer registry host override for all images
registryNamespacestringRegistry namespace for flat-namespace registries (e.g., airgap). When set alongside registry, repository paths are flattened to {namespace}/{basename}
clusterDnsSuffixstringKubernetes cluster DNS suffix (defaults to cluster.local)
reconcileIntervalstring5mHow often the operator re-checks external state when no Kubernetes events are received. Covers changes that do not produce watch events (PGO secret rotations, wheelhouse uploads). Kubernetes-style duration string (30s, 1m, 5m) or bare seconds.
secretChecksumDebouncestring30sDebounce window for embedding external secret resourceVersion into pod template annotations. Prevents PGO housekeeping writes from triggering rolling restarts. Kubernetes-style duration string or bare seconds. Lower values speed up convergence in test environments; raise it for slow-bootstrapping clusters.
note

Each operator-managed workload section (spec.netbox, spec.netbox.worker, spec.copilot, and each spec.diode.<component>) accepts a topologySpreadConstraints array using the standard Kubernetes type. A cluster-wide default lives at spec.replication.topologySpreadConstraints. The operator auto-injects hostname spread for Redis replication and Sentinel; user-set constraints are honored as-is.

spec.postgresqlProfiles

Named PostgreSQL connection profiles that components can reference by name. This avoids duplicating host, port, and TLS settings across components when they share the same database server.

postgresqlProfiles:
netbox:
host: db.example.com
port: 5432
username: netbox
tlsConfig:
sslmode: verify-full
keychainCaCertificates: ['pgo']
FieldTypeDefaultDescription
postgresqlProfiles.<name>.hoststringPostgreSQL hostname
postgresqlProfiles.<name>.portuint16PostgreSQL port
postgresqlProfiles.<name>.usernamestringPostgreSQL username
postgresqlProfiles.<name>.tlsConfigobjectTLS configuration (see PostgreSQL TLS)

PostgreSQL Profile tlsConfig

FieldTypeDefaultDescription
sslmodeenumpreferdisable, allow, prefer, require, verify-ca, verify-full
insecureSkipVerifyboolfalseSkip TLS verification
keychainCaCertificates[]stringCA names from tlsKeychain
keychainClientCertificatestringClient cert name from tlsKeychain
note

When CA certificates are configured via keychainCaCertificates, libpq verifies the server certificate even with sslmode: require (effectively upgrading it to verify-ca behavior). This is because the operator sets PGSSLROOTCERT when CA certificates are provided. If you need require without verification, omit the CA certificates.

spec.netbox

Required. NetBox application deployment configuration.

FieldTypeDefaultDescription
replicasuint81Web application replicas (0–255)
httpPortuint168080HTTP port
statusPortuint168081Health check port
mediaStorageSizestring10GiMedia PVC size
scriptsStorageSizestring1GiScripts PVC size
migrationTimeoutstring1hMaximum time for the migration Job to run before Kubernetes terminates it. Accepts durations (1h, 30m) or bare seconds (3600).
migrationStatementTimeoutstring15mPer-statement timeout for index reconciliation. Prevents a single slow index creation from consuming the entire job deadline. Accepts durations or bare seconds.
storageClassNamestringStorage class override
urls[]stringExternal URLs (configures ingress)
registrystringContainer registry override
imagePullPolicystringIfNotPresentImage pull policy
resources.cpuint200CPU request (millicores)
resources.memoryint750Memory request (MiB)
limits.cpuint1000CPU limit (millicores)
limits.memoryint1500Memory limit (MiB)
env[]EnvVarEnvironment variables
yamlEnvstringYAML string of env vars

spec.netbox.image

FieldTypeDefaultDescription
registrystringghcr.ioContainer registry
repositorystringnetbox-community/netboxImage repository
tagstringChart-dependentImage tag
digeststringImage digest for pinning
pullPolicystringIfNotPresentPull policy

spec.netbox.worker (Required)

FieldTypeDefaultDescription
replicasuint81Worker replicas
resources.cpuint100CPU request (millicores)
resources.memoryint128Memory request (MiB)
limits.cpuint1000CPU limit (millicores)
limits.memoryint1500Memory limit (MiB)

spec.netbox.config

FieldTypeDefaultDescription
allowedHosts[]string['*']Django allowed hosts
metricsEnabledboolfalseExpose /metrics endpoint
customPythonConfigstringInline custom Python config
customPythonConfigRefConfigMapKeySelectorConfigMap ref for Python config
secretKeySecretKeySelectorAuto-generatedDjango secret key
emailPasswordSecretKeySelectorEmail password
superuserobjectAuto-generatedSuperuser credentials (all 4 fields required if set)
storage.s3.enabledboolfalseEnable S3 media storage
storage.s3.tlsConfigobjectS3 TLS/mTLS configuration (see S3 TLS)

S3 Storage TLS

The storage.s3.tlsConfig field uses the keychain TLS pattern for custom CA certificates and client certificates (mTLS):

FieldTypeDefaultDescription
tlsConfig.insecureSkipVerifyboolfalseSkip SSL certificate verification
tlsConfig.keychainCaCertificates[]stringCA names from tlsKeychain for server verification
tlsConfig.keychainClientCertificatestringClient cert name from tlsKeychain for mTLS

spec.postgresql

Required. PostgreSQL database configuration.

FieldTypeDefaultDescription
externalboolfalseUse external PostgreSQL
instancesuint81PGO replica count (internal only)
versionstring18PostgreSQL major version
storageSizestring4GiStorage per instance
storageClassNamestringStorage class
registrystringImage registry override
postgresqlProfilestringName of a profile from postgresqlProfiles for host, port, and TLS config
resources.cpuintCPU request (millicores). Optional — when unset, no requests are applied
resources.memoryintMemory request (MiB). Optional — when unset, no requests are applied
limits.cpuintCPU limit (millicores). Optional — when unset, no limits are applied
limits.memoryintMemory limit (MiB). Optional — when unset, no limits are applied

spec.redis

Required. Redis cache/queue configuration.

FieldTypeDefaultDescription
externalboolfalseUse external Redis
namestringredisInstance name
clusterSizeuint81Redis replicas. Set to 0 to auto-scale based on node count (min(nodes, 3)) — auto-scaling requires cluster-scoped RBAC. Sentinel is deployed automatically when the effective size is greater than 1.
persistencebooltrueEnable persistence
requireAuthboolfalseRequire authentication
resources.cpuintCPU request (millicores). Optional — when unset, no requests are applied
resources.memoryintMemory request (MiB). Optional — when unset, no requests are applied
limits.cpuintCPU limit (millicores). Optional — when unset, no limits are applied
limits.memoryintMemory limit (MiB). Optional — when unset, no limits are applied
storageClassNamestringStorage class
storageSizestring1GiStorage size for Redis PVCs (when persistence is enabled)

spec.redis.tlsConfig

FieldTypeDefaultDescription
insecureSkipVerifyboolfalseSkip TLS verification
keychainCaCertificates[]stringCA names from tlsKeychain
keychainClientCertificatestringClient cert name from tlsKeychain

spec.copilot

Optional. Private Copilot AI assistant backend. Requires a Private Copilot license entitlement and an LLM API key secret. Disabled by default.

copilot:
enabled: true
llmProvider: anthropic
llmModel: anthropic/claude-sonnet-4-6
llmApiKeySecret: copilot-llm-api-key
llmApiKeySecretKey: apiKey
FieldTypeDefaultDescription
enabledboolfalseEnable the Copilot backend and activate the netbox_copilot plugin in NetBox
replicasuint81Copilot backend replicas
llmProviderenumanthropicanthropic or bedrock
llmModelstringanthropic/claude-sonnet-4-6Provider-prefixed model identifier (e.g. anthropic/claude-sonnet-4-6, bedrock/us.anthropic.claude-sonnet-4-6)
llmApiKeySecretstringcopilot-llm-api-keyKubernetes Secret holding the LLM API key (must exist in the same namespace)
llmApiKeySecretKeystringapiKeyKey within llmApiKeySecret
llmMaxStepsuint820Maximum LLM reasoning steps per conversation turn
awsRegionstringus-east-2AWS region for Bedrock. Sets AWS_DEFAULT_REGION in the Copilot container.
awsCredentialsSecretstringOptional Secret with aws_access_key_id and aws_secret_access_key for Bedrock. Omit to use ambient credentials (IRSA, instance profile).
databaseUserstringcopilotPostgreSQL user for the Copilot database
redisDbuint82Redis database number (NetBox uses 0, Diode uses 1)
netboxAuthCookieNamestringsessionidNetBox session cookie name used for authentication
netboxAuthCacheTtluint1660TTL in seconds for caching NetBox auth session validation
netboxAuthApiTimeoutuint85Timeout in seconds for NetBox auth API calls
resources.cpuint100CPU request (millicores)
resources.memoryint256Memory request (MiB)
limits.cpuint1000CPU limit (millicores)
limits.memoryint1024Memory limit (MiB)

spec.copilot.postgres

Optional external PostgreSQL connection for Copilot. When omitted, Copilot uses the PGO-managed secret {cluster-name}-postgres-pguser-copilot.

copilot:
postgres:
databaseUrl:
name: copilot-postgres-url
key: DATABASE_URL
sslMode: verify-full
keychainCaCertificates:
- copilot-db-ca
FieldTypeDefaultDescription
databaseUrl.namestringRequiredSecret name containing the full DATABASE_URL URI
databaseUrl.keystringRequiredKey within the secret (e.g. DATABASE_URL)
sslModeenumdisable, allow, prefer, require, verify-ca, verify-full
keychainCaCertificates[]stringCA names from tlsKeychain for verifying the Copilot PostgreSQL server. Required when sslMode is verify-ca or verify-full.

spec.diode

Optional. Diode data ingestion pipeline.

FieldTypeDefaultDescription
enabledbooltrueEnable Diode
reconciler.replicasuint81Reconciler replicas
ingester.replicasuint81Ingester replicas
auth.replicasuint81Auth replicas
hydra.replicasuint81Hydra replicas
hydra.autoMigratebooltrueAuto-run Hydra DB migrations
hydra.postgresqlProfilestringPostgreSQL profile for Hydra's database connection

Each component also has resources, limits, annotations, labels, extraEnvs, and image fields. Service account names are auto-generated from the cluster name (e.g., {name}-diode-ingester) unless explicitly overridden.

spec.diode.config.reconciler

FieldTypeDefaultDescription
autoApplyChangesetsbooltrue (without Assurance), false (with Assurance)Auto-apply change sets. Defaults based on Assurance license.
logLevelenumINFOINFO, DEBUG, WARN, ERROR
databaseNamestringdiodePostgreSQL database
databaseUserstringdiodePostgreSQL user
migrationEnabledbooltrueRun DB migrations
redisDbuint80Redis database number
redisStreamDbuint81Redis stream database
rateLimitRpsuint820Rate limit (req/sec)
postgres.postgresqlProfilestringPostgreSQL profile for Diode's database connection

spec.tlsKeychain

Centralized TLS certificate management.

spec.tlsKeychain.caCertificateSecrets[]

FieldTypeDefaultDescription
namestringRequiredLogical name (referenced in tlsConfig)
secretstringSame as nameKubernetes secret name
keystringca.crtKey within the secret

spec.tlsKeychain.clientCertificateSecrets[]

FieldTypeDefaultDescription
namestringRequiredLogical name
secretstringSame as nameKubernetes secret name
certKeystringtls.crtCertificate key
privateKeystringtls.keyPrivate key

spec.ingress

Cluster-wide Ingress configuration. When omitted, the operator generates Ingress objects with the default nginx class and no extra annotations.

ingress:
className: nginx
timeouts:
connect: 10s
read: 60s
send: 60s
tls:
- hosts: [netbox.example.com]
secretName: netbox-tls
FieldTypeDefaultDescription
enabledbooltrueWhether the operator creates Ingress objects. When false, existing Ingress objects are pruned by orphan cleanup.
classNamestringnginxKubernetes Ingress class name. Maps to spec.ingressClassName on every generated Ingress.
annotationsmap[string]stringExtra annotations merged onto every Ingress object. Values here override the hardcoded nginx-specific defaults when keys collide.
tls[]IngressTLSTLS termination entries. Each entry maps directly to a Kubernetes IngressTLS object. All unique hosts across entries are used to create IngressRule entries.
timeouts.connectstringTime allowed to establish a TCP connection to the upstream. Kubernetes-style duration.
timeouts.readstringTime between successive reads from the upstream response. Kubernetes-style duration.
timeouts.sendstringTime between successive writes to the upstream request. Kubernetes-style duration.
note

Proxy timeouts are translated to nginx annotations. Non-nginx Ingress classes log a warning and leave timeouts at the controller defaults. Per-service overrides on spec.copilot.timeouts.ingress, spec.diode.timeouts.http.ingress, and spec.diode.timeouts.grpc.ingress field-merge with the cluster-wide defaults.

spec.gateway

Optional Gateway API configuration. When omitted or enabled: false, no Gateway API resources are created. Can coexist with Ingress -- both can be enabled simultaneously.

gateway:
enabled: true
className: istio
listeners:
- name: http
port: 80
protocol: HTTP
FieldTypeDefaultDescription
enabledboolfalseWhether the operator creates Gateway API resources. Opt-in. When true, the operator creates a Gateway plus the associated HTTPRoute and GRPCRoute objects.
classNamestringistioGatewayClass name for the Gateway resource. Common values: istio, envoy, cilium.
annotationsmap[string]stringExtra annotations merged onto all Gateway API resources.
listeners[]GatewayListenerGateway listener definitions. Each entry maps to a spec.listeners[] entry on the upstream Gateway type.
timeoutsobjectCluster-wide HTTPRoute timeout defaults. Per-service overrides on spec.copilot.timeouts.gateway and spec.diode.timeouts.http.gateway field-merge with these defaults.

spec.extraCaCertificates

Additional CA certificates to trust system-wide. Added to the system trust store of all NetBox components, merged into every service-specific CA bundle (PostgreSQL, Redis), and set as REQUESTS_CA_BUNDLE so Python HTTP clients (e.g., webhooks, custom scripts) also trust these CAs.

extraCaCertificates:
- name: internal-ca-secret
key: ca.crt

Next Steps