Skip to content
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

Merged
merged 5 commits into from
May 26, 2020
Merged

chore(aws-eks): update README with correct service account syntax #8112

merged 5 commits into from
May 26, 2020

Conversation

pahud
Copy link
Contributor

@pahud pahud commented May 21, 2020

chore(aws-eks): update README with correct service account syntax

serviceAccountName should be at spec.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

@pahud pahud marked this pull request as ready for review May 21, 2020 03:18
@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildProject6AEA49D1-qxepHUsryhcu
  • Commit ID: af3541c
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@pahud
Copy link
Contributor Author

pahud commented May 22, 2020

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

@vlesierse
Copy link
Contributor

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.

@pahud
Copy link
Contributor Author

pahud commented May 22, 2020

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-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildProject6AEA49D1-qxepHUsryhcu
  • Commit ID: 6bbba19
  • Result: FAILED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildProject6AEA49D1-qxepHUsryhcu
  • Commit ID: 6caf028
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

eladb
eladb previously requested changes May 26, 2020
packages/@aws-cdk/aws-eks/README.md Outdated Show resolved Hide resolved
@mergify mergify bot dismissed eladb’s stale review May 26, 2020 16:03

Pull request has been modified.

@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildProject6AEA49D1-qxepHUsryhcu
  • Commit ID: 3521888
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildProject6AEA49D1-qxepHUsryhcu
  • Commit ID: c4d3a3e
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@mergify
Copy link
Contributor

mergify bot commented May 26, 2020

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).

@mergify mergify bot merged commit fab09b1 into aws:master May 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants