# Server Runtime

The SeldonRuntime resource is used to create an instance of Seldon installed in a particular namespace.

```go
type SeldonRuntimeSpec struct {
	SeldonConfig string              `json:"seldonConfig"`
	Overrides    []*OverrideSpec     `json:"overrides,omitempty"`
	Config       SeldonConfiguration `json:"config,omitempty"`
	// +Optional
	// If set then when the referenced SeldonConfig changes we will NOT update the SeldonRuntime immediately.
	// Explicit changes to the SeldonRuntime itself will force a reconcile though
	DisableAutoUpdate bool `json:"disableAutoUpdate,omitempty"`
}

type OverrideSpec struct {
	Name        string         `json:"name"`
	Disable     bool           `json:"disable,omitempty"`
	Replicas    *int32         `json:"replicas,omitempty"`
	ServiceType v1.ServiceType `json:"serviceType,omitempty"`
	PodSpec     *PodSpec       `json:"podSpec,omitempty"`
}
```

For the definition of `SeldonConfiguration` above see the [SeldonConfig resource](/seldon-core-2/installation/advanced-configurations/seldonconfig.md).

The specification above contains overrides for the chosen `SeldonConfig`. To override the `PodSpec` for a given component, the `overrides` field needs to specify the component name and the `PodSpec` needs to specify the container name, along with fields to override.

For instance, the following overrides the resource limits for `cpu` and `memory` in the `hodometer`\
component in the `seldon-mesh` namespace, while using values specified in the `seldonConfig` elsewhere\
(e.g. `default`).

```yaml
apiVersion: mlops.seldon.io/v1alpha1
kind: SeldonRuntime
metadata:
  name: seldon
  namespace: seldon-mesh
spec:
  overrides:
  - name: hodometer
    podSpec:
      containers:
      - name: hodometer
        resources:
          limits:
            memory: 64Mi
            cpu: 20m
  seldonConfig: default
```

As a minimal use you should just define the `SeldonConfig` to use as a base for this install, for example to install in the `seldon-mesh` namespace with the `SeldonConfig` named `default`:

```yaml
apiVersion: mlops.seldon.io/v1alpha1
kind: SeldonRuntime
metadata:
  name: seldon
  namespace: seldon-mesh
spec:
  seldonConfig: default
```

The helm chart `seldon-core-v2-runtime` allows easy creation of this resource and associated default Servers for an installation of Seldon in a particular namespace.

## SeldonConfig Update Propagation

When a [SeldonConfig](/seldon-core-2/installation/advanced-configurations/seldonconfig.md) resource changes any SeldonRuntime resources that reference the changed SeldonConfig will also be updated immediately. If this behaviour is not desired you can set `spec.disableAutoUpdate` in the SeldonRuntime resource for it not be be updated immediately but only when it changes or any owned resource changes.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.seldon.ai/seldon-core-2/installation/advanced-configurations/seldonruntime.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
