agentplat▸control runs deployments agents metering + agent
← runs

run_9ecae63eab3f0779

SUCCEEDED retrigger →
workload-health v1 · workload-health-k8s · owner wstuckey@mozilla.com (web-user) · via cli · cloud-engineering

input

{
  "request": "tell me about the health of the ads services",
  "references": [
    "app_code:ads"
  ],
  "sourceContext": {}
}

summary

Unable to assess health of the ads-tenant services (ads, mars, reporter, shepherd). Tenant context for "ads" was readable and shows the envelope (min=1, max=3 replicas, restart budget=2/hr for each workload), but the credentials bound to this run are scoped to a different tenant/service-account (system:serviceaccount:mzcld-demo-dev:mzcld-demo) and do not have access to the ads project's Kubernetes API or its Cloud Monitoring metrics. All k8s.workload.read calls returned 403/policy-blocked, and the metrics.query call returned a 403 Permission Denied on the ads GCP project. Without traffic, resource, restart-count, or log evidence, I cannot ground any scale or restart proposal, so no action is proposed. This looks like a credential/access-scope mismatch between the request (app_code:ads) and the run's bound service account, which should be corrected before a real health check can be performed.

findings

  • Tenant context for 'ads' was successfully read, defining the action envelope for all four owned workloads.
  • k8s.workload.read failed for all four ads workloads due to authorization/policy restrictions tied to the run's service account, not the tenant's actual permissions.
  • metrics.query failed for the ads GCP project due to missing Cloud Monitoring permissions on the same bound credential.
  • No log or traffic/resource/restart evidence could be gathered for any ads workload, so no failure pattern (OOM, crashloop, error spike) or saturation trend could be confirmed or ruled out.

proposed actions

none

tool calls

[
  {
    "capability": "tenant.context.read",
    "args": {
      "tenant": "ads"
    },
    "result": {
      "tenant": "ads",
      "function": "webservices",
      "risk_level": "high",
      "owners": [
        "workgroups/ads"
      ],
      "namespaces": [
        "ads"
      ],
      "projects": [
        "moz-fx-ads-nonprod",
        "moz-fx-ads-prod"
      ],
      "workloads": {
        "ads": {
          "kind": "Deployment",
          "min_replicas": 1,
          "max_replicas": 3,
          "restart_budget_per_hour": 2
        },
        "mars": {
          "kind": "Deployment",
          "min_replicas": 1,
          "max_replicas": 3,
          "restart_budget_per_hour": 2
        },
        "reporter": {
          "kind": "Deployment",
          "min_replicas": 1,
          "max_replicas": 3,
          "restart_budget_per_hour": 2
        },
        "shepherd": {
          "kind": "Deployment",
          "min_replicas": 1,
          "max_replicas": 3,
          "restart_budget_per_hour": 2
        }
      },
      "source": "https://github.com/mozilla/global-platform-admin/blob/main/tenants/ads.yaml"
    }
  },
  {
    "capability": "k8s.workload.read",
    "args": {
      "namespace": "ads",
      "workload": "ads"
    },
    "result": {
      "error": "k8s read ads/ads failed: (403)\nReason: Forbidden\nHTTP response headers: HTTPHeaderDict({'Audit-Id': 'bd09ae7f-ec9f-4408-aa33-55e1c02d1e0d', 'Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 'X-Content-Type-Options': 'nosniff', 'X-Kubernetes-Pf-Flowschema-Uid': 'eab5f5d9-a9f6-4d1f-b07b-109061dd4ab6', 'X-Kubernetes-Pf-Prioritylevel-Uid': '77a566ac-7891-469e-a894-87edbc1d0f8e', 'Date': 'Fri, 24 Jul 2026 21:20:44 GMT', 'Content-Length': '353'})\nHTTP response body: {\"kind\":\"Status\",\"apiVersion\":\"v1\",\"metadata\":{},\"status\":\"Failure\",\"message\":\"deployments.apps \\\"ads\\\" is forbidden: User \\\"system:serviceaccount:mzcld-demo-dev:mzcld-demo\\\" cannot get resource \\\"deployments\\\" in API group \\\"apps\\\" in the namespace \\\"ads\\\"\",\"reason\":\"Forbidden\",\"details\":{\"name\":\"ads\",\"group\":\"apps\",\"kind\":\"deployments\"},\"code\":403}\n\n"
    }
  },
  {
    "capability": "k8s.workload.read",
    "args": {
      "namespace": "ads",
      "workload": "mars"
    },
    "result": {
      "error": "read blocked by policy: resource not in run subject",
      "args": {
        "namespace": "ads",
        "workload": "mars"
      }
    },
    "blocked": true
  },
  {
    "capability": "k8s.workload.read",
    "args": {
      "namespace": "ads",
      "workload": "reporter"
    },
    "result": {
      "error": "read blocked by policy: resource not in run subject",
      "args": {
        "namespace": "ads",
        "workload": "reporter"
      }
    },
    "blocked": true
  },
  {
    "capability": "k8s.workload.read",
    "args": {
      "namespace": "ads",
      "workload": "shepherd"
    },
    "result": {
      "error": "read blocked by policy: resource not in run subject",
      "args": {
        "namespace": "ads",
        "workload": "shepherd"
      }
    },
    "blocked": true
  },
  {
    "capability": "metrics.query",
    "args": {
      "project": "moz-fx-ads-prod",
      "namespace": "ads",
      "resource": "ads",
      "metric": "container_cpu_usage_seconds_total",
      "window": "30m"
    },
    "result": {
      "error": "prometheus query failed: 403 Forbidden {\n  \"error\": {\n    \"code\": 403,\n    \"message\": \"Permission 'monitoring.timeSeries.list' denied on resource 'projects/680259440358' (or it may not exist)\",\n    \"status\": \"PERMISSION_DENIED\"\n  }\n}"
    }
  }
]

usage

{
  "model": "claude-sonnet-5",
  "input_tokens": 15309,
  "output_tokens": 1847,
  "estimated_cost_usd": 0.073632
}

approvals

[]

log

launched k8s job run-run-9ecae63eab3f0779 in ns/mzcld-demo-dev image=us-docker.pkg.dev/moz-fx-mzcld-demo-prod/mzcld-demo-prod/agentplat:latest
runner started
live reasoning model=claude-sonnet-5
POLICY: blocked read k8s.workload.read args={'namespace': 'ads', 'workload': 'mars'} not in run subject
POLICY: blocked read k8s.workload.read args={'namespace': 'ads', 'workload': 'reporter'} not in run subject
POLICY: blocked read k8s.workload.read args={'namespace': 'ads', 'workload': 'shepherd'} not in run subject