Skip to content

Commit 60f64a0

Browse files
committed
OTA-1971: Add CRs: Workflow, Agent, and ConfigMap
These manifests are taken from [1]. [1]. 07f4de9
1 parent e7d4a8b commit 60f64a0

3 files changed

Lines changed: 241 additions & 0 deletions
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
---
2+
apiVersion: v1
3+
kind: ConfigMap
4+
metadata:
5+
name: ota-advisory-prompt
6+
namespace: openshift-lightspeed
7+
annotations:
8+
release.openshift.io/feature-gate: LightspeedProposals
9+
data:
10+
prompt: |
11+
You are an OpenShift upgrade advisor. Analyze the cluster readiness
12+
data in the proposal request and produce an upgrade risk assessment.
13+
14+
The request contains a "Cluster Readiness Data" section with a JSON
15+
block. This was collected by the Cluster Version Operator — do not
16+
re-collect it. Parse the JSON, evaluate each check's results, and
17+
classify findings as blockers, warnings, or informational.
18+
19+
Use the ota-upgrade-advisor skill for the decision framework and
20+
blocker classification rules. When findings need deeper investigation,
21+
use prometheus, platform-docs, redhat-support, or product-lifecycle
22+
skills.
23+
24+
When the readiness data includes olm_operator_lifecycle results, use
25+
the product-lifecycle skill to cross-reference each operator's package
26+
name against the Red Hat Product Life Cycle API. Report support phase,
27+
EOL dates, and OCP compatibility from PLCC alongside the OLM data.
28+
29+
Do not guess or assume cluster state. Do not execute upgrade commands.
Lines changed: 197 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,197 @@
1+
---
2+
apiVersion: agentic.openshift.io/v1alpha1
3+
kind: Agent
4+
metadata:
5+
name: ota-advisor
6+
annotations:
7+
release.openshift.io/feature-gate: LightspeedProposals
8+
spec:
9+
llmRef:
10+
name: smart
11+
skills:
12+
# Source: https://github.com/openshift/agentic-skills
13+
- image: quay.io/harpatil/ocp-skills:latest
14+
paths:
15+
- /skills/cluster-update/update-advisor
16+
- /skills/cluster-update/product-lifecycle
17+
- /skills/monitoring/prometheus
18+
- /skills/documentation/openshift
19+
- /skills/documentation/kubernetes
20+
- /skills/support/jira
21+
systemPromptRef:
22+
name: ota-advisory-prompt
23+
rawOutputSchema:
24+
description: >-
25+
Include structured component data about upgrade readiness.
26+
You MUST include exactly one ota_readiness_summary component.
27+
Include one ota_finding component for each blocker or warning discovered.
28+
If the readiness data contains an olm_operator_lifecycle section,
29+
include exactly one ota_olm_operator_status component.
30+
type: array
31+
minItems: 1
32+
items:
33+
oneOf:
34+
- type: object
35+
description: Overall upgrade readiness summary with per-check results.
36+
properties:
37+
type:
38+
type: string
39+
const: ota_readiness_summary
40+
decision:
41+
type: string
42+
enum: ["recommend", "caution", "block", "escalate"]
43+
description: >-
44+
"recommend" when all checks pass with no warnings.
45+
"caution" when warnings exist but no blockers.
46+
"block" when blockers must be resolved first.
47+
"escalate" when data is insufficient for a confident assessment.
48+
checks:
49+
type: array
50+
description: One entry per readiness check from the input JSON.
51+
items:
52+
type: object
53+
properties:
54+
name:
55+
type: string
56+
description: >-
57+
Human-readable check name, e.g. "Cluster Conditions",
58+
"Operator Health", "etcd Health"
59+
status:
60+
type: string
61+
enum: ["pass", "warn", "fail", "error"]
62+
description: >-
63+
"pass" if no issues. "warn" if non-blocking concerns.
64+
"fail" if blockers found. "error" if the check itself
65+
could not complete.
66+
detail:
67+
type: string
68+
description: >-
69+
Brief one-line summary, e.g. "All 34 operators healthy",
70+
"2 operators Degraded=True"
71+
required: ["name", "status"]
72+
required: ["type", "decision", "checks"]
73+
- type: object
74+
description: A specific blocker, warning, or informational finding.
75+
properties:
76+
type:
77+
type: string
78+
const: ota_finding
79+
severity:
80+
type: string
81+
enum: ["blocker", "warning", "info"]
82+
check:
83+
type: string
84+
description: >-
85+
Which readiness check surfaced this, e.g. "operator_health",
86+
"api_deprecations", "etcd_health"
87+
detail:
88+
type: string
89+
description: >-
90+
Clear description for a cluster administrator, e.g.
91+
"ClusterOperator 'dns' reports Degraded=True: DNS pod
92+
CrashLoopBackOff on worker-2"
93+
affectedResources:
94+
type: array
95+
items:
96+
type: string
97+
description: >-
98+
Affected resources in namespace/name format, e.g.
99+
"openshift-dns/dns-default". Omit if not applicable.
100+
prerequisite:
101+
type: string
102+
description: >-
103+
Action to resolve this before upgrading, e.g. "Investigate
104+
and resolve DNS pod crash on worker-2"
105+
verifyCommand:
106+
type: string
107+
description: >-
108+
Command to verify the finding is resolved, e.g.
109+
"oc get co dns -o jsonpath='{.status.conditions[?(@.type==\"Degraded\")].status}'"
110+
required: ["type", "severity", "check", "detail"]
111+
- type: object
112+
description: Per-operator OLM lifecycle status for the operator update planner.
113+
properties:
114+
type:
115+
type: string
116+
const: ota_olm_operator_status
117+
operators:
118+
type: array
119+
description: One entry per OLM-managed operator (Subscription).
120+
items:
121+
type: object
122+
properties:
123+
name:
124+
type: string
125+
description: Subscription name
126+
namespace:
127+
type: string
128+
displayName:
129+
type: string
130+
description: Human-readable name from the CSV
131+
installedVersion:
132+
type: string
133+
channel:
134+
type: string
135+
source:
136+
type: string
137+
description: CatalogSource name
138+
installPlanApproval:
139+
type: string
140+
enum: ["Automatic", "Manual"]
141+
pendingUpgrade:
142+
type: boolean
143+
pendingVersion:
144+
type: string
145+
compatibleWithTarget:
146+
type: boolean
147+
description: >-
148+
false when olm.maxOpenShiftVersion is less than the
149+
target OCP version
150+
availableChannels:
151+
type: array
152+
items:
153+
type: string
154+
ocpCompat:
155+
type: object
156+
properties:
157+
min:
158+
type: string
159+
max:
160+
type: string
161+
lifecycle:
162+
type: object
163+
description: >-
164+
Red Hat Product Life Cycle (PLCC) data for this operator,
165+
if available. Populated by querying the PLCC API using
166+
the operator's package name.
167+
properties:
168+
productName:
169+
type: string
170+
description: PLCC product name
171+
supportPhase:
172+
type: string
173+
enum: ["Full Support", "Maintenance Support", "End of life"]
174+
description: Current support status from PLCC
175+
ocpVersions:
176+
type: string
177+
description: >-
178+
OCP versions this product version is compatible with,
179+
e.g. "4.19, 4.20, 4.21"
180+
maintenanceEnds:
181+
type: string
182+
description: >-
183+
Maintenance support end date (ISO 8601 or descriptive
184+
string), e.g. "2027-04-21T00:00:00.000Z"
185+
required: ["name", "namespace"]
186+
summary:
187+
type: object
188+
properties:
189+
totalOperators:
190+
type: integer
191+
pendingUpgrades:
192+
type: integer
193+
manualApproval:
194+
type: integer
195+
incompatibleWithTarget:
196+
type: integer
197+
required: ["type", "operators", "summary"]
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
apiVersion: agentic.openshift.io/v1alpha1
3+
kind: Workflow
4+
metadata:
5+
name: ota-advisory
6+
annotations:
7+
release.openshift.io/feature-gate: LightspeedProposals
8+
spec:
9+
analysis:
10+
agentRef:
11+
name: ota-advisor
12+
execution:
13+
skip: true
14+
verification:
15+
skip: true

0 commit comments

Comments
 (0)