-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use containerd.sock for AmazonVPC CNI with containerd
- Loading branch information
Ciprian Hacman
committed
Dec 27, 2020
1 parent
e39f8bc
commit 41d7490
Showing
9 changed files
with
541 additions
and
4 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
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
48 changes: 48 additions & 0 deletions
48
upup/pkg/fi/cloudup/tests/bootstrapchannelbuilder/amazonvpc-containerd/cluster.yaml
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,48 @@ | ||
apiVersion: kops.k8s.io/v1alpha2 | ||
kind: Cluster | ||
metadata: | ||
creationTimestamp: "2016-12-10T22:42:27Z" | ||
name: minimal.example.com | ||
spec: | ||
addons: | ||
- manifest: s3://somebucket/example.yaml | ||
kubernetesApiAccess: | ||
- 0.0.0.0/0 | ||
channel: stable | ||
cloudProvider: aws | ||
configBase: memfs://clusters.example.com/minimal.example.com | ||
containerRuntime: containerd | ||
etcdClusters: | ||
- etcdMembers: | ||
- instanceGroup: master-us-test-1a | ||
name: master-us-test-1a | ||
name: main | ||
- etcdMembers: | ||
- instanceGroup: master-us-test-1a | ||
name: master-us-test-1a | ||
name: events | ||
iam: {} | ||
kubernetesVersion: v1.16.0 | ||
masterInternalName: api.internal.minimal.example.com | ||
masterPublicName: api.minimal.example.com | ||
additionalSans: | ||
- proxy.api.minimal.example.com | ||
networkCIDR: 172.20.0.0/16 | ||
networking: | ||
amazonvpc: | ||
env: | ||
- name: WARM_IP_TARGET | ||
value: "10" | ||
- name: AWS_VPC_K8S_CNI_LOGLEVEL | ||
value: debug | ||
nonMasqueradeCIDR: 100.64.0.0/10 | ||
sshAccess: | ||
- 0.0.0.0/0 | ||
topology: | ||
masters: public | ||
nodes: public | ||
subnets: | ||
- cidr: 172.20.32.0/19 | ||
name: us-test-1a | ||
type: Public | ||
zone: us-test-1a |
86 changes: 86 additions & 0 deletions
86
upup/pkg/fi/cloudup/tests/bootstrapchannelbuilder/amazonvpc-containerd/manifest.yaml
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,86 @@ | ||
kind: Addons | ||
metadata: | ||
creationTimestamp: null | ||
name: bootstrap | ||
spec: | ||
addons: | ||
- id: k8s-1.16 | ||
kubernetesVersion: '>=1.16.0-alpha.0' | ||
manifest: kops-controller.addons.k8s.io/k8s-1.16.yaml | ||
manifestHash: 5b7765907ec5720081c13c0cab2d32b99053e7c8 | ||
name: kops-controller.addons.k8s.io | ||
selector: | ||
k8s-addon: kops-controller.addons.k8s.io | ||
version: 1.19.0-beta.2 | ||
- manifest: core.addons.k8s.io/v1.4.0.yaml | ||
manifestHash: 3ffe9ac576f9eec72e2bdfbd2ea17d56d9b17b90 | ||
name: core.addons.k8s.io | ||
selector: | ||
k8s-addon: core.addons.k8s.io | ||
version: 1.4.0 | ||
- id: k8s-1.12 | ||
manifest: kube-dns.addons.k8s.io/k8s-1.12.yaml | ||
manifestHash: db49c98447b9d59dec4fa413461a6614bc6e43e9 | ||
name: kube-dns.addons.k8s.io | ||
selector: | ||
k8s-addon: kube-dns.addons.k8s.io | ||
version: 1.15.13-kops.3 | ||
- id: k8s-1.8 | ||
manifest: rbac.addons.k8s.io/k8s-1.8.yaml | ||
manifestHash: 5d53ce7b920cd1e8d65d2306d80a041420711914 | ||
name: rbac.addons.k8s.io | ||
selector: | ||
k8s-addon: rbac.addons.k8s.io | ||
version: 1.8.0 | ||
- id: k8s-1.9 | ||
manifest: kubelet-api.rbac.addons.k8s.io/k8s-1.9.yaml | ||
manifestHash: e1508d77cb4e527d7a2939babe36dc350dd83745 | ||
name: kubelet-api.rbac.addons.k8s.io | ||
selector: | ||
k8s-addon: kubelet-api.rbac.addons.k8s.io | ||
version: v0.0.1 | ||
- manifest: limit-range.addons.k8s.io/v1.5.0.yaml | ||
manifestHash: 2ea50e23f1a5aa41df3724630ac25173738cc90c | ||
name: limit-range.addons.k8s.io | ||
selector: | ||
k8s-addon: limit-range.addons.k8s.io | ||
version: 1.5.0 | ||
- id: k8s-1.12 | ||
manifest: dns-controller.addons.k8s.io/k8s-1.12.yaml | ||
manifestHash: 8b44f8925352ceb1e59d8edd66bb4e0471a11440 | ||
name: dns-controller.addons.k8s.io | ||
selector: | ||
k8s-addon: dns-controller.addons.k8s.io | ||
version: 1.19.0-beta.2 | ||
- id: v1.15.0 | ||
kubernetesVersion: '>=1.15.0' | ||
manifest: storage-aws.addons.k8s.io/v1.15.0.yaml | ||
manifestHash: 00cf6e46e25b736b2da93c6025ce482474d83904 | ||
name: storage-aws.addons.k8s.io | ||
selector: | ||
k8s-addon: storage-aws.addons.k8s.io | ||
version: 1.17.0 | ||
- id: v1.7.0 | ||
kubernetesVersion: <1.15.0 | ||
manifest: storage-aws.addons.k8s.io/v1.7.0.yaml | ||
manifestHash: 62705a596142e6cc283280e8aa973e51536994c5 | ||
name: storage-aws.addons.k8s.io | ||
selector: | ||
k8s-addon: storage-aws.addons.k8s.io | ||
version: 1.17.0 | ||
- id: k8s-1.12 | ||
kubernetesVersion: <1.16.0 | ||
manifest: networking.amazon-vpc-routed-eni/k8s-1.12.yaml | ||
manifestHash: 1b204a83ef58e8b268970861bb18ff2df597c86a | ||
name: networking.amazon-vpc-routed-eni | ||
selector: | ||
role.kubernetes.io/networking: "1" | ||
version: 1.5.5-kops.1 | ||
- id: k8s-1.16 | ||
kubernetesVersion: '>=1.16.0' | ||
manifest: networking.amazon-vpc-routed-eni/k8s-1.16.yaml | ||
manifestHash: 9ee6f14c2919f1744bd3ef7c8a01ff3c4a111511 | ||
name: networking.amazon-vpc-routed-eni | ||
selector: | ||
role.kubernetes.io/networking: "1" | ||
version: 1.7.8-kops.1 |
160 changes: 160 additions & 0 deletions
160
...otstrapchannelbuilder/amazonvpc-containerd/networking.amazon-vpc-routed-eni-k8s-1.12.yaml
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,160 @@ | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: ClusterRole | ||
metadata: | ||
name: aws-node | ||
rules: | ||
- apiGroups: | ||
- crd.k8s.amazonaws.com | ||
resources: | ||
- '*' | ||
- namespaces | ||
verbs: | ||
- '*' | ||
- apiGroups: | ||
- "" | ||
resources: | ||
- pods | ||
- nodes | ||
- namespaces | ||
verbs: | ||
- list | ||
- watch | ||
- get | ||
- apiGroups: | ||
- extensions | ||
resources: | ||
- daemonsets | ||
verbs: | ||
- list | ||
- watch | ||
|
||
--- | ||
|
||
apiVersion: v1 | ||
kind: ServiceAccount | ||
metadata: | ||
name: aws-node | ||
namespace: kube-system | ||
|
||
--- | ||
|
||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: ClusterRoleBinding | ||
metadata: | ||
name: aws-node | ||
roleRef: | ||
apiGroup: rbac.authorization.k8s.io | ||
kind: ClusterRole | ||
name: aws-node | ||
subjects: | ||
- kind: ServiceAccount | ||
name: aws-node | ||
namespace: kube-system | ||
|
||
--- | ||
|
||
apiVersion: apps/v1 | ||
kind: DaemonSet | ||
metadata: | ||
labels: | ||
k8s-app: aws-node | ||
name: aws-node | ||
namespace: kube-system | ||
spec: | ||
selector: | ||
matchLabels: | ||
k8s-app: aws-node | ||
template: | ||
metadata: | ||
labels: | ||
k8s-app: aws-node | ||
spec: | ||
affinity: | ||
nodeAffinity: | ||
requiredDuringSchedulingIgnoredDuringExecution: | ||
nodeSelectorTerms: | ||
- matchExpressions: | ||
- key: beta.kubernetes.io/os | ||
operator: In | ||
values: | ||
- linux | ||
- key: beta.kubernetes.io/arch | ||
operator: In | ||
values: | ||
- amd64 | ||
containers: | ||
- env: | ||
- name: CLUSTER_NAME | ||
value: minimal.example.com | ||
- name: AWS_VPC_K8S_CNI_LOGLEVEL | ||
value: DEBUG | ||
- name: MY_NODE_NAME | ||
valueFrom: | ||
fieldRef: | ||
fieldPath: spec.nodeName | ||
- name: WATCH_NAMESPACE | ||
valueFrom: | ||
fieldRef: | ||
fieldPath: metadata.namespace | ||
- name: WARM_IP_TARGET | ||
value: "10" | ||
- name: AWS_VPC_K8S_CNI_LOGLEVEL | ||
value: debug | ||
image: 602401143452.dkr.ecr.us-west-2.amazonaws.com/amazon-k8s-cni:v1.5.5 | ||
imagePullPolicy: Always | ||
name: aws-node | ||
ports: | ||
- containerPort: 61678 | ||
name: metrics | ||
resources: | ||
requests: | ||
cpu: 10m | ||
securityContext: | ||
privileged: true | ||
volumeMounts: | ||
- mountPath: /host/opt/cni/bin | ||
name: cni-bin-dir | ||
- mountPath: /host/etc/cni/net.d | ||
name: cni-net-dir | ||
- mountPath: /host/var/log | ||
name: log-dir | ||
- mountPath: /var/run/docker.sock | ||
name: dockersock | ||
hostNetwork: true | ||
priorityClassName: system-node-critical | ||
serviceAccountName: aws-node | ||
tolerations: | ||
- operator: Exists | ||
volumes: | ||
- hostPath: | ||
path: /opt/cni/bin | ||
name: cni-bin-dir | ||
- hostPath: | ||
path: /etc/cni/net.d | ||
name: cni-net-dir | ||
- hostPath: | ||
path: /var/log | ||
name: log-dir | ||
- hostPath: | ||
path: /var/run/docker.sock | ||
name: dockersock | ||
updateStrategy: | ||
type: RollingUpdate | ||
|
||
--- | ||
|
||
apiVersion: apiextensions.k8s.io/v1beta1 | ||
kind: CustomResourceDefinition | ||
metadata: | ||
name: eniconfigs.crd.k8s.amazonaws.com | ||
spec: | ||
group: crd.k8s.amazonaws.com | ||
names: | ||
kind: ENIConfig | ||
plural: eniconfigs | ||
singular: eniconfig | ||
scope: Cluster | ||
versions: | ||
- name: v1alpha1 | ||
served: true | ||
storage: true |
Oops, something went wrong.