Skip to content

CNTRLPLANE-3718: Add AI SDLC context files - #362

Merged
openshift-merge-bot[bot] merged 3 commits into
openshift:mainfrom
oceanc80:ai-sdlc
Jun 26, 2026
Merged

openshift-merge-bot[bot] merged 3 commits into
openshift:mainfrom
oceanc80:ai-sdlc

Conversation

@oceanc80

@oceanc80 oceanc80 commented Jun 24, 2026 •

Copy link
Copy Markdown
Contributor

Adds AGENTS.md, ARCHITECTURE.md, and CONTRIBUTING.md files to provide guidance to both AI agents and human contributors

Summary by CodeRabbit

  • Documentation
    • Added repository guidance for contributors and AI coding assistants, including architecture overview, build/test/verify commands, and contribution rules.
    • Documented the service-ca-operator architecture, including certificate provisioning, CA bundle injection, rotation behavior, and user-facing annotations.
    • Reworked contribution guidelines with clearer scope, code/testing conventions, PR/verification expectations, and OTE test framework usage.
    • Streamlined the README with a shorter overview and updated Quick Start and testing instructions.

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Jun 24, 2026
@openshift-ci-robot

openshift-ci-robot commented Jun 24, 2026 •

Copy link
Copy Markdown
Contributor

@oceanc80: This pull request references CNTRLPLANE-3718 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "5.0.0" version, but no target version was set.

Details

In response to this:

Adds AGENTS.md, ARCHITECTURE.md, and CONTRIBUTING.md files to provide guidance to both AI agents and human contributors

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci
openshift-ci Bot requested review from ingvagabund and tjungblu June 24, 2026 20:19
@coderabbitai

coderabbitai Bot commented Jun 24, 2026 •

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository: openshift/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 8346e20d-218c-4199-b8a1-6592b2e76e10

📥 Commits

Reviewing files that changed from the base of the PR and between 92204d8 and e258072.

📒 Files selected for processing (1)
  • CONTRIBUTING.md
✅ Files skipped from review due to trivial changes (1)
  • CONTRIBUTING.md

Walkthrough

Adds repository documentation for AI guidance, service-ca-operator architecture, contribution rules, and README structure and links.

Changes

Repository documentation refresh

Layer / File(s) Summary
Assistant guidance and architecture docs
AGENTS.md, ARCHITECTURE.md
Adds AI coding assistant guidance and architecture documentation for the operator/controller split, certificate flows, rotation, annotations, topology, dependencies, and design decisions.
Contribution guidance
CONTRIBUTING.md
Adds repository scope, code conventions, testing guidance, pull request requirements, review expectations, and OTE test instructions.
README refresh
README.md
Rewrites the overview, quick start, OTE testing section, and repository documentation links.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

