|Index|Creating SUSE AI Factory Blueprints|How do I create a blueprint CR for inference with Ollama?
Applies to SUSE AI Factory

5 How do I create a blueprint CR for inference with Ollama?

To create a blueprint custom resource (CR) for inference, define the metadata, blueprint specification, chart repository, and component values in a single manifest file.

5.1 Header and metadata

The metadata section defines the unique identity and labels for the blueprint.

apiVersion: ai-factory.suse.com/v1alpha1
kind: Blueprint
metadata:
  labels:
    ai-factory.suse.com/blueprint-name: my-demo-ollama
    ai-factory.suse.com/blueprint-version: 1.0.0
  name: my-demo-ollama-1-0-0

Add a comment block at the beginning of the file summarizing what the blueprint deploys, which models it serves, and any differences from sibling variants. Because kubectl apply preserves comments in the repository source, this provides essential context for future maintenance.

5.2 Defining the blueprint specification

The spec section outlines the display metadata and prerequisites.

spec:
  source: Custom
  displayName: My Demo (Ollama, CPU)
  version: 1.0.0
  description: |
    Deploys a demonstration stack running local models on CPU using Ollama.

    This blueprint deploys Ollama in-cluster with persistent storage while maintaining a lightweight resource footprint.

    Prerequisites: The SUSE AI Factory operator, the application-collection ClusterRepo and credentials secret, and a default StorageClass. After registering, create an AIWorkload from this blueprint in the Web interface.

Provide a concise description that ends with a clear summary of prerequisites. This description is displayed directly to users in the SUSE AI Factory Web interface.

5.3 Selecting a chart repository

The chartRepo parameter must reference an active SUSE Rancher Prime ClusterRepo resource on the target cluster. Standard repositories in SUSE AI Factory include:

Repository (chartRepo)ContentsPre-registered

application-collection

SUSE Application Collection charts (ollama, vllm, apache-airflow, postgresql, grafana)

Yes, on SUSE AI Factory clusters.

suse-ai-registry

SUSE AI charts (qdrant, litellm)

Yes, on SUSE AI Factory clusters.

If a chart is not in a pre-registered repository, add a ClusterRepo manifest in clusterrepos/. For more information, see Chapter 7, How do I manage additional Helm repositories?.

To identify available versions of a chart in the repository:

> kubectl get clusterrepo application-collection \
  -o yaml | grep -A2 downloadTime
> helm search repo application-collection/ollama --versions | head

5.4 Configuring chart values

Configure chart values under the values key:

    values:
      # Pin the service name to prevent Helm release name prefixes
      fullnameOverride: ollama
      image:
        pullPolicy: IfNotPresent
        registry: dp.apps.rancher.io
        repository: containers/ollama
        tag: 0.21.2-11.48
      persistentVolume:
        enabled: true
        accessModes:
        - ReadWriteOnce
        size: 20Gi
      service:
        port: 11434
        type: ClusterIP
      env:
      - name: QDRANT_URL
        value: http://qdrant:6333

Use ClusterIP services and forward local ports with kubectl port-forward during testing. Define an ingress block only when a component provides a Web user interface that requires external access.

5.5 Adding an Ollama component

The following configuration defines a standard Ollama component with CPU inference:

  - chartName: ollama
    chartRepo: application-collection
    chartVersion: 1.55.0
    values:
      fullnameOverride: ollama
      image:
        pullPolicy: IfNotPresent
        registry: dp.apps.rancher.io
        repository: containers/ollama
        tag: 0.21.2-11.48
      ollama:
        gpu:
          enabled: false 1
          draEnabled: false
        models:
          pull:
          - qwen2.5:0.5b
          run:
          - qwen2.5:0.5b
        port: 11434
      persistentVolume:
        enabled: true
        accessModes:
        - ReadWriteOnce
        size: 20Gi
      service:
        port: 11434
        type: ClusterIP

Key considerations for model management:

  • Models listed under models.pull are downloaded on initial startup. For demonstrations, lightweight models such as qwen2.5:0.5b, llama3.2:1b, and moondream:1.8b (vision) initialize quickly.

  • Models listed under models.run remain in memory. When serving multiple models, configure extraEnv variables such as OLLAMA_KEEP_ALIVE and OLLAMA_MAX_LOADED_MODELS.

  • Both embeddings and chat endpoints are served by the same service (http://ollama:11434 in-cluster).

1

Set gpu.enabled: true to enable GPU inference and hardware acceleration for Ollama. Once enabled you can allocate GPU resources, which will depend on the GPU vendor. Review GPU Operators and Assign GPU resources for additional information.

5.6 Operational considerations

Keep the following operational best practices in mind when constructing blueprints:

  • Set fullnameOverride: Always define fullnameOverride where supported. Without it, Helm prefixes the service name with the generated release name, which breaks port-forwarding scripts and internal DNS resolution.

  • Pin generated secrets in Airflow: When using Apache Airflow, pin the generated secret keys so that pod templates remain stable across Fleet reconciliation cycles:

      # Pin generated secret keys to prevent Fleet reconciliation loops
      fernetKey: "Nv3aCd-3agJbJG1QxzKMezX5pJZB4fRpZIrqhdS-MA4="
      jwtSecret: "72873f21d1682ddc023f0815344d1cdc0157e59c9c5480bcb430686d6ed466d3"
      webserverSecretKey: "bb3ea2e3f0a3ad96a2f440ab3ca4e3406985aaf72182662ebd339f53a7a28a7a"
Note
Note

For production environments, reference pre-created Kubernetes secrets rather than hardcoding static secrets in the blueprint definition.

  • Disable unused sub-charts: When using LocalExecutor with Airflow, set redis.enabled: false and flower.enabled: false to avoid deploying unnecessary pods that consume cluster resources.

5.7 Verifying the blueprint registration

Validate and register your blueprint using kubectl:

> kubectl apply --dry-run=server -f my-demo-ollama-1-0-0.yaml
> kubectl apply -f my-demo-ollama-1-0-0.yaml
> kubectl get blueprint my-demo-ollama-1-0-0 -o yaml