Skip to content
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

[aws-vpc-cni] added eniconfig template #472

Merged
merged 5 commits into from
Mar 12, 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
2 changes: 1 addition & 1 deletion stable/aws-vpc-cni/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v1
name: aws-vpc-cni
version: 1.1.2
version: 1.1.3
appVersion: "v1.7.5"
description: A Helm chart for the AWS VPC CNI
icon: https://raw.githubusercontent.com/aws/eks-charts/master/docs/logo/aws.png
Expand Down
5 changes: 5 additions & 0 deletions stable/aws-vpc-cni/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@ The following table lists the configurable parameters for this chart and their d
| `affinity` | Map of node/pod affinities | `{}` |
| `cniConfig.enabled` | Enable overriding the default 10-aws.conflist file | `false` |
| `cniConfig.fileContents`| The contents of the custom cni config file | `nil` |
| `eniConfig.create` | Specifies whether to create ENIConfig resource(s) | `false` |
| `eniConfig.region` | Region to use when generating ENIConfig resource names | `us-west-2` |
| `eniConfig.subnets` | A map of AZ identifiers to config per AZ | `nil` |
| `eniConfig.subnets.id` | The ID of the subnet within the AZ which will be used in the ENIConfig | `nil` |
| `eniConfig.subnets.securityGroups` | The IDs of the security groups which will be used in the ENIConfig | `nil` |
| `env` | List of environment variables. See [here](https://github.com/aws/amazon-vpc-cni-k8s#cni-configuration-variables) for options | (see `values.yaml`) |
| `fullnameOverride` | Override the fullname of the chart | `aws-node` |
| `image.region` | ECR repository region to use. Should match your cluster | `us-west-2` |
Expand Down
17 changes: 17 additions & 0 deletions stable/aws-vpc-cni/templates/eniconfig.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{{- if .Values.eniConfig.create }}
{{- range $key, $value := (required ".Values.eniConfig.subnets must be specified" .Values.eniConfig.subnets) }}
apiVersion: crd.k8s.amazonaws.com/v1alpha1
kind: ENIConfig
metadata:
name: {{ required ".Values.eniConfig.region must be specified" $.Values.eniConfig.region }}{{ $key }}
spec:
{{- if $value.securityGroups }}
securityGroups:
{{- range $sg := $value.securityGroups }}
- {{ $sg }}
{{- end }}
{{- end }}
subnet: {{ $value.id }}
---
{{- end }}
{{- end }}
20 changes: 20 additions & 0 deletions stable/aws-vpc-cni/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -139,3 +139,23 @@ affinity:
operator: NotIn
values:
- fargate

eniConfig:
# Specifies whether ENIConfigs should be created
create: false
region: us-west-2
subnets:
# Key identifies the AZ
# Value contains the subnet ID and security group IDs within that AZ
# a:
# id: subnet-123
# securityGroups:
# - sg-123
# b:
# id: subnet-456
# securityGroups:
# - sg-456
# c:
# id: subnet-789
# securityGroups:
# - sg-789