-
Notifications
You must be signed in to change notification settings - Fork 164
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Rodrigo Reis <[email protected]> Signed-off-by: Mikkel Oscar Lyderik Larsen <[email protected]>
- Loading branch information
1 parent
6f8ce27
commit 092af3c
Showing
83 changed files
with
1,729 additions
and
232 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,256 @@ | ||
{{- if eq .Cluster.ConfigItems.eks "true" }} | ||
apiVersion: apps/v1 | ||
kind: DaemonSet | ||
metadata: | ||
labels: | ||
app.kubernetes.io/instance: aws-vpc-cni | ||
app.kubernetes.io/name: aws-node | ||
app.kubernetes.io/version: v1.15.1 | ||
k8s-app: aws-node | ||
application: kubernetes | ||
component: aws-node | ||
name: aws-node | ||
namespace: kube-system | ||
spec: | ||
selector: | ||
matchLabels: | ||
k8s-app: aws-node | ||
template: | ||
metadata: | ||
labels: | ||
app.kubernetes.io/instance: aws-vpc-cni | ||
app.kubernetes.io/name: aws-node | ||
k8s-app: aws-node | ||
application: kubernetes | ||
component: aws-node | ||
spec: | ||
affinity: | ||
nodeAffinity: | ||
requiredDuringSchedulingIgnoredDuringExecution: | ||
nodeSelectorTerms: | ||
- 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 | ||
containers: | ||
- env: | ||
- name: ADDITIONAL_ENI_TAGS | ||
value: '{}' | ||
- name: ANNOTATE_POD_IP | ||
value: "false" | ||
- name: AWS_VPC_CNI_NODE_PORT_SUPPORT | ||
value: "true" | ||
- name: AWS_VPC_ENI_MTU | ||
value: "9001" | ||
- name: AWS_VPC_K8S_CNI_CUSTOM_NETWORK_CFG | ||
value: "false" | ||
- name: AWS_VPC_K8S_CNI_EXTERNALSNAT | ||
value: "false" | ||
- name: AWS_VPC_K8S_CNI_LOGLEVEL | ||
value: DEBUG | ||
- name: AWS_VPC_K8S_CNI_LOG_FILE | ||
value: /host/var/log/aws-routed-eni/ipamd.log | ||
- name: AWS_VPC_K8S_CNI_RANDOMIZESNAT | ||
value: prng | ||
- name: AWS_VPC_K8S_CNI_VETHPREFIX | ||
value: eni | ||
- name: AWS_VPC_K8S_PLUGIN_LOG_FILE | ||
value: /var/log/aws-routed-eni/plugin.log | ||
- name: AWS_VPC_K8S_PLUGIN_LOG_LEVEL | ||
value: DEBUG | ||
- name: CLUSTER_NAME | ||
value: "{{ .Cluster.ID | eksID }}" | ||
- name: DISABLE_INTROSPECTION | ||
value: "false" | ||
- name: DISABLE_METRICS | ||
value: "false" | ||
- name: DISABLE_NETWORK_RESOURCE_PROVISIONING | ||
value: "false" | ||
- name: ENABLE_IPv4 | ||
value: "{{ if eq .Cluster.ConfigItems.eks_ip_family "ipv4" }}true{{else}}false{{end}}" | ||
- name: ENABLE_IPv6 | ||
value: "{{ if eq .Cluster.ConfigItems.eks_ip_family "ipv4" }}false{{else}}true{{end}}" | ||
- name: ENABLE_POD_ENI | ||
value: "false" | ||
- name: ENABLE_PREFIX_DELEGATION | ||
value: "{{ if eq .Cluster.ConfigItems.eks_ip_family "ipv4" }}{{.Cluster.ConfigItems.aws_vpc_cni_prefix_delegation}}{{else}}true{{end}}" | ||
- name: NETWORK_POLICY_ENFORCING_MODE | ||
value: standard | ||
- name: VPC_CNI_VERSION | ||
value: v1.17.1 | ||
- name: VPC_ID | ||
value: "{{ .Cluster.ConfigItems.vpc_id }}" | ||
- name: WARM_ENI_TARGET | ||
value: "1" | ||
- name: WARM_PREFIX_TARGET | ||
value: "1" | ||
- name: MY_NODE_NAME | ||
valueFrom: | ||
fieldRef: | ||
apiVersion: v1 | ||
fieldPath: spec.nodeName | ||
- name: MY_POD_NAME | ||
valueFrom: | ||
fieldRef: | ||
apiVersion: v1 | ||
fieldPath: metadata.name | ||
image: 602401143452.dkr.ecr.eu-central-1.amazonaws.com/amazon-k8s-cni:v1.17.1-eksbuild.1 | ||
imagePullPolicy: IfNotPresent | ||
livenessProbe: | ||
exec: | ||
command: | ||
- /app/grpc-health-probe | ||
- -addr=:50051 | ||
- -connect-timeout=5s | ||
- -rpc-timeout=5s | ||
failureThreshold: 3 | ||
initialDelaySeconds: 60 | ||
periodSeconds: 10 | ||
successThreshold: 1 | ||
timeoutSeconds: 10 | ||
name: aws-node | ||
ports: | ||
- containerPort: 61678 | ||
hostPort: 61678 | ||
name: metrics | ||
protocol: TCP | ||
readinessProbe: | ||
exec: | ||
command: | ||
- /app/grpc-health-probe | ||
- -addr=:50051 | ||
- -connect-timeout=5s | ||
- -rpc-timeout=5s | ||
failureThreshold: 3 | ||
initialDelaySeconds: 1 | ||
periodSeconds: 10 | ||
successThreshold: 1 | ||
timeoutSeconds: 10 | ||
resources: | ||
requests: | ||
cpu: 25m | ||
securityContext: | ||
capabilities: | ||
add: | ||
- NET_ADMIN | ||
- NET_RAW | ||
terminationMessagePath: /dev/termination-log | ||
terminationMessagePolicy: File | ||
volumeMounts: | ||
- mountPath: /host/opt/cni/bin | ||
name: cni-bin-dir | ||
- mountPath: /host/etc/cni/net.d | ||
name: cni-net-dir | ||
- mountPath: /host/var/log/aws-routed-eni | ||
name: log-dir | ||
- mountPath: /var/run/aws-node | ||
name: run-dir | ||
- mountPath: /run/xtables.lock | ||
name: xtables-lock | ||
- args: | ||
- --enable-ipv6={{ if eq .Cluster.ConfigItems.eks_ip_family "ipv4" }}false{{else}}true{{end}} | ||
- --enable-network-policy=false | ||
- --enable-cloudwatch-logs=false | ||
- --enable-policy-event-logs=false | ||
- --metrics-bind-addr=:8162 | ||
- --health-probe-bind-addr=:8163 | ||
- --conntrack-cache-cleanup-period=300 | ||
env: | ||
- name: MY_NODE_NAME | ||
valueFrom: | ||
fieldRef: | ||
apiVersion: v1 | ||
fieldPath: spec.nodeName | ||
image: 602401143452.dkr.ecr.eu-central-1.amazonaws.com/amazon/aws-network-policy-agent:v1.1.0-eksbuild.1 | ||
imagePullPolicy: IfNotPresent | ||
name: aws-eks-nodeagent | ||
resources: | ||
requests: | ||
cpu: 25m | ||
securityContext: | ||
capabilities: | ||
add: | ||
- NET_ADMIN | ||
privileged: true | ||
terminationMessagePath: /dev/termination-log | ||
terminationMessagePolicy: File | ||
volumeMounts: | ||
- mountPath: /host/opt/cni/bin | ||
name: cni-bin-dir | ||
- mountPath: /sys/fs/bpf | ||
name: bpf-pin-path | ||
- mountPath: /var/log/aws-routed-eni | ||
name: log-dir | ||
- mountPath: /var/run/aws-node | ||
name: run-dir | ||
dnsPolicy: ClusterFirst | ||
hostNetwork: true | ||
initContainers: | ||
- env: | ||
- name: DISABLE_TCP_EARLY_DEMUX | ||
value: "false" | ||
- name: ENABLE_IPv6 | ||
value: "{{ if eq .Cluster.ConfigItems.eks_ip_family "ipv4" }}false{{else}}true{{end}}" | ||
image: 602401143452.dkr.ecr.eu-central-1.amazonaws.com/amazon-k8s-cni-init:v1.17.1-eksbuild.1 | ||
imagePullPolicy: IfNotPresent | ||
name: aws-vpc-cni-init | ||
resources: | ||
requests: | ||
cpu: 25m | ||
securityContext: | ||
privileged: true | ||
terminationMessagePath: /dev/termination-log | ||
terminationMessagePolicy: File | ||
volumeMounts: | ||
- mountPath: /host/opt/cni/bin | ||
name: cni-bin-dir | ||
priorityClassName: system-node-critical | ||
restartPolicy: Always | ||
schedulerName: default-scheduler | ||
securityContext: {} | ||
serviceAccount: aws-node | ||
serviceAccountName: aws-node | ||
terminationGracePeriodSeconds: 10 | ||
tolerations: | ||
- operator: Exists | ||
volumes: | ||
- hostPath: | ||
path: /sys/fs/bpf | ||
type: "" | ||
name: bpf-pin-path | ||
- hostPath: | ||
path: /opt/cni/bin | ||
type: "" | ||
name: cni-bin-dir | ||
- hostPath: | ||
path: /etc/kubernetes/cni/net.d #/etc/cni/net.d | ||
type: "" | ||
name: cni-net-dir | ||
- hostPath: | ||
path: /var/log/aws-routed-eni | ||
type: DirectoryOrCreate | ||
name: log-dir | ||
- hostPath: | ||
path: /var/run/aws-node | ||
type: DirectoryOrCreate | ||
name: run-dir | ||
- hostPath: | ||
path: /run/xtables.lock | ||
type: "" | ||
name: xtables-lock | ||
updateStrategy: | ||
rollingUpdate: | ||
maxSurge: 0 | ||
maxUnavailable: 10% | ||
type: RollingUpdate | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{{- if eq .Cluster.ConfigItems.eks "true"}} | ||
--- | ||
apiVersion: v1 | ||
kind: ServiceAccount | ||
metadata: | ||
name: aws-node | ||
namespace: kube-system | ||
labels: | ||
application: kubernetes | ||
component: aws-node | ||
annotations: | ||
eks.amazonaws.com/role-arn: "arn:aws:iam::{{.Cluster.InfrastructureAccount | getAWSAccountID}}:role/{{.Cluster.LocalID}}-aws-node" | ||
{{- end}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -120,7 +120,7 @@ data: | |
{{ else }} | ||
forward . /etc/resolv.conf | ||
{{ end }} | ||
pprof 127.0.0.1:9156 | ||
pprof :9156 | ||
cache 30 | ||
reload | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
Oops, something went wrong.