Skip to content

Commit c03b4b8

Browse files
authored
Merge pull request #1 from platex-rehor-bot/bot/onboarding-REHOR-97
[Phase 1/3] Add instance scaffolding for Patternfly (REHOR-97)
2 parents 30cd667 + d9c8008 commit c03b4b8

12 files changed

Lines changed: 343 additions & 0 deletions

File tree

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "dev-bot"]
2+
path = dev-bot
3+
url = https://github.com/OpenShift-Fleet/rehor.git

README.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# react-component-groups-agent-dev
2+
3+
Rehor bot instance for Patternfly.
4+
5+
## Setup
6+
7+
```bash
8+
git clone --recurse-submodules <this-repo-url>
9+
cd react-component-groups-agent-dev
10+
```
11+
12+
## Submodule Update
13+
14+
```bash
15+
git submodule update --remote dev-bot
16+
git add dev-bot
17+
git commit -m "chore: bump dev-bot submodule"
18+
```
19+
20+
## Build
21+
22+
Builds are handled by Konflux CI. The `.tekton/` pipeline files are generated by the
23+
Konflux UI after Component registration. The Dockerfile is at `dev-bot/Dockerfile.runner`.

deploy/template.yaml

Lines changed: 248 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,248 @@
1+
apiVersion: template.openshift.io/v1
2+
kind: Template
3+
metadata:
4+
name: react-component-groups-agent-dev
5+
parameters:
6+
- name: NAMESPACE
7+
value: ${NAMESPACE}
8+
- name: BOT_IMAGE
9+
value: quay.io/redhat-services-prod/REPLACE-WITH-KONFLUX-TENANT/react-component-groups-agent-dev
10+
- name: IMAGE_TAG
11+
required: true
12+
- name: BOT_LABEL
13+
value: rehor-ai-patternfly
14+
- name: BOT_REPLICAS
15+
value: "0"
16+
- name: BOT_BOARD_NAME
17+
value: ""
18+
- name: BOT_SPRINT_PREFIX
19+
value: ""
20+
- name: BOT_INCLUDE_BACKLOG
21+
value: "false"
22+
- name: BOT_INSTANCE_ID
23+
value: ""
24+
- name: BOT_CONFIG_REPO
25+
value: ""
26+
- name: BOT_NAME
27+
value: devbot-patternfly
28+
- name: BOT_CONFIG_PATH
29+
value: ""
30+
- name: GCP_PROJECT_ID
31+
required: true
32+
- name: GCP_REGION
33+
required: true
34+
- name: VERTEX_ALLOWED_MODELS
35+
required: true
36+
- name: SLACK_WEBHOOK_URL
37+
value: ""
38+
- name: SLACK_NOTIFY_MODE
39+
value: ""
40+
objects:
41+
42+
# Bot-only deployment for react-component-groups-agent-dev runner instance.
43+
# Shared infrastructure (proxy, memory-server, secrets) deployed by
44+
# platform-frontend-ai-dev template in the same namespace.
45+
46+
# --- Bot Deployment ---
47+
- apiVersion: apps/v1
48+
kind: Deployment
49+
metadata:
50+
name: ${BOT_NAME}
51+
labels:
52+
app.kubernetes.io/name: ${BOT_NAME}
53+
app.kubernetes.io/component: bot
54+
app.kubernetes.io/part-of: devbot
55+
spec:
56+
replicas: ${{BOT_REPLICAS}}
57+
selector:
58+
matchLabels:
59+
app.kubernetes.io/name: ${BOT_NAME}
60+
template:
61+
metadata:
62+
labels:
63+
app.kubernetes.io/name: ${BOT_NAME}
64+
app.kubernetes.io/component: bot
65+
app.kubernetes.io/part-of: devbot
66+
spec:
67+
containers:
68+
- name: bot
69+
image: ${BOT_IMAGE}:${IMAGE_TAG}
70+
securityContext:
71+
runAsNonRoot: true
72+
allowPrivilegeEscalation: false
73+
seccompProfile:
74+
type: RuntimeDefault
75+
capabilities:
76+
drop: ["ALL"]
77+
env:
78+
- name: BOT_LABEL
79+
value: ${BOT_LABEL}
80+
- name: BOT_MEMORY_URL
81+
value: http://devbot-memory-server:8080/mcp
82+
- name: BOT_MEMORY_HEALTH_URL
83+
value: http://devbot-memory-server:8080/health
84+
- name: BOT_MEMORY_HEALTH_TIMEOUT
85+
value: "120"
86+
- name: CLAUDE_CODE_SKIP_VERTEX_AUTH
87+
value: "true"
88+
- name: ANTHROPIC_VERTEX_BASE_URL
89+
value: http://devbot-proxy:8443
90+
- name: ANTHROPIC_VERTEX_PROJECT_ID
91+
value: dummy-project
92+
- name: CLOUD_ML_REGION
93+
value: global
94+
- name: EXECUTOR_ADDR
95+
value: devbot-proxy:9090
96+
- name: HUSKY
97+
value: "0"
98+
- name: GH_USER_NAME
99+
valueFrom:
100+
secretKeyRef:
101+
name: devbot-secrets
102+
key: bot-gh-username
103+
- name: GH_USER_EMAIL
104+
valueFrom:
105+
secretKeyRef:
106+
name: devbot-secrets
107+
key: bot-email
108+
- name: GL_USER_NAME
109+
valueFrom:
110+
secretKeyRef:
111+
name: devbot-secrets
112+
key: bot-gl-name
113+
- name: GL_USER_EMAIL
114+
valueFrom:
115+
secretKeyRef:
116+
name: devbot-secrets
117+
key: bot-gl-email
118+
- name: BOT_JIRA_EMAIL
119+
valueFrom:
120+
secretKeyRef:
121+
name: devbot-secrets
122+
key: jira-email
123+
- name: SSO_USERNAME
124+
valueFrom:
125+
secretKeyRef:
126+
name: devbot-secrets
127+
key: e2e-username
128+
- name: SSO_PASSWORD
129+
valueFrom:
130+
secretKeyRef:
131+
name: devbot-secrets
132+
key: e2e-password
133+
- name: BOT_BOARD_NAME
134+
value: ${BOT_BOARD_NAME}
135+
- name: BOT_SPRINT_PREFIX
136+
value: ${BOT_SPRINT_PREFIX}
137+
- name: BOT_INCLUDE_BACKLOG
138+
value: ${BOT_INCLUDE_BACKLOG}
139+
- name: BOT_INSTANCE_ID
140+
value: ${BOT_INSTANCE_ID}
141+
- name: BOT_CONFIG_REPO
142+
value: ${BOT_CONFIG_REPO}
143+
- name: BOT_CONFIG_PATH
144+
value: ${BOT_CONFIG_PATH}
145+
- name: BOT_DASHBOARD_URL
146+
value: http://devbot-memory-server:8080/api/bot-status
147+
- name: COSTS_API_URL
148+
value: http://devbot-memory-server:8080/api/costs
149+
- name: SLACK_WEBHOOK_URL
150+
value: ${SLACK_WEBHOOK_URL}
151+
- name: SLACK_NOTIFY_MODE
152+
value: ${SLACK_NOTIFY_MODE}
153+
- name: PROXY_HOST
154+
value: devbot-proxy
155+
- name: HTTP_PROXY
156+
value: http://devbot-proxy:3128
157+
- name: HTTPS_PROXY
158+
value: http://devbot-proxy:3128
159+
- name: http_proxy
160+
value: http://devbot-proxy:3128
161+
- name: https_proxy
162+
value: http://devbot-proxy:3128
163+
- name: NO_PROXY
164+
value: devbot-memory-server,devbot-proxy,localhost,127.0.0.1
165+
- name: no_proxy
166+
value: devbot-memory-server,devbot-proxy,localhost,127.0.0.1
167+
- name: JIRA_MCP_URL
168+
value: http://devbot-proxy:8444/mcp
169+
- name: GH_RELEASE_UPLOAD_URL
170+
value: http://devbot-proxy:8446/upload
171+
resources:
172+
requests:
173+
cpu: "1"
174+
memory: 4Gi
175+
ephemeral-storage: 4Gi
176+
limits:
177+
cpu: "4"
178+
memory: 6Gi
179+
ephemeral-storage: 8Gi
180+
181+
# --- NetworkPolicy: Bot can only reach proxy + memory-server ---
182+
- apiVersion: networking.k8s.io/v1
183+
kind: NetworkPolicy
184+
metadata:
185+
name: ${BOT_NAME}-egress
186+
labels:
187+
app.kubernetes.io/part-of: devbot
188+
spec:
189+
podSelector:
190+
matchLabels:
191+
app.kubernetes.io/name: ${BOT_NAME}
192+
policyTypes:
193+
- Egress
194+
egress:
195+
- to:
196+
- podSelector:
197+
matchLabels:
198+
app.kubernetes.io/name: devbot-proxy
199+
ports:
200+
- port: 3128
201+
protocol: TCP
202+
- port: 9090
203+
protocol: TCP
204+
- port: 8443
205+
protocol: TCP
206+
- port: 8444
207+
protocol: TCP
208+
- port: 8446
209+
protocol: TCP
210+
- to:
211+
- podSelector:
212+
matchLabels:
213+
app.kubernetes.io/name: memory-server
214+
ports:
215+
- port: 8080
216+
protocol: TCP
217+
- to:
218+
- namespaceSelector:
219+
matchLabels:
220+
kubernetes.io/metadata.name: openshift-dns
221+
ports:
222+
- port: 5353
223+
protocol: UDP
224+
- port: 5353
225+
protocol: TCP
226+
227+
# --- Cron Scaler ---
228+
- apiVersion: keda.sh/v1alpha1
229+
kind: ScaledObject
230+
metadata:
231+
name: ${BOT_NAME}-cron-scaler
232+
labels:
233+
app.kubernetes.io/name: ${BOT_NAME}
234+
app.kubernetes.io/part-of: devbot
235+
spec:
236+
scaleTargetRef:
237+
apiVersion: apps/v1
238+
kind: Deployment
239+
name: ${BOT_NAME}
240+
minReplicaCount: 0
241+
maxReplicaCount: 1
242+
triggers:
243+
- type: cron
244+
metadata:
245+
timezone: "America/New_York"
246+
start: "0 9 * * 1-5"
247+
end: "0 18 * * 1-5"
248+
desiredReplicas: "1"

