Skip to content

Commit

Permalink
Update kube-router to v0.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Ciprian Hacman committed Mar 13, 2020
1 parent d6a2daf commit b9f2162
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 31 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Pulled and modified from https://github.com/cloudnativelabs/kube-router/blob/v0.3.1/daemonset/generic-kuberouter-all-features.yaml
# Pulled and modified from https://github.com/cloudnativelabs/kube-router/blob/v0.4.0/daemonset/generic-kuberouter-all-features.yaml

---
apiVersion: v1
Expand Down Expand Up @@ -45,12 +45,12 @@ spec:
labels:
k8s-app: kube-router
tier: node
annotations:
scheduler.alpha.kubernetes.io/critical-pod: ''
spec:
priorityClassName: system-node-critical
serviceAccountName: kube-router
containers:
- name: kube-router
image: cloudnativelabs/kube-router:v0.3.1
image: docker.io/cloudnativelabs/kube-router:v0.4.0
args:
- --run-router=true
- --run-firewall=true
Expand Down Expand Up @@ -82,9 +82,6 @@ spec:
readOnly: true
- name: cni-conf-dir
mountPath: /etc/cni/net.d
- name: kubeconfig
mountPath: /var/lib/kube-router/kubeconfig
readOnly: true
initContainers:
- name: install-cni
image: busybox
Expand All @@ -101,28 +98,27 @@ spec:
mv ${TMP} /etc/cni/net.d/10-kuberouter.conflist;
fi
volumeMounts:
- name: cni-conf-dir
mountPath: /etc/cni/net.d
- name: kube-router-cfg
mountPath: /etc/kube-router
- mountPath: /etc/cni/net.d
name: cni-conf-dir
- mountPath: /etc/kube-router
name: kube-router-cfg
hostNetwork: true
priorityClassName: system-node-critical
serviceAccountName: kube-router
tolerations:
- key: CriticalAddonsOnly
operator: Exists
- effect: NoSchedule
key: node-role.kubernetes.io/master
operator: Exists
- effect: NoSchedule
key: node.kubernetes.io/not-ready
operator: Exists
volumes:
- hostPath:
- name: lib-modules
hostPath:
path: /lib/modules
name: lib-modules
- hostPath:
path: /etc/cni/net.d
name: cni-conf-dir
- name: kubeconfig
- name: cni-conf-dir
hostPath:
path: /var/lib/kube-router/kubeconfig
path: /etc/cni/net.d
- name: kube-router-cfg
configMap:
name: kube-router-cfg
Expand All @@ -133,32 +129,34 @@ metadata:
name: kube-router
namespace: kube-system
---
# Kube-router roles
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1beta1
metadata:
name: kube-router
namespace: kube-system
rules:
- apiGroups: [""]
- apiGroups:
- ""
resources:
- namespaces
- pods
- services
- nodes
- endpoints
verbs:
- get
- list
- get
- watch
- apiGroups: ["networking.k8s.io"]
- apiGroups:
- "networking.k8s.io"
resources:
- networkpolicies
verbs:
- list
- get
- list
- watch
- apiGroups: ["extensions"]
- apiGroups:
- extensions
resources:
- networkpolicies
verbs:
Expand All @@ -178,5 +176,3 @@ subjects:
- kind: ServiceAccount
name: kube-router
namespace: kube-system
- kind: User
name: system:kube-router
9 changes: 6 additions & 3 deletions upup/pkg/fi/cloudup/bootstrapchannelbuilder.go
Original file line number Diff line number Diff line change
Expand Up @@ -795,15 +795,18 @@ func (b *BootstrapChannelBuilder) buildAddons() *channelsapi.Addons {

if b.cluster.Spec.Networking.Kuberouter != nil {
key := "networking.kuberouter"
version := "0.3.1-kops.3"
versions := map[string]string{
"k8s-1.6": "3.1.0-kops.3",
"k8s-1.12": "0.4.0-kops.1",
}

{
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),
Version: fi.String(versions[id]),
Selector: networkingSelector,
Manifest: fi.String(location),
KubernetesVersion: "<1.12.0",
Expand All @@ -817,7 +820,7 @@ func (b *BootstrapChannelBuilder) buildAddons() *channelsapi.Addons {

addons.Spec.Addons = append(addons.Spec.Addons, &channelsapi.AddonSpec{
Name: fi.String(key),
Version: fi.String(version),
Version: fi.String(versions[id]),
Selector: networkingSelector,
Manifest: fi.String(location),
KubernetesVersion: ">=1.12.0",
Expand Down

0 comments on commit b9f2162

Please sign in to comment.