Skip to main content
Version: 2.0

Advisor Controller

Component: advisor-controller (Kubernetes operator)

advisor-controller gives every tenant their own App Advisor. It runs in the host cluster and reconciles AdvisorAgent resources, deploying and managing an app-advisor-srv instance inside each tenant's vCluster.

Running one advisor per tenant — rather than one shared, multi-tenant service — keeps each tenant's data, advice and scaling completely separate, using the same "operator manages a per-tenant workload" pattern KubeOpera uses for CloudSpaces.

The AdvisorAgent resource​

tenant-controller creates an AdvisorAgent for each vCluster when it's provisioned:

apiVersion: kubeopera.io/v1alpha1
kind: AdvisorAgent
metadata:
name: alice-default
namespace: kubeopera-system
spec:
tenantCRName: alice-default # the vCluster to deploy into
tenantID: b1f0…
image: registry.kubeopera.io/app-advisor-srv:1.8.0
discoveryInterval: 10m
status:
phase: Ready # Pending | Deploying | Ready | Failed
version: 1.8.0

What happens on reconcile​

  1. Resolve the target vCluster from the tenant's kubeconfig Secret.
  2. Set the phase to Deploying.
  3. Create or update the app-advisor-srv Deployment, Service, ServiceAccount and configuration inside the vCluster, with the tenant's ID and credentials.
  4. Wait for it to become ready, then set the phase to Ready.

Upgrading every tenant's advisor is a change to the image version: the controller rolls it out to each vCluster. Deleting a tenant removes its AdvisorAgent, and the controller removes the advisor.

Operational endpoints​

PurposeAddress
Metrics:8080
Health and readiness probes:8081

Configuration​

VariableDefaultDescription
ADVISOR_IMAGE—Default app-advisor-srv image for new advisors.
KUBECONFIGin-clusterKubeconfig for local development.