apiVersion: apps/v1
kind: Deployment
metadata:
  name: kube-aws-iam-controller
  namespace: kube-system
  labels:
    application: kube-aws-iam-controller
    version: latest
spec:
  replicas: 1
  selector:
    matchLabels:
      application: kube-aws-iam-controller
  template:
    metadata:
      labels:
        application: kube-aws-iam-controller
        version: latest
    spec:
      tolerations:
      - key: CriticalAddonsOnly
        operator: Exists
      containers:
      - name: kube-aws-iam-controller
        image: mikkeloscar/kube-aws-iam-controller:latest
        env:
        # must be set for the AWS SDK/AWS CLI to find the credentials file.
        - name: AWS_SHARED_CREDENTIALS_FILE
          value: /meta/aws-iam/credentials
        volumeMounts:
        - name: aws-iam-credentials
          mountPath: /meta/aws-iam
          readOnly: true
        resources:
          limits:
            cpu: 200m
            memory: 1Gi
          requests:
            cpu: 100m
            memory: 512Mi
      volumes:
      - name: aws-iam-credentials
        secret:
          # secret should be named: aws-iam-<name-of-your-aws-iam-role>
          secretName: aws-iam-<my-iam-role-name>
