Code Monkey home page Code Monkey logo

Comments (5)

vania-pooh avatar vania-pooh commented on June 20, 2024

@buettner123 actually these capabilities should go under moon:options key. I.e. you create a capability called moon:options and then put a HashMap<String, Object> inside with all capabilities from your example. https://github.com/aerokube/moon-cloud-java-example/blob/master/src/test/java/com/aerokube/moon/MoonCloudExampleTest.java#L25-L31

from moon.

buettner123 avatar buettner123 commented on June 20, 2024

Thanks for the hint @vania-pooh. This helped to get the video recording starting.

However I encountered some AccessDenied issues with the saving to the bucket. I think there might be some missing/incomplete documentation for the serviceAccount stuff.

Looking at the values file for the helm chart, I see that it suggest adding:

configs:
  default:
    serviceAccountName: aerokube-moon
    serviceAccountAnnotations: {...}

However, digging into the helm chart I found out that this is actually supposed to be placed on the quota level and the one on config.default.serviceAccount* level doesn't seem to have any effect.

My values.yml now looks like this:

quota:
  moon: null
  test:
    namespace: moon-test
    password: ''
    serviceAccountName: aerokube-moon
    serviceAccountAnnotations: {
      "eks.amazonaws.com/role-arn": "arn:aws:iam::xxxx:role/MoonIAMRole"
    }

With this changes and by providing the role-arn to the service account, it works fine for my eks+iam roles and service account setup.

Maybe it makes sense to adjust the default values.yml file to reflect this or add some more context to the documentation in https://aerokube.com/moon/latest/#faq-kubernetes-service-account

And for the sake of completeness, I adapted the above IAM policy a bit to feature less actions:

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Action": [
        "s3:PutObject",
        "s3:ListBucket",
        "s3:GetObject"
      ],
      "Effect": "Allow",
      "Resource": [
        "arn:aws:s3:::${TargetBucket}/*",
        "arn:aws:s3:::${TargetBucket}"
      ]
    }
  ]
}

In addition, TargetBucket is replaced with the bucket name on creation of the policy.

from moon.

vania-pooh avatar vania-pooh commented on June 20, 2024

@buettner123 started fixing this and can't find an exact location where we suggest adding the following:

configs:
  default:
    serviceAccountName: aerokube-moon
    serviceAccountAnnotations: {...}

Only found correct example. Could you please provide some reference?

from moon.

buettner123 avatar buettner123 commented on June 20, 2024

For the serviceAccountName there is https://github.com/aerokube/charts/blob/master/moon2/values.yaml#L350 which seems to have no effect.
The configs.default.serviceAccountAnnotations was an assumption from my side not reflected in the values file (but would make sense in my opinion, if there will be some defaults available)

from moon.

aandryashin avatar aandryashin commented on June 20, 2024

from moon.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.