Git Product home page Git Product logo

aws-sigv4-proxy-admission-controller's Introduction

AWS SIGv4 Proxy Admission Controller

The mutation admission controller will inject the AWS SIGv4 Proxy as a sidecar into a pod if there are annotations specified in a container's deployment.yaml file or specific namespace labels.

Getting Started

A helm chart exists to deploy all the resources needed to use the admission controller here: https://github.com/aws/eks-charts/tree/master/stable/aws-sigv4-proxy-admission-controller/.

Installing the Controller via Helm Chart

Add the EKS repository to Helm:

helm repo add eks https://aws.github.io/eks-charts

Install the AWS SIGv4 Admission Controller chart with default configuration:

helm install aws-sigv4-proxy-admission-controller eks/aws-sigv4-proxy-admission-controller --namespace <namespace>

Uninstalling the Helm Chart

To uninstall/delete the aws-sigv4-proxy-admission-controller release:

helm uninstall aws-sigv4-proxy-admission-controller --namespace <namespace>

Doing It Yourself

If you wish to build the image on your own, change the variables in Makefile for your image repo, image name, and tag.

Build and push image

make all

Build image

make build-image

Push image

make push-image

Run tests

make test

You can override the admission controller image and other parameters in the admission controller helm chart.

Usage

Configuration

For each row in the chart below, you only need either the annotation or namespace label.

Annotation Namespace Label Required
sidecar.aws.signing-proxy/inject: true sidecar-inject=true โœ”
sidecar.aws.signing-proxy/host: <AWS_SIGV4_PROXY_HOST> sidecar-host=<AWS_SIGV4_PROXY_HOST> โœ”
sidecar.aws.signing-proxy/name: <AWS_SIGV4_PROXY_NAME> sidecar-host=<AWS_SIGV4_PROXY_NAME>
sidecar.aws.signing-proxy/region: <AWS_SIGV4_PROXY_REGION> sidecar-host=<AWS_SIGV4_PROXY_REGION>
sidecar.aws.signing-proxy/role-arn: <AWS_SIGV4_PROXY_ROLE_ARN> sidecar-role-arn=<AWS_SIGV4_PROXY_ROLE_ARN>
sidecar.aws.signing-proxy/unsigned-payload: <AWS_SIGV4_PROXY_UNSIGNED_PAYLOAD> unsigned-payload=<AWS_SIGV4_PROXY_UNSIGNED_PAYLOAD>

For more information on the above annotations / namespace labels, please refer to the documentation in the AWS SIGv4 Proxy repository.

Example Deployment

apiVersion: apps/v1
kind: Deployment
metadata:
  name: sleep
  namespace: sidecar
spec:
  replicas: 1
  selector:
    matchLabels:
      app: sleep
  template:
    metadata:
      annotations:
        sidecar.aws.signing-proxy/inject: "true"
        sidecar.aws.signing-proxy/host: "aps.us-west-2.amazonaws.com"
        sidecar.aws.signing-proxy/name: "aps"
        sidecar.aws.signing-proxy/region: "us-west-2"
        sidecar.aws.signing-proxy/role-arn: "arn:aws:iam::123456789:role/assume-role"
        sidecar.aws.signing-proxy/unsigned-payload: "false"
      labels:
        app: sleep
    spec:
      containers:
      - name: sleep
        image: tutum/curl
        command: ["/bin/sleep","infinity"]
        imagePullPolicy: IfNotPresent

To see the AWS SIGv4 Proxy installed as a sidecar in this deployment: save the above lines as a yaml file, make sure the admission controller helm chart is installed in your Kubernetes cluster, and run the following:

kubectl create namespace sidecar
kubectl create -f test-deploy.yaml
kubectl get pod -n sidecar

2 pods should be visible within the sleep pod.

Security

See CONTRIBUTING for more information.

License

This project is licensed under the Apache-2.0 License.

aws-sigv4-proxy-admission-controller's People

Contributors

alanprot avatar alolita avatar amazon-auto avatar cpakman avatar dependabot[bot] avatar marianafranco avatar rohang98 avatar sheetaljoshi avatar vasireddy99 avatar vijayansarathy avatar wytrivail 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.