Coder Social home page Coder Social logo

Comments (5)

abeer91 avatar abeer91 commented on May 22, 2024

The permissions for CreateTag on ENI can be scoped to something like:

        {
            "Action": [
                "ec2:CreateTags"
                ],
            "Resource": [
                "arn:aws:ec2:*:*:network-interface/*"
                ],
            "Effect" : "Allow"
        }

from amazon-vpc-cni-k8s.

nckturner avatar nckturner commented on May 22, 2024

Right now, it looks like we tag the ENI with k8s-eni-key=<instance-id>. I have a few questions about this implementation.

  1. Shouldn't we add the well known tag kubernetes.io/<clustername>=<owned|shared>, as this is, as far as I can find, the standard way to track kubernetes-related resources?
  2. Who are the known consumers of the k8s-eni-key tag?

from amazon-vpc-cni-k8s.

nckturner avatar nckturner commented on May 22, 2024

In order to get the cluster name, we could look for the existence of an env var CLUSTER_NAME or similar, and only create kubernetes.io/cluster/$CLUSTER_NAME=owned if it exists.

from amazon-vpc-cni-k8s.

liwenwu-amazon avatar liwenwu-amazon commented on May 22, 2024

@nckturner great idea if we can also tag ENI with cluster name.

Today, k8s-eni-key can be very helpful for debugging. If there is a ENI leaking, we can use k8s-eni-key to figure out which aws-node's ipamD is leaking it. Then, we can focus on debugging that particular node's ipamD.

from amazon-vpc-cni-k8s.

nckturner avatar nckturner commented on May 22, 2024

Ok, what do you think about renaming it to something more descriptive? I was thinking something using a format similar to Kubernetes well known labels, similar to the cluster name tag previously mentioned. node.amazonaws.com/instance-id=i-0d8928dd968701ba6 or node.amazonaws.com/i-0d8928dd968701ba6=owned.

Referencing this issue, the tag kubernetes.io/cluster/<clustername>=<owned|shared> was chosen as formatted (with the cluster name in the key) for querying efficiency, but we can query by tag:key=value, so I'm not sure where the efficiency gains come from.

from amazon-vpc-cni-k8s.

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.