GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Create an easy way to set up new roles and serviceaccounts for user applications · Issue #69 · commitdev/zero-aws-eks-stack

Create an easy way to set up new roles and serviceaccounts for user applications #69

New issue
Copy link
New issue
Copy link
Closed
#74
Closed
Create an easy way to set up new roles and serviceaccounts for user applications#69
#74
Copy link
Assignees
sshi100
Labels
good first issueGood for newcomerskubernetesterraform

Description

@bmonkman
bmonkman
opened on Aug 25, 2020
Issue body actions

Right now when someone wants to create a new application and give it access to something in AWS we give them instructions on how to do it using "IRSA", the new mechanism for granting access to pods, but there's still quite a bit of manual work and confusion. I think we could simplify it by writing some terraform that would allow them to supply a list of service account names and corresponding AWS IAM policies, and we can create all the required resources. We can either just leave the list blank to start or maybe we could use it to create some of the service accounts we need for stuff we set up like external-dns.

I imagine this could look like another file in infrastructure/terraform/environments/<env>/ maybe application_iam_policy where they can specify policy blocks like:

data "aws_iam_policy_document" "my_application" {
  statement {
    actions = [
      "whatever",
    ]

    resources = ["*"]
  }
}

And then in infrastructure/terraform/environments/<env>/main.tf in the vars we pass to environment we add a map of serviceaccount to policy like:

  application_iam_policies = {
    service_account = my_application
    namespace       = app_namespace
    policy          = aws_iam_policy_document.my_application
  }

Then in the background we create the role for them. We can do something similar in infrastructure/kubernetes and accept a list of serviceaccounts and namespaces and create the service accounts for them.

Reacted by Thiago Araujo

Activity

  1. bmonkman
    added
    good first issueGood for newcomers
    kubernetes
    terraform
    on Aug 25, 2020
  2. beiercai
    assigned
    sshi100
    on Aug 27, 2020
  3. sshi100 commented on Aug 28, 2020

    @sshi100
    sshi100
    on Aug 28, 2020
    Contributor
    More actions

    This feature is called "IAM Role for Service Accounts" (aka: IRSA). I have gone through two articles: IAM roles for service accounts and Introducing fine-grained IAM roles for service accounts

    Confirmed with @bmonkman that this should be a common module under infrastructure/kubernetes/terraform/modules/ side.

  4. sshi100 commented on Aug 31, 2020

    @sshi100
    sshi100
    on Aug 31, 2020
    Contributor
    More actions

    PR: #74

  5. sshi100
    linked a pull request that will close this issue69 support irsa #74on Sep 1, 2020
  6. bmonkman
    closed this as completedon Sep 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @sshi100
    sshi100

Labels

good first issueGood for newcomerskubernetesterraform

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.