Skip to content

Commit

Permalink
aws-vpc-cni: move default affinity to values.yaml (#384)
Browse files Browse the repository at this point in the history
This change allows you to override the affinity, should you want to,
using the already existing `affinity` key in the Helm values.

Previously, setting the `affinity` key in the Helm values would cause a
duplicate `affinity` key in the pod spec.
  • Loading branch information
sarahhodne committed Jan 8, 2021
1 parent e272bd1 commit e69602c
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 33 deletions.
32 changes: 0 additions & 32 deletions stable/aws-vpc-cni/templates/daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,38 +29,6 @@ spec:
k8s-app: aws-node
spec:
priorityClassName: "{{ .Values.priorityClassName }}"
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: "beta.kubernetes.io/os"
operator: In
values:
- linux
- key: "beta.kubernetes.io/arch"
operator: In
values:
- amd64
- arm64
- key: "eks.amazonaws.com/compute-type"
operator: NotIn
values:
- fargate
- matchExpressions:
- key: "kubernetes.io/os"
operator: In
values:
- linux
- key: "kubernetes.io/arch"
operator: In
values:
- amd64
- arm64
- key: "eks.amazonaws.com/compute-type"
operator: NotIn
values:
- fargate
serviceAccountName: {{ template "aws-vpc-cni.serviceAccountName" . }}
hostNetwork: true
initContainers:
Expand Down
33 changes: 32 additions & 1 deletion stable/aws-vpc-cni/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -103,4 +103,35 @@ nodeSelector: {}

tolerations: []

affinity: {}
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: "beta.kubernetes.io/os"
operator: In
values:
- linux
- key: "beta.kubernetes.io/arch"
operator: In
values:
- amd64
- arm64
- key: "eks.amazonaws.com/compute-type"
operator: NotIn
values:
- fargate
- matchExpressions:
- key: "kubernetes.io/os"
operator: In
values:
- linux
- key: "kubernetes.io/arch"
operator: In
values:
- amd64
- arm64
- key: "eks.amazonaws.com/compute-type"
operator: NotIn
values:
- fargate

0 comments on commit e69602c

Please sign in to comment.