apiVersion: apps/v1
kind: DaemonSet
metadata:
  name: kube2iam
  namespace: kube-system
  labels:
    application: kube2iam
    version: master-5
spec:
  selector:
    matchLabels:
      application: kube2iam
  updateStrategy:
    type: RollingUpdate
  template:
    metadata:
      labels:
        application: kube2iam
        version: master-5
      annotations:
        scheduler.alpha.kubernetes.io/critical-pod: ''
    spec:
      tolerations:
      - key: CriticalAddonsOnly
        operator: Exists
      - key: node-role.kubernetes.io/master
        effect: NoSchedule
      hostNetwork: true
      containers:
      # kube2iam 0.9.0 with this patch https://github.com/jtblin/kube2iam/pull/108
      - image: registry.opensource.zalan.do/teapot/kube2iam:master-5
        name: kube2iam
        args:
        - --auto-discover-base-arn
        - --verbose
        - --node=$(NODE_NAME)
        env:
        - name: NODE_NAME
          valueFrom:
            fieldRef:
              fieldPath: spec.nodeName
        ports:
        - containerPort: 8181
          hostPort: 8181
          name: http
        securityContext:
          privileged: true
        readinessProbe:
          httpGet:
            path: /healthz
            port: 8181
          timeoutSeconds: 3
        resources:
          limits:
            cpu: 100m
            memory: 100Mi
          requests:
            cpu: 25m
            memory: 25Mi

apiVersion: apps/v1
kind: DaemonSet
metadata:
  name: kube2iam
  namespace: kube-system
  labels:
    application: kube2iam
    version: master-6
spec:
  selector:
    matchLabels:
      application: kube2iam
  updateStrategy:
    type: RollingUpdate
  template:
    metadata:
      labels:
        application: kube2iam
        version: master-6
      annotations:
        scheduler.alpha.kubernetes.io/critical-pod: ''
    spec:
      tolerations:
      - key: CriticalAddonsOnly
        operator: Exists
      - key: node-role.kubernetes.io/master
        effect: NoSchedule
      hostNetwork: true
      containers:
      # kube2iam 0.9.0 with these patchs https://github.com/jtblin/kube2iam/pull/108, https://github.com/jtblin/kube2iam/pull/130
      - image: registry.opensource.zalan.do/teapot/kube2iam:master-6
        name: kube2iam
        args:
        - --auto-discover-base-arn
        - --verbose
        - --node=$(NODE_NAME)
        env:
        - name: NODE_NAME
          valueFrom:
            fieldRef:
              fieldPath: spec.nodeName
        ports:
        - containerPort: 8181
          hostPort: 8181
          name: http
        securityContext:
          privileged: true
        readinessProbe:
          httpGet:
            path: /healthz
            port: 8181
          timeoutSeconds: 3
        resources:
          limits:
            cpu: 100m
            memory: 100Mi
          requests:
            cpu: 25m
            memory: 25Mi

Fix kube2iam for m5/c5 instances
Fix kube2iam for m5/c5 instances
