Skip to content

Helm: add eni option to use iam-role #14970

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 1, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions install/kubernetes/cilium/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ contributors across the globe, there is almost always someone available to help.
| eni.ec2APIEndpoint | string | `""` | EC2 API endpoint to usee |
| eni.enabled | bool | `false` | Enable Elastic Network Interface (ENI) integration. |
| eni.eniTags | object | `{}` | Tags to apply to the newly created ENIs |
| eni.iamRole | string | `""` | If using IAM role for Service Accounts will not try to inject identity values from cilium-aws kubernetes secret. Adds annotation to service account if managed by Helm. See https://github.com/aws/amazon-eks-pod-identity-webhook |
| eni.subnetIDsFilter | string | `""` | Filter via subnet IDs which will dictate which subnets are going to be used to create new ENIs |
| eni.subnetTagsFilter | string | `""` | Filter via tags (k=v) which will dictate which subnets are going to be used to create new ENIs |
| eni.updateEC2AdapterLimitViaAPI | bool | `false` | Update ENI Adapter limits from the EC2 API |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ spec:
key: debug
name: cilium-config
optional: true
{{- if .Values.eni.enabled }}
{{- if (and .Values.eni.enabled (not .Values.eni.iamRole )) }}
- name: AWS_ACCESS_KEY_ID
valueFrom:
secretKeyRef:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ kind: ServiceAccount
metadata:
name: {{ .Values.serviceAccounts.operator.name | quote }}
namespace: {{ .Release.Namespace }}
{{- if and .Values.eni.enabled .Values.eni.iamRole }}
{{ $_ := set .Values.serviceAccounts.operator.annotations "eks.amazonaws.com/role-arn" .Values.eni.iamRole }}
{{- end}}
{{- if .Values.serviceAccounts.operator.annotations }}
annotations:
{{ toYaml .Values.serviceAccounts.operator.annotations | indent 4 }}
Expand Down
5 changes: 5 additions & 0 deletions install/kubernetes/cilium/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -428,6 +428,11 @@ eni:
ec2APIEndpoint: ""
# -- Tags to apply to the newly created ENIs
eniTags: {}
# -- If using IAM role for Service Accounts will not try to
# inject identity values from cilium-aws kubernetes secret.
# Adds annotation to service account if managed by Helm.
# See https://github.com/aws/amazon-eks-pod-identity-webhook
iamRole: ""
# -- Filter via subnet IDs which will dictate which subnets are going to be used to create new ENIs
subnetIDsFilter: ""
# -- Filter via tags (k=v) which will dictate which subnets are going to be used to create new ENIs
Expand Down