posit-dev / posit-dev/team-operator
SPIKE: Investigate executing rspm commands in PPM container for Git Builders setup
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 10
- Forks
- 1
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 4
Description
Problem
After mounting SSH keys into the PPM container (as described in #2381), we need to import these keys into PPM using the rspm import ssh-key command. This requires executing commands within the running PPM container programmatically from the team-operator controller. However, managing idempotency and workflow orchestration presents significant challenges.
Investigation Goals
Research and evaluate approaches for executing commands in the PPM container with proper idempotency and workflow management.
Key Questions to Answer
- How do we ensure idempotency when importing SSH keys (avoid re-importing unchanged keys)?
- How do we handle state management and track which keys have been imported?
- Should we use a lightweight configuration management tool instead of direct command execution?
- How do we handle key rotation and updates without disrupting service?
- What's the best approach for error handling and retry logic?
Technical Approaches to Evaluate
-
Direct command execution via remotecommand (https://pkg.go.dev/k8s.io/client-go/tools/remotecommand)
- Pros/cons of managing state ourselves
- Complexity of implementing idempotency
-
Lightweight configuration management tools
- Evaluate tools that could handle the workflow/idempotency problem
- Consider overhead and complexity of adding another tool
-
Alternative approaches
- Init containers
- Sidecar containers
- Operator-managed ConfigMaps for state tracking
Success Criteria
- Document recommended approach with justification
- Prototype proof-of-concept if feasible
- Identify risks and mitigation strategies
- Estimate implementation effort
Dependencies
This spike depends on understanding the SSH key mounting infrastructure from #2381.
Migrated from rstudio/ptd#2382
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the SSH key mounting infrastructure in #2381 and the Kubernetes remotecommand package. Compare direct execution, configuration-management, init/sidecar, and ConfigMap approaches for idempotency, state, rotation, retries, and workflow management; done means documenting a recommendation, risks, implementation estimate, and a proof of concept if feasible.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, kubernetes
- Domain
- devops, infrastructure
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100