mirror of https://github.com/kubernetes/kops.git
Merge pull request #8538 from hakman/amazon-vpc-cni-k8s-1.6.0
Update amazon-vpc-cni-k8s to v1.6.0
This commit is contained in:
commit
cfe95a0efd
|
|
@ -2408,8 +2408,7 @@ spec:
|
|||
VPC CNI networking
|
||||
properties:
|
||||
imageName:
|
||||
description: 'The container image name to use, which by default
|
||||
is: 602401143452.dkr.ecr.us-west-2.amazonaws.com/amazon-k8s-cni:v1.5.5'
|
||||
description: The container image name to use
|
||||
type: string
|
||||
type: object
|
||||
calico:
|
||||
|
|
|
|||
|
|
@ -187,8 +187,7 @@ type RomanaNetworkingSpec struct {
|
|||
|
||||
// AmazonVPCNetworkingSpec declares that we want Amazon VPC CNI networking
|
||||
type AmazonVPCNetworkingSpec struct {
|
||||
// The container image name to use, which by default is:
|
||||
// 602401143452.dkr.ecr.us-west-2.amazonaws.com/amazon-k8s-cni:v1.5.5
|
||||
// The container image name to use
|
||||
ImageName string `json:"imageName,omitempty"`
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -187,8 +187,7 @@ type RomanaNetworkingSpec struct {
|
|||
|
||||
// AmazonVPCNetworkingSpec declares that we want Amazon VPC CNI networking
|
||||
type AmazonVPCNetworkingSpec struct {
|
||||
// The container image name to use, which by default is:
|
||||
// 602401143452.dkr.ecr.us-west-2.amazonaws.com/amazon-k8s-cni:v1.5.5
|
||||
// The container image name to use
|
||||
ImageName string `json:"imageName,omitempty"`
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -187,8 +187,7 @@ type RomanaNetworkingSpec struct {
|
|||
|
||||
// AmazonVPCNetworkingSpec declares that we want Amazon VPC CNI networking
|
||||
type AmazonVPCNetworkingSpec struct {
|
||||
// The container image name to use, which by default is:
|
||||
// 602401143452.dkr.ecr.us-west-2.amazonaws.com/amazon-k8s-cni:v1.5.5
|
||||
// The container image name to use
|
||||
ImageName string `json:"imageName,omitempty"`
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,167 @@
|
|||
# Vendored from https://raw.githubusercontent.com/aws/amazon-vpc-cni-k8s/master/config/v1.6/aws-k8s-cni.yaml
|
||||
|
||||
---
|
||||
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
|
||||
|
||||
---
|
||||
kind: DaemonSet
|
||||
apiVersion: apps/v1
|
||||
metadata:
|
||||
name: aws-node
|
||||
namespace: kube-system
|
||||
labels:
|
||||
k8s-app: aws-node
|
||||
spec:
|
||||
updateStrategy:
|
||||
type: RollingUpdate
|
||||
rollingUpdate:
|
||||
maxUnavailable: "10%"
|
||||
selector:
|
||||
matchLabels:
|
||||
k8s-app: aws-node
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
k8s-app: aws-node
|
||||
spec:
|
||||
priorityClassName: system-node-critical
|
||||
affinity:
|
||||
nodeAffinity:
|
||||
requiredDuringSchedulingIgnoredDuringExecution:
|
||||
nodeSelectorTerms:
|
||||
- matchExpressions:
|
||||
- key: "beta.kubernetes.io/os"
|
||||
operator: In
|
||||
values:
|
||||
- linux
|
||||
- key: "beta.kubernetes.io/arch"
|
||||
operator: In
|
||||
values:
|
||||
- amd64
|
||||
- key: eks.amazonaws.com/compute-type
|
||||
operator: NotIn
|
||||
values:
|
||||
- fargate
|
||||
serviceAccountName: aws-node
|
||||
hostNetwork: true
|
||||
tolerations:
|
||||
- operator: Exists
|
||||
containers:
|
||||
- image: "{{- or .Networking.AmazonVPC.ImageName "602401143452.dkr.ecr.us-west-2.amazonaws.com/amazon-k8s-cni:v1.6.0" }}"
|
||||
imagePullPolicy: Always
|
||||
ports:
|
||||
- containerPort: 61678
|
||||
name: metrics
|
||||
name: aws-node
|
||||
readinessProbe:
|
||||
exec:
|
||||
command: ["/app/grpc-health-probe", "-addr=:50051"]
|
||||
initialDelaySeconds: 35
|
||||
livenessProbe:
|
||||
exec:
|
||||
command: ["/app/grpc-health-probe", "-addr=:50051"]
|
||||
initialDelaySeconds: 35
|
||||
env:
|
||||
- name: CLUSTER_NAME
|
||||
value: {{ ClusterName }}
|
||||
- name: AWS_VPC_K8S_CNI_LOGLEVEL
|
||||
value: DEBUG
|
||||
- name: AWS_VPC_K8S_CNI_VETHPREFIX
|
||||
value: eni
|
||||
- name: AWS_VPC_ENI_MTU
|
||||
value: "9001"
|
||||
- name: MY_NODE_NAME
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: spec.nodeName
|
||||
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
|
||||
- mountPath: /var/run/dockershim.sock
|
||||
name: dockershim
|
||||
volumes:
|
||||
- name: cni-bin-dir
|
||||
hostPath:
|
||||
path: /opt/cni/bin
|
||||
- name: cni-net-dir
|
||||
hostPath:
|
||||
path: /etc/cni/net.d
|
||||
- name: log-dir
|
||||
hostPath:
|
||||
path: /var/log
|
||||
- name: dockersock
|
||||
hostPath:
|
||||
path: /var/run/docker.sock
|
||||
- name: dockershim
|
||||
hostPath:
|
||||
path: /var/run/dockershim.sock
|
||||
|
||||
---
|
||||
apiVersion: apiextensions.k8s.io/v1beta1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
name: eniconfigs.crd.k8s.amazonaws.com
|
||||
spec:
|
||||
scope: Cluster
|
||||
group: crd.k8s.amazonaws.com
|
||||
versions:
|
||||
- name: v1alpha1
|
||||
served: true
|
||||
storage: true
|
||||
names:
|
||||
plural: eniconfigs
|
||||
singular: eniconfig
|
||||
kind: ENIConfig
|
||||
|
|
@ -862,6 +862,7 @@ func (b *BootstrapChannelBuilder) buildAddons() *channelsapi.Addons {
|
|||
"k8s-1.8": "1.5.0-kops.1",
|
||||
"k8s-1.10": "1.5.0-kops.2",
|
||||
"k8s-1.12": "1.5.5-kops.1",
|
||||
"k8s-1.16": "1.6.0-kops.1",
|
||||
}
|
||||
|
||||
{
|
||||
|
|
@ -901,7 +902,21 @@ func (b *BootstrapChannelBuilder) buildAddons() *channelsapi.Addons {
|
|||
Version: fi.String(versions[id]),
|
||||
Selector: networkingSelector,
|
||||
Manifest: fi.String(location),
|
||||
KubernetesVersion: ">=1.12.0",
|
||||
KubernetesVersion: ">=1.12.0 <1.16.0",
|
||||
Id: id,
|
||||
})
|
||||
}
|
||||
|
||||
{
|
||||
id := "k8s-1.16"
|
||||
location := key + "/" + id + ".yaml"
|
||||
|
||||
addons.Spec.Addons = append(addons.Spec.Addons, &channelsapi.AddonSpec{
|
||||
Name: fi.String(key),
|
||||
Version: fi.String(versions[id]),
|
||||
Selector: networkingSelector,
|
||||
Manifest: fi.String(location),
|
||||
KubernetesVersion: ">=1.16.0",
|
||||
Id: id,
|
||||
})
|
||||
}
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ func TestBootstrapChannelBuilder_BuildTasks(t *testing.T) {
|
|||
// Use cilium networking, proxy
|
||||
runChannelBuilderTest(t, "cilium", []string{"dns-controller.addons.k8s.io-k8s-1.12", "kops-controller.addons.k8s.io-k8s-1.16"})
|
||||
runChannelBuilderTest(t, "weave", []string{})
|
||||
runChannelBuilderTest(t, "amazonvpc", []string{"networking.amazon-vpc-routed-eni-k8s-1.12"})
|
||||
runChannelBuilderTest(t, "amazonvpc", []string{"networking.amazon-vpc-routed-eni-k8s-1.12", "networking.amazon-vpc-routed-eni-k8s-1.16"})
|
||||
}
|
||||
|
||||
func runChannelBuilderTest(t *testing.T, key string, addonManifests []string) {
|
||||
|
|
|
|||
|
|
@ -103,10 +103,18 @@ spec:
|
|||
role.kubernetes.io/networking: "1"
|
||||
version: 1.5.0-kops.2
|
||||
- id: k8s-1.12
|
||||
kubernetesVersion: '>=1.12.0'
|
||||
kubernetesVersion: '>=1.12.0 <1.16.0'
|
||||
manifest: networking.amazon-vpc-routed-eni/k8s-1.12.yaml
|
||||
manifestHash: 7b91bf39d562157bd45b6a29e5f58d817c6ea4e1
|
||||
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: ff9687c4431781c50257b44a9610765e52d0f137
|
||||
name: networking.amazon-vpc-routed-eni
|
||||
selector:
|
||||
role.kubernetes.io/networking: "1"
|
||||
version: 1.6.0-kops.1
|
||||
|
|
|
|||
|
|
@ -0,0 +1,179 @@
|
|||
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
|
||||
- key: eks.amazonaws.com/compute-type
|
||||
operator: NotIn
|
||||
values:
|
||||
- fargate
|
||||
containers:
|
||||
- env:
|
||||
- name: CLUSTER_NAME
|
||||
value: minimal.example.com
|
||||
- name: AWS_VPC_K8S_CNI_LOGLEVEL
|
||||
value: DEBUG
|
||||
- name: AWS_VPC_K8S_CNI_VETHPREFIX
|
||||
value: eni
|
||||
- name: AWS_VPC_ENI_MTU
|
||||
value: "9001"
|
||||
- name: MY_NODE_NAME
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: spec.nodeName
|
||||
image: 602401143452.dkr.ecr.us-west-2.amazonaws.com/amazon-k8s-cni:v1.6.0
|
||||
imagePullPolicy: Always
|
||||
livenessProbe:
|
||||
exec:
|
||||
command:
|
||||
- /app/grpc-health-probe
|
||||
- -addr=:50051
|
||||
initialDelaySeconds: 35
|
||||
name: aws-node
|
||||
ports:
|
||||
- containerPort: 61678
|
||||
name: metrics
|
||||
readinessProbe:
|
||||
exec:
|
||||
command:
|
||||
- /app/grpc-health-probe
|
||||
- -addr=:50051
|
||||
initialDelaySeconds: 35
|
||||
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
|
||||
- mountPath: /var/run/dockershim.sock
|
||||
name: dockershim
|
||||
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
|
||||
- hostPath:
|
||||
path: /var/run/dockershim.sock
|
||||
name: dockershim
|
||||
updateStrategy:
|
||||
rollingUpdate:
|
||||
maxUnavailable: 10%
|
||||
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
|
||||
Loading…
Reference in New Issue