You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Not aligned with cloud-native runtime config practices
Target Architecture (recommended)
Design
Use:
Amazon Web Services SSM Parameter Store
Amazon EKS IRSA
initContainer to fetch config at startup
shared volume mounted into nginx
Flow
flowchart
subgraph AWS[Amazon Web Services]
SSM[SSM Parameter Store /ui/runtime-config.json]
end
subgraph EKS[Amazon EKS Cluster]
SA[ServiceAccount ui-sa IRSA annotated]
IC[initContainer\naws-cli get-parameter]
VOL[emptyDir volume\n/config/runtime-config.json]
UI[UI container\nnginx + React]
end
SA --> IC
IC -->|GetParameter via IRSA| SSM
IC -->|writes| VOL
VOL -->|mounted as| UI
UI -->|serves| Browser[(Browser)]
✅ No image rebuilds
✅ No ConfigMap coupling
✅ Environment specific values in SSM
✅ Secure with IRSA
✅ Production-grade pattern
✅ Matches real SaaS architecture
Current (to be removed)
Today the UI configuration is stored in a Kubernetes ConfigMap.
ConfigMap
Problems with this approach
Target Architecture (recommended)
Design
Use:
Flow
flowchart subgraph AWS[Amazon Web Services] SSM[SSM Parameter Store /ui/runtime-config.json] end subgraph EKS[Amazon EKS Cluster] SA[ServiceAccount ui-sa IRSA annotated] IC[initContainer\naws-cli get-parameter] VOL[emptyDir volume\n/config/runtime-config.json] UI[UI container\nnginx + React] end SA --> IC IC -->|GetParameter via IRSA| SSM IC -->|writes| VOL VOL -->|mounted as| UI UI -->|serves| Browser[(Browser)]Step 1 — Store config in SSM
Create parameter:
Name
Type
Value
{ "cognitoDomain": "https://upbank-prod.auth.ap-southeast-2.amazoncognito.com", "clientId": "13sk8uejgh9ha4b9gn28ahkt9f", "appSyncUrl": "https://api.upbank-lab.alanlima.cloud/graphql", "region": "ap-southeast-2", "scopes": "openid email profile", "logoutUri": "https://upbank-lab.alanlima.cloud/logout", "redirectUri": "https://upbank-lab.alanlima.cloud/callback" }Step 2 — Remove ConfigMap
Delete:
No more cluster-stored config.
Step 3 — ServiceAccount (IRSA)
Step 4 — Deployment (replacement)
Step 5 — IAM Policy (minimum)
{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": "ssm:GetParameter", "Resource": "arn:aws:ssm:ap-southeast-2:ACCOUNT_ID:parameter/ui/runtime-config.json" } ] }Benefits of new approach
✅ No image rebuilds
✅ No ConfigMap coupling
✅ Environment specific values in SSM
✅ Secure with IRSA
✅ Production-grade pattern
✅ Matches real SaaS architecture