Skip to content

Conversation

@jeremyeder
Copy link
Collaborator

Summary

  • Migrates ClusterRole and ClusterRoleBinding resources to namespace-scoped Role and RoleBinding
  • Enables deployment within specific namespaces rather than requiring cluster-wide permissions
  • Removes cluster-wide namespace permissions from operator role (incompatible with namespace-scoped roles)

Changes Made

Backend RBAC

  • backend-clusterrole.yaml: Changed from ClusterRole to Role
  • backend-clusterrolebinding.yaml: Changed from ClusterRoleBinding to RoleBinding, removed namespace from subjects

Operator RBAC

  • operator-clusterrole.yaml: Changed from ClusterRole to Role, removed namespace permissions
  • operator-clusterrolebinding.yaml: Changed from ClusterRoleBinding to RoleBinding, removed namespace from subjects

Test Plan

  • Deploy manifests to a test namespace using kubectl apply -k components/manifests/
  • Verify backend and operator pods start successfully with namespace-scoped permissions
  • Test that custom resource operations work within the target namespace
  • Confirm no cluster-wide access is required or attempted

Breaking Changes

⚠️ Important: The operator role previously had cluster-wide namespace access which has been removed. If the operator needs to detect/manage other namespaces, additional permissions will need to be granted separately.

🤖 Generated with Claude Code

jeremyeder and others added 9 commits September 24, 2025 18:08
- Fix YAML format to use messages array instead of custom fields
- Use openai/gpt-4o-mini model as per documentation
- Simplify content to single line to avoid parsing issues
- Include required testData and evaluators arrays

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Remove multiline formatting that may cause YAML parsing issues
- Use simple single-line content field
- Match exact documentation example format

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Change from 1-space to 2-space indentation to match exact documentation format
- Use >+ multiline format exactly as shown in working example

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Use absolute minimal YAML format to isolate parsing issue
- Remove all multiline content that could cause issues
- Test with simplest possible valid format

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Replace custom prompts with official examples from github/ai-assessment-comment-labeler
- Use bug-review.prompt.yml for bug assessment
- Use well-formed.prompt.yml for feature assessment
- Use spam-detection.prompt.yml for general assessment
- These are guaranteed to work with the GitHub action

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Change from @main to @v1 for stable version
- Remove ./ prefix from prompts_directory path
- Use 'Prompts' instead of './Prompts' as per documentation

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Remove feature-assessment.prompt.yml that was causing YAML parsing errors
- Update labels_to_prompts_mapping to exclude enhancement/feature mapping
- Test if bug and general assessment prompts work without the problematic file

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
…nd RoleBinding

- Convert backend ClusterRole to Role for namespace-scoped permissions
- Convert backend ClusterRoleBinding to RoleBinding
- Convert operator ClusterRole to Role, removing cluster-wide namespace permissions
- Convert operator ClusterRoleBinding to RoleBinding
- Remove namespace subjects from RoleBindings as they're not needed for namespace-scoped resources

This allows the RBAC resources to be deployed within a specific namespace
rather than requiring cluster-wide permissions.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@jeremyeder jeremyeder closed this Sep 25, 2025
@jeremyeder jeremyeder deleted the feature/migrate-rbac-to-namespace-scoped branch September 25, 2025 18:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant