shapirov103 / cdk-eks-blueprint

repo for CDK Software Factory
Apache License 2.0
11 stars 2 forks source link

ArgoCD Bootstrapping must be automatic #60

Open shapirov103 opened 3 years ago

shapirov103 commented 3 years ago

At present each provisioned cluster requires ArgoCD bootstrapped which requires the following:

  1. Install ArgoCD CLI matching the version on the server
  2. Obtain initial credentials to Argo (secret is created in the target namespace)
  3. Using the credentials, log in to Argo server and change the initial password.
  4. Bootstrap the app of apps with specific parameters (e.g. we could pass param for kustomize).

Suggested approaches:

  1. Kubernetes Job that is deployed automatically with each cluster. Configured through the blueprint to have the uber app git URL and credentials (potentially through Sercret Manager). Runs once, warning on fail and ability to restart the job if needed. Job image will have kubectl and argocd CLI preinstalled.
  2. CodeBuild project that performs the above, similar functional requirements.
  3. Lambda function (as customer CFN resource) that performs the above.

Drawbacks for #2 and #3: requires download of argoCLI at runtime as well as access to K8S APi server for initial secret lookup.

kcoleman731 commented 3 years ago

I like number 1.

kcoleman731 commented 3 years ago

@shapirov103 confirmed per our discussion on approach one. We will need to add support for customer supplying git URL + ssh key to access private app of apps repo.

Also - we will need to document this Job so customers know what it is doing.