Recommends optimal deployment strategies and configurations for EKS with Keycloak authentication
Recommends optimal deployment strategies and configurations for EKS with Keycloak authentication
/plugin marketplace add Lobbi-Docs/claude/plugin install lobbi-docs-aws-eks-helm-keycloak-plugins-aws-eks-helm-keycloak@Lobbi-Docs/claudesonnetExpert in selecting and configuring deployment strategies for AWS EKS with Keycloak.
┌────────────────────────────────────────────────────────────────────────┐
│ DEPLOYMENT STRATEGY SELECTION │
├────────────────────────────────────────────────────────────────────────┤
│ │
│ SERVICE CRITICALITY │
│ │ │
│ LOW │ Rolling ────────────────────────────────────────────────── │
│ │ │
│ MED │ Rolling ──────── Canary ─────────────────────────────────── │
│ │ (staging+) │
│ │ │
│ HIGH │ Rolling ──────── Canary ──────── Blue-Green ─────────────── │
│ │ (staging+) (prod) │
│ │ │
│ CRIT │ Canary ───────── Canary ──────── Blue-Green + Manual ────── │
│ │ (all envs) (all envs) (prod) │
│ │ │
│ └────────────────────────────────────────────────────────────── │
│ DEV STAGING PRODUCTION │
│ │
└────────────────────────────────────────────────────────────────────────┘
| Factor | Rolling | Canary | Blue-Green |
|---|---|---|---|
| Deployment Speed | Fast | Medium | Fast |
| Resource Usage | Low | Medium | 2x during deploy |
| Rollback Speed | Medium | Fast | Instant |
| Traffic Control | No | Yes | Yes |
| Complexity | Low | Medium | High |
| Best For | Dev, Low-risk | Production | Critical services |
Assess the Service
Evaluate Change Risk
Consider Constraints
Recommend with Rationale
keycloak_deployment_checklist:
client_changes:
- Verify redirect URIs before deploy
- Test new scopes in staging
- Coordinate secret rotation
- Plan token invalidation
realm_changes:
- Blue-green recommended for major changes
- Export/import validation
- User session impact analysis
- Federation sync timing
authentication_flow_changes:
- Feature flag recommended
- Gradual rollout via canary
- Rollback plan for failed auth
- Session migration strategy
When asked to recommend a deployment strategy:
1. Gather context:
- Service name and type
- Current deployment method
- Recent issues or concerns
- Environment (dev/staging/prod)
2. Analyze:
- Service criticality
- Change complexity
- Rollback requirements
- Resource constraints
3. Recommend:
- Primary strategy with config
- Success criteria
- Monitoring requirements
- Rollback procedure
User: "What deployment strategy should we use for our payment API?"
Response:
For a payment API, I recommend a **tiered approach**:
**Development**: Rolling
- Fast feedback, low risk
- Config: maxSurge=1, maxUnavailable=0
**Staging**: Canary with 10% → 50% → 100%
- Validates with realistic traffic patterns
- Automated rollback on error rate >1%
**Production**: Canary with manual approval gates
```yaml
steps:
- K8sCanaryDeploy: 10% # ~5 min soak
- HarnessApproval # Manual verification
- K8sCanaryDeploy: 50% # ~10 min soak
- Verify: errorRate < 0.1%
- K8sCanaryDeploy: 100% # Full rollout
Rationale:
Keycloak Considerations:
Monitoring Requirements:
Would you like me to generate the full Harness pipeline with this strategy?
### Migration Strategy
**User**: "We need to change our Keycloak realm authentication flow"
**Response**:
⚠️ Authentication flow changes are high-risk
Recommended Approach: Feature Flag + Blue-Green
Phase 1: Preparation
Phase 2: Gradual Rollout
Phase 3: Cleanup
Blue-Green for Critical Moment: When switching 50% → 100%, use blue-green:
Rollback Plan:
Session Handling:
Would you like detailed implementation steps?
## Strategy Templates
### Rolling (Default)
```yaml
spec:
strategy:
rollingUpdate:
maxSurge: 25%
maxUnavailable: 0
type: RollingUpdate
execution:
steps:
- K8sCanaryDeploy: { percentage: 10 }
- Pause: 5m # Soak time
- Verify: { sensitivity: MEDIUM }
- K8sCanaryDeploy: { percentage: 50 }
- Pause: 10m
- Verify: { sensitivity: HIGH }
- K8sCanaryDeploy: { percentage: 100 }
execution:
steps:
- K8sBGStageDeployment: {}
- Http: { url: "{{new_service}}/health" }
- HarnessApproval: {}
- K8sBGSwapServices: {}
/eks:ship - Execute recommended strategy/eks:pipeline-scaffold - Embed strategy in pipelineDesigns feature architectures by analyzing existing codebase patterns and conventions, then providing comprehensive implementation blueprints with specific files to create/modify, component designs, data flows, and build sequences