-
Notifications
You must be signed in to change notification settings - Fork 162
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding new pattern for Crossplane Argocd GitOps #173
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ajpaws Thankyou for working on this and quick PR. There are few alignments to the approach we have to make :
- First the arrangment is not aligning to the theme of the repo. You should have one bin
ts
file for this pattern which invokes the class in the lib file to run the pattern. Please check other patterns like SecureIngress Pattern which we worked for another blog. - I understand you most of the code i shared from my partner work but we cant reuse it as is, we need to refactor it work with patterns repo. We done need this file
aws-addon-clusters-stack.ts
for instance. Plus we need one pipeline which deploys management cluster and all child cluster and those pipeline code should be in lib folder like multi account monitoring pattern. - So basically most of the work you have in bin folder should move to lib folder refactored.
- See if you have any opportunities to minimize the number of custom addons.
- Also fix all GH Warnings and errors.
Overall great progress, we have some work to do. Lets connect if you have questions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ajpaws Awesome work. Love the idea of adding Pod Identity Addon via ClusterAuth
We are very near to finish line. One minor feedback that i mentioned on bin file. Also lets add the architecture diagram of the blog optionally to make this complete.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ajpaws great work, a lot of effort. I went through the first round of review and let's fix the issues, I also posted a couple of questions. I will review again after you are done, and we will validate it as well. I realize there is a dependency on the workloads repo PR.
lib/crossplane-argocd-gitops/custom-addons/crossplane-k8s-provider-addon.ts
Outdated
Show resolved
Hide resolved
@@ -0,0 +1,89 @@ | |||
import 'source-map-support/register'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@elamaran11 is there a rationale why this addon is not in the blueprints repo? We have upbound addon there, it may be confusing to the customers how to reconcile this with the one in the blueprints repo. I assume we should deprecate or just replace the upbound addon in the blueprints.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@shapirov103 The upbound addon in Blueprints is EKS Addon and they are no longer supporting it. I asked the team but no response so the Ubound addon on the bluepeints should be depracated or this should be updated there. I think for now lets depracate upbound addon for upcoming release. I will plan to work to move this later to blueprints.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is already in 1.15, let's replace it here, - too much code as it stands for the pattern.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not addressed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ajpaws This comment?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe we are deprecating upbound addon in Blueprints is EKS Addon so no changed made on this. I would recommend go ahead with this for now since anyway we have code for all other upbound addons at one place in custom addons folder.
lib/crossplane-argocd-gitops/custom-addons/upbound-crossplane-addon.ts
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ajpaws Fix this for GH Action to run.
@shapirov103 Could you please check again and let me know if this is good to merge. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ajpaws please see my additional comments. Thank you for addressing my previous comments, I see some were deferred and that is ok.
I left a bunch of minor comments, but there a few important. Happy to discuss if needed. I will focus on the workloads PR.
@elamaran11 FYI ^^
lib/crossplane-argocd-gitops/custom-addons/crossplane-k8s-provider-addon.ts
Outdated
Show resolved
Hide resolved
@@ -0,0 +1,89 @@ | |||
import 'source-map-support/register'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is already in 1.15, let's replace it here, - too much code as it stands for the pattern.
done |
|
||
```shell | ||
export ACCOUNT_ID=$(aws sts get-caller-identity --output text --query Account) | ||
export AWS_REGION=$(curl -s 169.254.169.254/latest/dynamic/instance-identity/document | jq -r '.region') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not accurate for mac based deployments. May work from Cloud9. I think you should ask the readers to hardcode ther egion.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
|
||
const gitProps = { | ||
owner :'aws-samples', | ||
secretName : props.gitHubSecret ?? 'cdk_blueprints_gitops_github_secret', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Secret you are creating is export CDK_REPO_AWS_SECRET_NAME="cdk_blueprints_github_secret" but the code has cdk_blueprints_gitops_github_secret
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
@ajpaws Cleanup Instructions are missing |
Run the below command to get the list of EKS add-on Objects deployed in the Management Cluster. | ||
|
||
```shell | ||
kubectl --context $MANAGEMENT_CLUSTER_CONTEXT get add-ons.eks.aws.upbound.io |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This command should be kubectl --context $MANAGEMENT_CLUSTER_CONTEXT get addons.eks.aws.upbound.io
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not fixed. The correct command is `kubectl get addons.eks.aws.upbound.io
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ajpaws I got everything functionall working now. The fix on INT for Account number did the trick. I see a plenty of issues with the ReadMe doc, we can merge this.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ajpaws One comment is still not addressed.
Also cleanup instructions are missing. Please fix those two before we can merge this.
Run the below command to get the list of EKS add-on Objects deployed in the Management Cluster. | ||
|
||
```shell | ||
kubectl --context $MANAGEMENT_CLUSTER_CONTEXT get add-ons.eks.aws.upbound.io |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not fixed. The correct command is `kubectl get addons.eks.aws.upbound.io
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cleanup is incomplete.
fixed now |
done |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks Good. Great work @ajpaws Thankyou for working thoughout the proces of this development and review with us.
Issue #, if available:
Description of changes:
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.