dev-bot

Submodule dev-bot added at 397ad52
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# react-component-groups-agent-dev — Additional Instructions
2+
3+
## Target Repos
4+
- **react-component-groups**: `https://github.com/patternfly/react-component-groups`
5+
6+
## Detected Tech Stacks
7+
- **patternfly/react-component-groups**: envs=[browser, node, patternfly-mcp], personas=[frontend]
8+
9+
## Team Conventions
10+
11+
<!-- Fill in team-specific conventions after scaffolding -->
12+
<!-- Examples: version managers, test commands, PR review norms -->
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
workflow: jira-sprint
2+
source: jira
3+
envs:
4+
- browser
5+
- node
6+
- patternfly-mcp
7+
claude_md:
8+
strategy: append
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"mcpServers": {
3+
"mcp-atlassian": {
4+
"type": "http",
5+
"url": "${JIRA_MCP_URL}"
6+
}
7+
}
8+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"mcpServers": {
3+
"patternfly-mcp": {
4+
"command": "npx",
5+
"args": ["-y", "@patternfly/patternfly-mcp@latest"],
6+
"description": "PatternFly rules and documentation"
7+
}
8+
}
9+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
Frontend persona for React/PatternFly applications.
2+
3+
## Stack
4+
5+
- React + TypeScript
6+
- PatternFly component library
7+
- Webpack/Vite bundler
8+
- Jest + React Testing Library
9+
10+
## Conventions
11+
12+
- `npm test` for tests, `npm run lint` for linting
13+
- Conventional commits: `fix(scope): description`
14+
- CSS modules or PatternFly utility classes
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"react-component-groups": {
3+
"url": "https://github.com/platex-rehor-bot/react-component-groups.git",
4+
"upstream": "https://github.com/patternfly/react-component-groups.git"
5+
}
6+
}

0 commit comments

Comments
 (0)