Commit a247337
authored
Add support for the PolicyEngine resource (#33)
Issue #, if available:
Description of changes:
Adds a new PolicyEngine custom resource to the bedrock-agentcore-control controller, enabling
AgentCore policy engines to be managed declaratively via Kubernetes.
- Enabled the resource in generator.yaml (removed PolicyEngine from the ignore list) and
configured its full CRUD mapping:
- PolicyEngineId renamed to ID (primary key) across the Create/Get/Update/Delete
operations.
- Name marked immutable; EncryptionKeyArn immutable with a cross-resource reference to KMS
Key.
- Read-only status fields sourced from GetPolicyEngine: CreatedAt, UpdatedAt,
StatusReasons.
- synced / updateable / deletable conditions keyed off Status.Status (ACTIVE, plus the
*_FAILED terminal states).
- ValidationException treated as terminal; 404 mapped to ResourceNotFoundException.
- Custom hooks (hooks/policy_engine/):
- sdk_update_post_build_request — wraps Description updates in the API's UpdatedDescription
optional-value shape.
- sdk_update_pre_build_request — syncs tags and short-circuits when only tags differ.
- sdk_read_one_post_set_output — fetches tags on read
APIs are unavailable (logs and continues rather than failing reconcile).
- Generated artifacts: new API types (policy_engine.go), CRD manifest, resource
manager/SDK/references/identifiers/delta, RBAC and Helm role entries, and controller
registration in cmd/controller/main.go.
- E2E tests (test/e2e/tests/test_policy_engine.py): create/delete, update description, and
update tags.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.1 parent 9918030 commit a247337
33 files changed
Lines changed: 3080 additions & 24 deletions
File tree
- apis/v1alpha1
- cmd/controller
- config
- crd
- bases
- rbac
- helm
- crds
- templates
- pkg/resource/policy_engine
- templates/hooks/policy_engine
- test/e2e
- resources
- tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| |||
178 | 178 | | |
179 | 179 | | |
180 | 180 | | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
181 | 262 | | |
182 | 263 | | |
183 | 264 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments