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
- Resolve the target vCluster from the tenant's kubeconfig Secret.
- Set the phase to
Deploying. - Create or update the
app-advisor-srvDeployment, Service, ServiceAccount and configuration inside the vCluster, with the tenant's ID and credentials. - 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
| Purpose | Address |
|---|---|
| Metrics | :8080 |
| Health and readiness probes | :8081 |
Configuration
| Variable | Default | Description |
|---|---|---|
ADVISOR_IMAGE | — | Default app-advisor-srv image for new advisors. |
KUBECONFIG | in-cluster | Kubeconfig for local development. |