Skip to main content

OpniCluster

The OpniCluster resource controls the deployment of the Opni microservices, along with prerequisite infrastructure (such as NATS). This is the main resource used for deploying Opni.

example.yaml

apiVersion: opni.io/v1beta1
kind: OpniCluster
metadata:
name: example
namespace: opni
spec:
version: v0.1.3
deployLogCollector: true
services:
inference:
enabled: true
pretrainedModels:
- name: control-plane
gpuController:
enabled: false
elastic:
version: 1.13.2
nats:
authMethod: nkey
s3:
internal: {}

Custom Resource Specs

OpniClusterSpec

FieldRequiredTypeDescription
versionNostringThe version of the Opni service images to deploy. Defaults to latest
defaultRepoNostringDocker repo to use for the Opni service images. Defaults to docker.io/rancher
servicesNoServicesSpecConfiguration for the individual Opni services
elasticNoElasticSpecConfigures the Opendistro Elasticsearch cluster deployed along with Opni
natsNoNatsSpecConfigures the NATS cluster deployed along with Opni
s3YesS3SpecConfigures the S3 storage used for persisting the AI models
deployLogCollectorNoboolWhether the Opni ClusterFlow and ClusterOutput should be deployed. Defaults to true. See Log Shipping for more details
globalNodeSelectorNomapA node selector that will get applied to all Opni components and deployed infrastructure
globalTolerationsNoToleration arrayTolerations that will get applied to all Opni components and infrastructure
nulogHyperParametersNomapOverrides for the default nulog hyperparameters
danger

The default hyperparameters should not be overridden unless there is a specific reason to

ServicesSpec

FieldRequiredTypeDescription
drainNoDrainServiceSpecConfiguration for the Opni Drain service
inferenceNoInferenceServiceSpecConfiguration for the Opni Nulog Inference services
preprocessingNoPreprocessingServiceSpecConfiguration for the Opni Preprocessing service
payloadReceiverNoPayloadReceiverServiceSpecConfiguration for the Opni HTTP Payload Receiver service
gpuControllerNoGPUControllerServiceSpecConfiguration for the optional GPU service
metricsNoMetricsServiceSpecConfiguration for the metrics anomaly detection service
insightsNoInsightsServiceSpecConfiguration for the insights api service
uiNoUIServiceSpecConfiguration for the custom Opni UI service

DrainServiceSpec

FieldRequiredTypeDescription
imageNostringExplicit override for the image to use for the service
imagePullPolicyNostringImage pull policy. One of Always, Never, IfNotPresent. Defaults to IfNotPresent
imagePullSecretsNoLocalObjectReference arrayList of secrets in the same namespace to use for pulling the image
enabledNoboolEnable the service. Defaults to true
nodeSelectorNomapA node selector that will be applied to the Drain service. This overrides the globalNodeSelector field
tolerationsNoToleration arrayTolerations for the service. These will be added to the tolerations in globalTolerations (if any)

InferenceServiceSpec

FieldRequiredTypeDescription
imageNostringExplicit override for the image to use for the service
imagePullPolicyNostringImage pull policy. One of Always, Never, IfNotPresent. Defaults to IfNotPresent
imagePullSecretsNoLocalObjectReference arrayList of secrets in the same namespace to use for pulling the image
enabledNoboolEnable the service. Defaults to true
nodeSelectorNomapA node selector that will be applied to the Drain service. This overrides the globalNodeSelector field
tolerationsNoToleration arrayTolerations for the service. These will be added to the tolerations in globalTolerations (if any)
pretrainedModelsNoLocalObjectReference arrayA list of pretrained models to deploy. Object references should point to a PretrainedModel resource

PreprocessingServiceSpec

FieldRequiredTypeDescription
imageNostringExplicit override for the image to use for the service
imagePullPolicyNostringImage pull policy. One of Always, Never, IfNotPresent. Defaults to IfNotPresent
imagePullSecretsNoLocalObjectReference arrayList of secrets in the same namespace to use for pulling the image
enabledNoboolEnable the service. Defaults to true
nodeSelectorNomapA node selector that will be applied to the Drain service. This overrides the globalNodeSelector field
tolerationsNoToleration arrayTolerations for the service. These will be added to the tolerations in globalTolerations (if any)

PayloadReceiverServiceSpec

FieldRequiredTypeDescription
imageNostringExplicit override for the image to use for the service
imagePullPolicyNostringImage pull policy. One of Always, Never, IfNotPresent. Defaults to IfNotPresent
imagePullSecretsNoLocalObjectReference arrayList of secrets in the same namespace to use for pulling the image
enabledNoboolEnable the service. Defaults to true
nodeSelectorNomapA node selector that will be applied to the Drain service. This overrides the globalNodeSelector field
tolerationsNoToleration arrayTolerations for the service. These will be added to the tolerations in globalTolerations (if any)

GPUControllerServiceSpec

FieldRequiredTypeDescription
imageNostringExplicit override for the image to use for the service
imagePullPolicyNostringImage pull policy. One of Always, Never, IfNotPresent. Defaults to IfNotPresent
imagePullSecretsNoLocalObjectReference arrayList of secrets in the same namespace to use for pulling the image
enabledNoboolEnable the service. Defaults to true
nodeSelectorNomapA node selector that will be applied to the Drain service. This overrides the globalNodeSelector field
tolerationsNoToleration arrayTolerations for the service. These will be added to the tolerations in globalTolerations (if any)

MetricsServiceSpec

note

The metrics anomaly service is currently experimental

FieldRequiredTypeDescription
imageNostringExplicit override for the image to use for the service
imagePullPolicyNostringImage pull policy. One of Always, Never, IfNotPresent. Defaults to IfNotPresent
imagePullSecretsNoLocalObjectReference arrayList of secrets in the same namespace to use for pulling the image
enabledNoboolEnable the service. Defaults to true
nodeSelectorNomapA node selector that will be applied to the Drain service. This overrides the globalNodeSelector field
tolerationsNoToleration arrayTolerations for the service. These will be added to the tolerations in globalTolerations (if any)
prometheusNoPrometheusReferenceReference to a prometheus-operator Prometheus resource. If this is provided ServiceMonitor and PrometheusRule resources will be created
prometheusEndpointNostringEndpoint of Prometheus cluster for the cluster. This is required if the prometheus reference is not provided, or the referenced Prometheus object doens't include an externalURL

InsightsServiceSpec

note

The insights service is currently experimental. It provides an API that the custom UI uses.

FieldRequiredTypeDescription
imageNostringExplicit override for the image to use for the service
imagePullPolicyNostringImage pull policy. One of Always, Never, IfNotPresent. Defaults to IfNotPresent
imagePullSecretsNoLocalObjectReference arrayList of secrets in the same namespace to use for pulling the image
enabledNoboolEnable the service. Defaults to true
nodeSelectorNomapA node selector that will be applied to the Drain service. This overrides the globalNodeSelector field
tolerationsNoToleration arrayTolerations for the service. These will be added to the tolerations in globalTolerations (if any)

UIServiceSpec

note

The UI is currently experimental. It is not currently exposed outside the cluster, however changes to the Kubernetes Service will not be reconciled, so it can be updated to be a LoadBalancer or NodePort.

FieldRequiredTypeDescription
imageNostringExplicit override for the image to use for the service
imagePullPolicyNostringImage pull policy. One of Always, Never, IfNotPresent. Defaults to IfNotPresent
imagePullSecretsNoLocalObjectReference arrayList of secrets in the same namespace to use for pulling the image
enabledNoboolEnable the service. Defaults to true
nodeSelectorNomapA node selector that will be applied to the Drain service. This overrides the globalNodeSelector field
tolerationsNoToleration arrayTolerations for the service. These will be added to the tolerations in globalTolerations (if any)

PrometheusReference

FieldRequiredTypeDescription
nameYesstringThe name of the Prometheus resource
namespaceYesstringThe namespace the Prometheus resource is in