Repository navigation
feat: parallelize EKS integ pipeline, extract shared Jenkins functions, fix public domain access policy - #2678
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2678 +/- ##
============================================
- Coverage 72.60% 72.55% -0.05%
Complexity 90 90
============================================
Files 711 711
Lines 33058 33058
Branches 2842 2839 -3
============================================
- Hits 24002 23986 -16
- Misses 7778 7793 +15
- Partials 1278 1279 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
dbcd1c1 to
f1e5ddd
Compare
f1e5ddd to
e41f26e
Compare
e41f26e to
e566a01
Compare
e566a01 to
722db09
Compare
722db09 to
b661ac5
Compare
b661ac5 to
41aac29
Compare
4775183 to
a3c0743
Compare
…eline
Deploy AOS domains as public (internet-facing) endpoints so they no
longer share a VPC with the EKS cluster. This eliminates the sequential
dependency between 'Deploy Clusters' and 'Deploy & Bootstrap MA',
running them in parallel and cutting infrastructure provisioning time
roughly in half.
Changes:
- awsDeployCluster.sh: bump sample CDK to v0.3.9 (publicAccess support)
- deployClustersStep.groovy: pass publicAccess to cluster configs
- eksIntegPipeline.groovy: parallelize deploy + bootstrap, switch from
Import-VPC to Create-VPC CFN, remove SG cross-linking (not needed
for public domains)
- Extract shared Jenkins functions:
- parseCfnExports.groovy: CFN export string parsing (was duplicated
in eksInteg, eksBYOS, eksAOSS)
- expandVersionString.groovy: version string expansion (was duplicated
in eksInteg, eksBYOS)
- Update eksBYOS and eksAOSS pipelines to use shared functions
Signed-off-by: Andre Kurait <[email protected]>
a3c0743 to
138b88f
Compare
…ootstrap Signed-off-by: Andre Kurait <[email protected]>
| // 2. Clean up EKS resources (namespace, instance profiles, security groups) | ||
| eksCleanupStep( | ||
| stackName: env.STACK_NAME, | ||
| eksClusterName: eksClusterName | ||
| ) |
There was a problem hiding this comment.
eksCleanupStep defaults kubeContext to eksClusterName when not provided. But bootstrapMA sets env.eksKubeContext to "migration-eks-${maStageName}", which is different from the EKS cluster name
We should pass in kubeContext: env.eksKubeContext over here just like eksIntegPipeline and eksBYOSIntegPipeline
There was a problem hiding this comment.
Good catch, fixed in d101c09 — now passing kubeContext: env.eksKubeContext to match the other pipelines.
eksCleanupStep defaults kubeContext to eksClusterName when not provided, but bootstrapMA sets env.eksKubeContext to a different value. Pass it explicitly to match eksIntegPipeline and eksBYOSIntegPipeline. Signed-off-by: Andre Kurait <[email protected]> Signed-off-by: Andre Kurait <[email protected]>
Summary
Deploys AOS domains as public (internet-facing) endpoints so they no longer share a VPC with the EKS cluster. This eliminates the sequential dependency between cluster deployment and MA bootstrap, running both deploy and cleanup in parallel. Also extracts 4 shared Jenkins library functions, adds a
--kubectl-contextflag to the bootstrap script, and fixes the access policy for public domains to use account-scoped SigV4 instead of open access.Before
graph LR A[Checkout] --> B[Build] B --> C["Deploy Clusters<br/>(CDK: VPC + AOS)<br/>~25 min"] C --> D["Bootstrap MA<br/>(import VPC)<br/>~25 min"] D --> E[Setup] E --> F[Tests] F --> G["CDK Destroy<br/>~15 min"] G --> H["Delete MA Stack<br/>~15 min"] style C fill:#f96 style D fill:#f96 style G fill:#f96 style H fill:#f96After
graph LR A[Checkout] --> B[Build] B --> C["Deploy Clusters<br/>(public AOS, no VPC)"] B --> D["Bootstrap MA<br/>(create-vpc-cfn)"] C --> E[Setup] D --> E E --> F[Tests] F --> G[CDK Destroy] F --> H[Delete MA Stack] style C fill:#6c6 style D fill:#6c6 style G fill:#6c6 style H fill:#6c6New Shared Jenkins Functions
withMigrationsTestAccountwithCredentials + withAWSwrapperbootstrapMAparseCfnExportsexpandVersionStringAll shared functions validate required parameters and fail with clear error messages.
All Changes
test/awsDeployCluster.shdeployment/k8s/aws/aws-bootstrap.sh--kubectl-contextflag, add-x testtocdkSynthMinifiedgradle callvars/withMigrationsTestAccount.groovyvars/bootstrapMA.groovyvars/parseCfnExports.groovyvars/expandVersionString.groovyvars/deployClustersStep.groovywithMigrationsTestAccount, account-scoped SigV4 policy for public domainsvars/eksIntegPipeline.groovyskipTestImagesvars/eksBYOSIntegPipeline.groovywithMigrationsTestAccount,bootstrapMA,expandVersionStringvars/eksAOSSIntegPipeline.groovywithMigrationsTestAccount,bootstrapMA,skipTestImagesKey Fixes
arn:aws:iam::<account>:root) instead ofopenAccessPolicyEnabledwhich AWS rejects on public domainsbootstrapMApasses--kubectl-contextto the bootstrap script — single source of truth instead of convention-based name alignmentskipTestImages: trueto avoid building test-only Docker images-x testto thecdkSynthMinifiedgradle call in the bootstrap scriptImpact