Giter Club home page Giter Club logo

node-tagger's Introduction

node-tagger

Overview

node-tagger is a Kubernetes operator that applies specified tags to all aws nodes of the cluster.

Deployment

Prerequisites

The controller requires AWS credentials to be set before deploying it. This is accomplished by creating a secret with name aws-credentials in the controller namespace with the following keys:

  • AWS_ACCESS_KEY_ID
  • AWS_SECRET_ACCESS_KEY

For example running the following will create an appropriate secret in the node-tagger namespace:

kubectl create secret generic aws-credentials --from-literal=AWS_ACCESS_KEY_ID=access_key --from-literal=AWS_SECRET_ACCESS_KEY=secret_access_key --namespace=node-tagger

Required IAM permissions

The operator requires ec2:CreateTags and ec2:DescribeInstance permissions for the nodes that we are going to tag

Deploy the operator

Deploy the operator dependencies:

kubectl apply -f deploy/service_account.yaml -n node-tagger
kubectl apply -f deploy/role.yaml -n node-tagger
kubectl apply -f deploy/role_binding.yaml -n node-tagger

Deploy the operator:

kubectl apply -f deploy/deployment.yaml -n node-tagger

Deploying via helm chart

Without existing credentials secret

helm upgrade --install node-tagger https://github.com/ouzi-dev/node-tagger/releases/download/${VERSION}/node-tagger-${VERSION}.tgz \
    -n node-tagger \
    --set awsCredentials.create=true \
    --set awsCredentials.awsAccessKeyId=access_key \
    --set awsCredentials.awsSecretAccessKey=secret_access_key \
    --set awsCredentials.awsRegion=region \
    --set tagsToApply[0].name=tag1,tagsToApply[0].value=value1

Where ${VERSION} is the version you want to install

With existing credentials secret

helm upgrade --install node-tagger https://github.com/ouzi-dev/node-tagger/releases/download/${VERSION}/node-tagger-${VERSION}.tgz \
    -n node-tagger \
    --set awsCredentials.secretName=aws-credentials \
    --set tagsToApply[0].name=tag1,tagsToApply[0].value=value1

Where ${VERSION} is the version you want to install

Without using a secret (For example using a EKS service account)

helm upgrade --install node-tagger https://github.com/ouzi-dev/node-tagger/releases/download/${VERSION}/node-tagger-${VERSION}.tgz \
    -n node-tagger \
    --set awsCredentials.useSecret=false \
    --set tagsToApply[0].name=tag1,tagsToApply[0].value=value1 \
    --set serviceAccount.annotations."eks\.amazonaws\.com/role-arn"="arn:aws:iam::123456789:role/my-role-name"

Where ${VERSION} is the version you want to install

node-tagger's People

Contributors

belitre avatar givanov avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

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.