🚥 Pre-merge checks | ✅ 15
✅ Passed checks (15 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: adding AI SDLC context documentation files.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Stable And Deterministic Test Names ✅ Passed Changed test files use no Ginkgo node titles; the only formatted subtests are deterministic fixed bool cases, with no dynamic pod/UUID/namespace values.
Test Structure And Quality ✅ Passed PASS: The PR only adds/rewrites markdown docs; no Ginkgo test code was changed, so the test-structure checks don’t apply.
Microshift Test Compatibility ✅ Passed This PR adds only documentation files; no new Ginkgo e2e specs were introduced, so MicroShift compatibility isn’t affected.
Single Node Openshift (Sno) Test Compatibility ✅ Passed Only markdown docs changed; no new Ginkgo e2e specs or node-topology assumptions were introduced, so SNO compatibility is not implicated.
Topology-Aware Scheduling Compatibility ✅ Passed Only docs changed; no manifests, operator code, or controllers were modified to add topology-sensitive scheduling constraints.
Ote Binary Stdout Contract ✅ Passed PASS: PR only adds/rewrites docs (AGENTS/ARCHITECTURE/CONTRIBUTING/README); no process-level code or stdout paths were touched.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed PASS: The change set is markdown-only; no Go/e2e/Ginkgo test files were added or modified, so the IPv6/disconnected-network test check is not applicable.
No-Weak-Crypto ✅ Passed PR changes are documentation-only, and the touched docs contain no MD5/SHA1/DES/RC4/3DES/Blowfish/ECB, custom crypto, or secret-compare code.
Container-Privileges ✅ Passed PR only adds docs; manifest scan found no privileged:true, hostPID/hostNetwork/hostIPC, SYS_ADMIN, runAsUser:0, or allowPrivilegeEscalation:true.
No-Sensitive-Data-In-Logs ✅ Passed The PR only changes documentation, and the diff shows no added log statements or sensitive-data examples.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 6

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@ARCHITECTURE.md`:
- Around line 14-65: The fenced diagram blocks in ARCHITECTURE.md are missing
language labels, triggering markdownlint warnings. Update each fenced block in
the architecture diagram section to use a text label (for example, on the
opening fence) so the markdown stays lint-clean; this applies to both diagram
fences referenced in the document.
- Around line 104-115: The rotation process description overstates the scope of
the CA bundle ConfigMap updates. In the ARCHITECTURE.md rotation steps, revise
the text around manageSignerCABundle to describe updating the single shared
signing-cabundle ConfigMap rather than one per namespace, while keeping the
per-namespace behavior attributed to the injected resources and controller
re-injection flow.
- Around line 147-149: The Service Annotations description misattributes Secret
creation to the operator instead of the controller. Update the wording in the
Service Annotations section so the
`service.beta.openshift.io/serving-cert-secret-name` entry says the controller
creates the Secret, while keeping the
`service.beta.openshift.io/serving-cert-signed-by` explanation aligned with the
controller’s responsibility.

In `@CONTRIBUTING.md`:
- Line 31: The CONTRIBUTING guidance uses the गैरstandard spelling “MacOS” in
user-facing text and should be made consistent with the canonical “macOS”.
Update the wording in the affected guidance so it uses “macOS” everywhere it
appears, including the related occurrence noted by the review, and keep the rest
of the sentence unchanged.
- Around line 175-179: Rename the “Building the test binary” section so it
matches the actual `make build` target, which builds the full binaries rather
than just a test binary. Update the heading in the CONTRIBUTING section to
something like “Building the binaries” and keep the existing `make build`
example under it, using the section title as the unique locator for the change.
- Around line 141-143: The resource list in CONTRIBUTING.md is malformed because
the links are collapsed together with stray control characters, so fix the
Markdown list formatting. Update the section containing the OpenShift PR
resources so each URL is its own bullet item, keeping the surrounding text
intact and ensuring the list renders cleanly in Markdown.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository: openshift/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: e3746bfa-2924-46cf-9adf-02e6238d175b

📥 Commits

Reviewing files that changed from the base of the PR and between 35cf518 and 5e8bcab.

📒 Files selected for processing (3)
  • AGENTS.md
  • ARCHITECTURE.md
  • CONTRIBUTING.md

Comment thread ARCHITECTURE.md
Comment on lines +14 to +65
```
┌─────────────────────────────────────────────────────────────┐
│ Operator Process (openshift-service-ca-operator namespace) │
│ │
│ ┌────────────────────────────────────────────────────┐ │
│ │ pkg/operator/ │ │
│ │ │ │
│ │ • Manages controller Deployment lifecycle │ │
│ │ • Creates/rotates signing CA keypair (Secret) │ │
│ │ • Maintains CA bundle ConfigMap │ │
│ │ • Reports ClusterOperator status │ │
│ │ • Detects feature gates → forwards to controller │ │
│ └────────────────────────────────────────────────────┘ │
└─────────────────────────────────────────────────────────────┘
│
│ Deploys & manages
↓
┌─────────────────────────────────────────────────────────────┐
│ Controller Process (openshift-service-ca namespace) │
│ │
│ ┌─────────────────────────────────────────────────────┐ │
│ │ pkg/controller/servingcert/ │ │
│ │ Serving Cert Signer │ │
│ │ • Watches Services with serving-cert annotation │ │
│ │ • Generates TLS cert/key signed by service CA │ │
│ │ • Creates Secret with tls.crt and tls.key │ │
│ │ • Supports headless services (SAN wildcards) │ │
│ └─────────────────────────────────────────────────────┘ │
│ │
│ ┌─────────────────────────────────────────────────────┐ │
│ │ pkg/controller/cabundleinjector/ │ │
│ │ CA Bundle Injector │ │
│ │ • ConfigMap injector (service-ca.crt data key) │ │
│ │ • APIService injector (spec.caBundle field) │ │
│ │ • CRD injector (conversion webhook caBundle) │ │
│ │ • MutatingWebhookConfiguration injector │ │
│ │ • ValidatingWebhookConfiguration injector │ │
│ │ • Legacy vulnerable injection (4.7 upgrade path) │ │
│ └─────────────────────────────────────────────────────┘ │
└─────────────────────────────────────────────────────────────┘
│
│ Uses
↓
┌─────────────────────────────────────────────────────────────┐
│ Signing CA Secret (openshift-service-ca namespace) │
│ signing-key │
│ • tls.crt — Current signing CA certificate │
│ • tls.key — Current signing CA private key │
│ • ca-bundle.crt — Full CA bundle (current + old CAs) │
│ • intermediate-ca.crt — Post-rotation bridge cert │
└─────────────────────────────────────────────────────────────┘
```

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Label the fenced diagrams for markdownlint.

Both fenced blocks are unlabeled, matching the static-analysis warning. Adding text keeps the docs lint-clean.

Also applies to: 168-170

🧰 Tools
🪛 markdownlint-cli2 (0.22.1)

[warning] 14-14: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@ARCHITECTURE.md` around lines 14 - 65, The fenced diagram blocks in
ARCHITECTURE.md are missing language labels, triggering markdownlint warnings.
Update each fenced block in the architecture diagram section to use a text label
(for example, on the opening fence) so the markdown stays lint-clean; this
applies to both diagram fences referenced in the document.

Source: Linters/SAST tools

Comment thread ARCHITECTURE.md Outdated
Comment thread ARCHITECTURE.md
Comment thread CONTRIBUTING.md Outdated
Comment thread CONTRIBUTING.md
Comment on lines +141 to +143
For more information regarding more general OpenShift pull request processes, the following resources are helpful: - https://docs.ci.openshift.org/architecture/jira - https://docs.ci.openshift.org/
- https://steps.ci.openshift.org/

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Fix the malformed resource list.

Those links are collapsed into one line with stray control characters, so the Markdown won’t render cleanly. Split them into separate bullets.

♻️ Proposed fix
-For more information regarding more general OpenShift pull request processes, the following resources are helpful:��- https://docs.ci.openshift.org/architecture/jira�- https://docs.ci.openshift.org/
-- https://steps.ci.openshift.org/
+For more information regarding more general OpenShift pull request processes, the following resources are helpful:
+- https://docs.ci.openshift.org/architecture/jira
+- https://docs.ci.openshift.org/
+- https://steps.ci.openshift.org/
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
For more information regarding more general OpenShift pull request processes, the following resources are helpful:��- https://docs.ci.openshift.org/architecture/jira�- https://docs.ci.openshift.org/
- https://steps.ci.openshift.org/
For more information regarding more general OpenShift pull request processes, the following resources are helpful:
- https://docs.ci.openshift.org/architecture/jira
- https://docs.ci.openshift.org/
- https://steps.ci.openshift.org/
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@CONTRIBUTING.md` around lines 141 - 143, The resource list in CONTRIBUTING.md
is malformed because the links are collapsed together with stray control
characters, so fix the Markdown list formatting. Update the section containing
the OpenShift PR resources so each URL is its own bullet item, keeping the
surrounding text intact and ensuring the list renders cleanly in Markdown.

Comment thread CONTRIBUTING.md
Comment on lines +175 to +179
### Building the test binary

```bash
make build
```

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Rename this section to match the actual build target.

make build is the repo’s full build command, so “Building the test binary” is a bit misleading. Consider renaming this to “Building the binaries” or similar.

♻️ Proposed fix
-### Building the test binary
+### Building the binaries
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
### Building the test binary
```bash
make build
```
### Building the binaries
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@CONTRIBUTING.md` around lines 175 - 179, Rename the “Building the test
binary” section so it matches the actual `make build` target, which builds the
full binaries rather than just a test binary. Update the heading in the
CONTRIBUTING section to something like “Building the binaries” and keep the
existing `make build` example under it, using the section title as the unique
locator for the change.

Source: Coding guidelines

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@ARCHITECTURE.md`:
- Around line 20-23: The remaining fenced diagram blocks in ARCHITECTURE.md are
still unlabeled and trigger MD040; update each opening fence to use a text
language tag. Locate the two diagram fences around the service-ca-operator
architecture diagram and add the same label to the other remaining fence in the
document so all fenced blocks are explicitly tagged.
- Around line 31-37: The architecture table has incorrect controller package
paths, with entries like servingcert/controller/ and cabundleinjector/* missing
the pkg/controller/ prefix. Update the affected rows in ARCHITECTURE.md to point
to the real pkg/controller/... locations for the serving cert and CA injector
controllers, using the existing component names (for example, Serving Cert
Signer, ConfigMap CA Injector, APIService CA Injector, Webhook CA Injectors, and
CRD CA Injector) to keep the table accurate.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository: openshift/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 672c53a1-8de6-43e4-8a80-287867792e47

📥 Commits

Reviewing files that changed from the base of the PR and between 5e8bcab and 0ef0d32.

📒 Files selected for processing (3)
  • AGENTS.md
  • ARCHITECTURE.md
  • README.md

Comment thread ARCHITECTURE.md
Comment on lines +20 to +23
```
service-ca-operator operator → pkg/operator/ → manages CA + controller Deployment
service-ca-operator controller → pkg/controller/ → signs certs, injects bundles
```

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Label the remaining diagram fences.

Both unlabeled fenced blocks still trigger MD040; add text to each opening fence.

Fix
-```
+```text

Based on the markdownlint warning, these fences still need a language tag.

Also applies to: 89-95

🧰 Tools
🪛 markdownlint-cli2 (0.22.1)

[warning] 20-20: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@ARCHITECTURE.md` around lines 20 - 23, The remaining fenced diagram blocks in
ARCHITECTURE.md are still unlabeled and trigger MD040; update each opening fence
to use a text language tag. Locate the two diagram fences around the
service-ca-operator architecture diagram and add the same label to the other
remaining fence in the document so all fenced blocks are explicitly tagged.

Source: Linters/SAST tools

Comment thread ARCHITECTURE.md
Comment on lines +31 to +37
| Serving Cert Signer | `servingcert/controller/` | Services, Secrets | Creates TLS Secrets for annotated Services |
| Serving Cert Updater | `servingcert/controller/` | Services, Secrets | Refreshes certs approaching expiry |
| ConfigMap CA Injector | `cabundleinjector/configmap.go` | ConfigMaps | Injects CA bundle into annotated ConfigMaps |
| APIService CA Injector | `cabundleinjector/apiservice.go` | APIServices | Sets `spec.caBundle` on annotated APIServices |
| Webhook CA Injectors | `cabundleinjector/admissionwebhook.go` | Mutating/ValidatingWebhookConfigs | Sets `caBundle` on annotated webhooks |
| CRD CA Injector | `cabundleinjector/crd.go` | CRDs | Sets conversion webhook `caBundle` |
| Legacy Vulnerable Injector | `cabundleinjector/configmap.go` | ConfigMaps named `openshift-service-ca.crt` | Injects legacy bundle for pre-4.7 upgraded clusters |

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Fix the controller package paths.

The table should point at the real pkg/controller/... directories; servingcert/controller/ is malformed, and the other rows drop the same prefix.

Fix
-| Serving Cert Signer | `servingcert/controller/` | Services, Secrets | Creates TLS Secrets for annotated Services |
+| Serving Cert Signer | `pkg/controller/servingcert/` | Services, Secrets | Creates TLS Secrets for annotated Services |

As per coding guidelines, controller packages live under pkg/controller/....

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@ARCHITECTURE.md` around lines 31 - 37, The architecture table has incorrect
controller package paths, with entries like servingcert/controller/ and
cabundleinjector/* missing the pkg/controller/ prefix. Update the affected rows
in ARCHITECTURE.md to point to the real pkg/controller/... locations for the
serving cert and CA injector controllers, using the existing component names
(for example, Serving Cert Signer, ConfigMap CA Injector, APIService CA
Injector, Webhook CA Injectors, and CRD CA Injector) to keep the table accurate.

Source: Coding guidelines

@everettraven everettraven left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Jun 25, 2026
@openshift-ci

openshift-ci Bot commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: everettraven

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci Bot added approved Indicates a PR has been approved by an approver from all required OWNERS files. and removed lgtm Indicates that a PR is ready to be merged. labels Jun 25, 2026
@openshift-ci

openshift-ci Bot commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

@oceanc80: all tests passed!

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

@everettraven

Copy link
Copy Markdown

/lgtm
/verified bypass

@openshift-ci-robot openshift-ci-robot added the verified Signifies that the PR passed pre-merge verification criteria label Jun 26, 2026
@openshift-ci-robot

Copy link
Copy Markdown
Contributor

@everettraven: The verified label has been added.

Details

In response to this:

/lgtm
/verified bypass

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Jun 26, 2026
@openshift-merge-bot
openshift-merge-bot Bot merged commit 883c387 into openshift:main Jun 26, 2026
12 checks passed
@oceanc80
oceanc80 deleted the ai-sdlc branch June 26, 2026 14:10
sanchezl added a commit to sanchezl/service-ca-operator that referenced this pull request Jul 6, 2026
CLAUDE.md was added in PR openshift#333 as a standalone file. PR openshift#362 later
added AGENTS.md (with the same content restructured) plus
ARCHITECTURE.md and CONTRIBUTING.md, which together cover everything
in the original CLAUDE.md. Replace the standalone file with a symlink
so Claude Code discovers the same content as other AI tools reading
AGENTS.md — one source of truth, zero duplication.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged. verified Signifies that the PR passed pre-merge verification criteria

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants