Skip to 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

Field Required Type Description
version No string The version of the Opni service images to deploy. Defaults to latest
defaultRepo No string Docker repo to use for the Opni service images. Defaults to docker.io/rancher
services No ServicesSpec Configuration for the individual Opni services
elastic No ElasticSpec Configures the Opendistro Elasticsearch cluster deployed along with Opni
nats No NatsSpec Configures the NATS cluster deployed along with Opni
s3 Yes S3Spec Configures the S3 storage used for persisting the AI models
deployLogCollector No bool Whether the Opni ClusterFlow and ClusterOutput should be deployed. Defaults to true. See Log Shipping for more details
globalNodeSelector No map A node selector that will get applied to all Opni components and deployed infrastructure
globalTolerations No Toleration array Tolerations that will get applied to all Opni components and infrastructure
nulogHyperParameters No map Overrides for the default nulog hyperparameters

Warning

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

ServicesSpec

Field Required Type Description
drain No DrainServiceSpec Configuration for the Opni Drain service
inference No InferenceServiceSpec Configuration for the Opni Nulog Inference services
preprocessing No PreprocessingServiceSpec Configuration for the Opni Preprocessing service
payloadReceiver No PayloadReceiverServiceSpec Configuration for the Opni HTTP Payload Receiver service
gpuController No GPUControllerServiceSpec Configuration for the optional GPU service
metrics No MetricsServiceSpec Configuration for the metrics anomaly detection service
insights No InsightsServiceSpec Configuration for the insights api service
ui No UIServiceSpec Configuration for the custom Opni UI service

DrainServiceSpec

Field Required Type Description
image No string Explicit override for the image to use for the service
imagePullPolicy No string Image pull policy. One of Always, Never, IfNotPresent. Defaults to IfNotPresent
imagePullSecrets No LocalObjectReference array List of secrets in the same namespace to use for pulling the image
enabled No bool Enable the service. Defaults to true
nodeSelector No map A node selector that will be applied to the Drain service. This overrides the globalNodeSelector field
tolerations No Toleration array Tolerations for the service. These will be added to the tolerations in globalTolerations (if any)

InferenceServiceSpec

Field Required Type Description
image No string Explicit override for the image to use for the service
imagePullPolicy No string Image pull policy. One of Always, Never, IfNotPresent. Defaults to IfNotPresent
imagePullSecrets No LocalObjectReference array List of secrets in the same namespace to use for pulling the image
enabled No bool Enable the service. Defaults to true
nodeSelector No map A node selector that will be applied to the Drain service. This overrides the globalNodeSelector field
tolerations No Toleration array Tolerations for the service. These will be added to the tolerations in globalTolerations (if any)
pretrainedModels No LocalObjectReference array A list of pretrained models to deploy. Object references should point to a PretrainedModel resource

PreprocessingServiceSpec

Field Required Type Description
image No string Explicit override for the image to use for the service
imagePullPolicy No string Image pull policy. One of Always, Never, IfNotPresent. Defaults to IfNotPresent
imagePullSecrets No LocalObjectReference array List of secrets in the same namespace to use for pulling the image
enabled No bool Enable the service. Defaults to true
nodeSelector No map A node selector that will be applied to the Drain service. This overrides the globalNodeSelector field
tolerations No Toleration array Tolerations for the service. These will be added to the tolerations in globalTolerations (if any)

PayloadReceiverServiceSpec

Field Required Type Description
image No string Explicit override for the image to use for the service
imagePullPolicy No string Image pull policy. One of Always, Never, IfNotPresent. Defaults to IfNotPresent
imagePullSecrets No LocalObjectReference array List of secrets in the same namespace to use for pulling the image
enabled No bool Enable the service. Defaults to true
nodeSelector No map A node selector that will be applied to the Drain service. This overrides the globalNodeSelector field
tolerations No Toleration array Tolerations for the service. These will be added to the tolerations in globalTolerations (if any)

GPUControllerServiceSpec

Field Required Type Description
image No string Explicit override for the image to use for the service
imagePullPolicy No string Image pull policy. One of Always, Never, IfNotPresent. Defaults to IfNotPresent
imagePullSecrets No LocalObjectReference array List of secrets in the same namespace to use for pulling the image
enabled No bool Enable the service. Defaults to true
nodeSelector No map A node selector that will be applied to the Drain service. This overrides the globalNodeSelector field
tolerations No Toleration array Tolerations for the service. These will be added to the tolerations in globalTolerations (if any)

MetricsServiceSpec

Note

The metrics anomaly service is currently experimental

Field Required Type Description
image No string Explicit override for the image to use for the service
imagePullPolicy No string Image pull policy. One of Always, Never, IfNotPresent. Defaults to IfNotPresent
imagePullSecrets No LocalObjectReference array List of secrets in the same namespace to use for pulling the image
enabled No bool Enable the service. Defaults to true
nodeSelector No map A node selector that will be applied to the Drain service. This overrides the globalNodeSelector field
tolerations No Toleration array Tolerations for the service. These will be added to the tolerations in globalTolerations (if any)
prometheusEndpoint Yes string Endpoint of Prometheus cluster for the cluster. This is required if the metrics service is enabled, and must be a valid URL

InsightsServiceSpec

Note

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

Field Required Type Description
image No string Explicit override for the image to use for the service
imagePullPolicy No string Image pull policy. One of Always, Never, IfNotPresent. Defaults to IfNotPresent
imagePullSecrets No LocalObjectReference array List of secrets in the same namespace to use for pulling the image
enabled No bool Enable the service. Defaults to true
nodeSelector No map A node selector that will be applied to the Drain service. This overrides the globalNodeSelector field
tolerations No Toleration array Tolerations 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.

Field Required Type Description
image No string Explicit override for the image to use for the service
imagePullPolicy No string Image pull policy. One of Always, Never, IfNotPresent. Defaults to IfNotPresent
imagePullSecrets No LocalObjectReference array List of secrets in the same namespace to use for pulling the image
enabled No bool Enable the service. Defaults to true
nodeSelector No map A node selector that will be applied to the Drain service. This overrides the globalNodeSelector field
tolerations No Toleration array Tolerations for the service. These will be added to the tolerations in globalTolerations (if any)