mirror of https://github.com/kubernetes/kops.git
Merge pull request #2335 from justinsb/kopeionetworking_16_manifest
Update kopeio-networking
This commit is contained in:
commit
f7edd0b3f9
|
@ -0,0 +1,89 @@
|
|||
apiVersion: extensions/v1beta1
|
||||
kind: DaemonSet
|
||||
metadata:
|
||||
name: kopeio-networking-agent
|
||||
namespace: kube-system
|
||||
labels:
|
||||
k8s-addon: networking.kope.io
|
||||
role.kubernetes.io/networking: "1"
|
||||
spec:
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
name: kopeio-networking-agent
|
||||
role.kubernetes.io/networking: "1"
|
||||
spec:
|
||||
hostPID: true
|
||||
hostIPC: true
|
||||
hostNetwork: true
|
||||
containers:
|
||||
- resources:
|
||||
requests:
|
||||
cpu: 20m
|
||||
memory: 100Mi
|
||||
limits:
|
||||
cpu: 20m
|
||||
memory: 100Mi
|
||||
securityContext:
|
||||
privileged: true
|
||||
image: kopeio/networking-agent:1.0.20170406
|
||||
name: networking-agent
|
||||
volumeMounts:
|
||||
- name: lib-modules
|
||||
mountPath: /lib/modules
|
||||
readOnly: true
|
||||
serviceAccountName: kopeio-networking-agent
|
||||
tolerations:
|
||||
- key: node-role.kubernetes.io/master
|
||||
effect: NoSchedule
|
||||
volumes:
|
||||
- name: lib-modules
|
||||
hostPath:
|
||||
path: /lib/modules
|
||||
|
||||
---
|
||||
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: kopeio-networking-agent
|
||||
namespace: kube-system
|
||||
labels:
|
||||
k8s-addon: networking.kope.io
|
||||
role.kubernetes.io/networking: "1"
|
||||
|
||||
---
|
||||
|
||||
apiVersion: rbac.authorization.k8s.io/v1beta1
|
||||
kind: ClusterRole
|
||||
metadata:
|
||||
labels:
|
||||
k8s-addon: networking.kope.io
|
||||
name: kopeio:networking-agent
|
||||
rules:
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- nodes
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- patch
|
||||
|
||||
---
|
||||
|
||||
apiVersion: rbac.authorization.k8s.io/v1beta1
|
||||
kind: ClusterRoleBinding
|
||||
metadata:
|
||||
labels:
|
||||
k8s-addon: networking.kope.io
|
||||
name: kopeio:networking-agent
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: ClusterRole
|
||||
name: kopeio:networking-agent
|
||||
subjects:
|
||||
- apiGroup: rbac.authorization.k8s.io
|
||||
kind: User
|
||||
name: system:serviceaccount:kube-system:kopeio-networking-agent
|
|
@ -4,7 +4,7 @@ metadata:
|
|||
name: kopeio-networking-agent
|
||||
namespace: kube-system
|
||||
labels:
|
||||
k8s-addon: networking.addons.k8s.io
|
||||
k8s-addon: networking.kope.io
|
||||
role.kubernetes.io/networking: "1"
|
||||
spec:
|
||||
template:
|
||||
|
@ -20,9 +20,13 @@ spec:
|
|||
- resources:
|
||||
requests:
|
||||
cpu: 20m
|
||||
memory: 100Mi
|
||||
limits:
|
||||
cpu: 20m
|
||||
memory: 100Mi
|
||||
securityContext:
|
||||
privileged: true
|
||||
image: kopeio/networking-agent:1.0.20161116
|
||||
image: kopeio/networking-agent:1.0.20170406
|
||||
name: networking-agent
|
||||
volumeMounts:
|
||||
- name: lib-modules
|
|
@ -206,18 +206,37 @@ func (b *BootstrapChannelBuilder) buildManifest() (*channelsapi.Addons, map[stri
|
|||
|
||||
if b.cluster.Spec.Networking.Kopeio != nil {
|
||||
key := "networking.kope.io"
|
||||
version := "1.0.20161116"
|
||||
version := "1.0.20170406"
|
||||
|
||||
location := key + "/v" + version + ".yaml"
|
||||
{
|
||||
location := key + "/pre-k8s-1.6.yaml"
|
||||
id := "pre-k8s-1.6"
|
||||
|
||||
addons.Spec.Addons = append(addons.Spec.Addons, &channelsapi.AddonSpec{
|
||||
Name: fi.String(key),
|
||||
Version: fi.String(version),
|
||||
Selector: map[string]string{"role.kubernetes.io/networking": "1"},
|
||||
Manifest: fi.String(location),
|
||||
})
|
||||
addons.Spec.Addons = append(addons.Spec.Addons, &channelsapi.AddonSpec{
|
||||
Name: fi.String(key),
|
||||
Version: fi.String(version),
|
||||
Selector: networkingSelector,
|
||||
Manifest: fi.String(location),
|
||||
KubernetesVersion: "<1.6.0",
|
||||
Id: id,
|
||||
})
|
||||
manifests[key+"-"+id] = "addons/" + location
|
||||
}
|
||||
|
||||
manifests[key] = "addons/" + location
|
||||
{
|
||||
location := key + "/k8s-1.6.yaml"
|
||||
id := "k8s-1.6"
|
||||
|
||||
addons.Spec.Addons = append(addons.Spec.Addons, &channelsapi.AddonSpec{
|
||||
Name: fi.String(key),
|
||||
Version: fi.String(version),
|
||||
Selector: networkingSelector,
|
||||
Manifest: fi.String(location),
|
||||
KubernetesVersion: ">=1.6.0",
|
||||
Id: id,
|
||||
})
|
||||
manifests[key+"-"+id] = "addons/" + location
|
||||
}
|
||||
}
|
||||
|
||||
if b.cluster.Spec.Networking.Weave != nil {
|
||||
|
|
|
@ -47,8 +47,17 @@ spec:
|
|||
selector:
|
||||
k8s-addon: storage-aws.addons.k8s.io
|
||||
version: 1.6.0
|
||||
- manifest: networking.kope.io/v1.0.20161116.yaml
|
||||
- id: pre-k8s-1.6
|
||||
kubernetesVersion: <1.6.0
|
||||
manifest: networking.kope.io/pre-k8s-1.6.yaml
|
||||
name: networking.kope.io
|
||||
selector:
|
||||
role.kubernetes.io/networking: "1"
|
||||
version: 1.0.20161116
|
||||
version: 1.0.20170406
|
||||
- id: k8s-1.6
|
||||
kubernetesVersion: '>=1.6.0'
|
||||
manifest: networking.kope.io/k8s-1.6.yaml
|
||||
name: networking.kope.io
|
||||
selector:
|
||||
role.kubernetes.io/networking: "1"
|
||||
version: 1.0.20170406
|
||||
|
|
Loading…
Reference in New Issue