-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
chore(aws-eks): update README with correct service account syntax #8112
Conversation
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
consider this scenario const sa = cluster.addServiceAccount('MyServiceAccount', {});
const pod = cluster.addResource('mypod2', {
apiVersion: 'v1',
kind: 'Pod',
metadata: { name: 'mypod2' },
spec: {
serviceAccountName: sa.serviceAccountName,
containers: [
{
name: 'main',
image: 'pahud/aws-whoami',
ports: [{ containerPort: 5000 }],
}
]
}
}); It looks like the pod will not wait until the serviceAccount is read and hence end up with this error addDependency() will fix this issue. pod.node.addDependency(sa); Do you encounter the same issue? @vlesierse |
This is not something I ran into yet, but the situation seems to be valid when the resource is created before the service account. Think we would need to update the README to highlight this unless CDK can figure out the order based on the sa.serviceAccountName reference. |
OK noted in the README |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
chore(aws-eks): update README with correct service account syntax
serviceAccountName
should be atspec.serviceAccountName
and add a CfnOutput sample to demo how to get the IAM role of this service account.My working sample here
https://twitter.com/pahudnet/status/1263286407092514817
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license