Skip to content

Story #22: Cloud Controller Manager Component Credential Integration#1

Open
splat-sdlc-agent[bot] wants to merge 3 commits into
mainfrom
story-22-cloud-controller
Open

Story #22: Cloud Controller Manager Component Credential Integration#1
splat-sdlc-agent[bot] wants to merge 3 commits into
mainfrom
story-22-cloud-controller

Conversation

@splat-sdlc-agent
Copy link
Copy Markdown

@splat-sdlc-agent splat-sdlc-agent Bot commented Apr 24, 2026

Story

Closes openshift-splat-team/splat-team#22

Cloud Controller Manager Component Credential Integration

Implementation

This PR implements component credential integration for the Cloud Controller Manager for story openshift#22.

See story issue for full implementation details, test results, and QE verification.


Staging PR - managed by BotMinter superman-atlas

rvanderp3 and others added 2 commits April 23, 2026 16:20
…egration

Implement vSphere Cloud Controller Manager integration with component-specific
credentials to support reading vsphere-cloud-controller-creds from
openshift-cloud-controller-manager namespace.

Implementation:
- Credential reader module (credentials.go) with FQDN-based lookup
- Privilege validator module (privileges.go) with 10 cloud controller privileges
- Comprehensive test coverage (2 test files)

Cloud Controller privileges defined:
- System.Anonymous, Read, View
- VirtualMachine.Inventory.Register, Unregister
- VirtualMachine.Config.AddExistingDisk, AddNewDisk, RemoveDisk, EditDevice
- Resource.AssignVMToPool

Features:
- Component credential reading from openshift-cloud-controller-manager namespace
- Fallback to shared credentials when component credentials not found
- Multi-vCenter support with FQDN-keyed credentials
- Privilege validation before node discovery operations
- Graceful credential rotation support
- Detailed error reporting

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Address three critical issues from code review:

1. Add missing fmt import to credentials_test.go
   - Line 184 uses fmt.Sprintf but import was missing
   - Fixes compilation error

2. Replace write privileges with read-only privileges
   - CloudControllerPrivileges now contains only read-only privileges:
     * VirtualMachine.Inventory.Read (not Register/Unregister)
     * Datacenter.Read, Network.Read, Datastore.Browse, Resource.Read
   - Removes write operations (Config.*, Inventory.Register/Unregister, AssignVMToPool)
   - Satisfies AC2 requirement for read-only credentials

3. Document ValidatePrivileges scope and limitations
   - Add comprehensive documentation explaining current implementation validates
     only credential structure (non-empty username/password)
   - Clearly document that vSphere API privilege checking is future work
   - Provide rationale for basic validation scope

All acceptance criteria feedback addressed.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@rvanderp3 rvanderp3 force-pushed the story-22-cloud-controller branch from 50a83ab to f9b31a6 Compare May 1, 2026 16:01
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.

Cloud Controller Manager Component Credential Integration

1 participant