From d5cbb19b39152cef0c50004f77ba30f9bb19fc64 Mon Sep 17 00:00:00 2001 From: Florian Ruynat <16313165+floryut@users.noreply.github.com> Date: Thu, 15 Jul 2021 10:59:38 +0200 Subject: [PATCH] Update kube-ovn to 1.7.1 --- README.md | 2 +- .../templates/cni-kube-ovn-crd.yml.j2 | 109 ++++++++++++++++-- .../kube-ovn/templates/cni-ovn.yml.j2 | 9 ++ 3 files changed, 108 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 881e9d953..47973e9d7 100644 --- a/README.md +++ b/README.md @@ -141,7 +141,7 @@ Note: Upstart/SysV init based OS types are not supported. - [canal](https://github.com/projectcalico/canal) (given calico/flannel versions) - [cilium](https://github.com/cilium/cilium) v1.8.9 - [flanneld](https://github.com/coreos/flannel) v0.13.0 - - [kube-ovn](https://github.com/alauda/kube-ovn) v1.7.0 + - [kube-ovn](https://github.com/alauda/kube-ovn) v1.7.1 - [kube-router](https://github.com/cloudnativelabs/kube-router) v1.2.2 - [multus](https://github.com/intel/multus-cni) v3.7.0 - [ovn4nfv](https://github.com/opnfv/ovn4nfv-k8s-plugin) v1.1.0 diff --git a/roles/network_plugin/kube-ovn/templates/cni-kube-ovn-crd.yml.j2 b/roles/network_plugin/kube-ovn/templates/cni-kube-ovn-crd.yml.j2 index 70427af62..e724fd8ff 100644 --- a/roles/network_plugin/kube-ovn/templates/cni-kube-ovn-crd.yml.j2 +++ b/roles/network_plugin/kube-ovn/templates/cni-kube-ovn-crd.yml.j2 @@ -243,24 +243,34 @@ spec: spec: type: object properties: + id: + type: integer + minimum: 0 + maximum: 4095 + provider: + type: string vlanId: type: integer + description: Deprecated in favor of id providerInterfaceName: type: string - logicalInterfaceName: - type: string - subnet: - type: string + description: Deprecated in favor of provider + required: + - provider + status: + type: object + properties: + subnets: + type: array + items: + type: string additionalPrinterColumns: - - name: VlanID + - name: ID type: string - jsonPath: .spec.vlanId - - name: ProviderInterfaceName + jsonPath: .spec.id + - name: Provider type: string - jsonPath: .spec.providerInterfaceName - - name: Subnet - type: string - jsonPath: .spec.subnet + jsonPath: .spec.provider scope: Cluster names: plural: vlans @@ -271,6 +281,83 @@ spec: --- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition +metadata: + name: provider-networks.kubeovn.io +spec: + group: kubeovn.io + versions: + - name: v1 + served: true + storage: true + schema: + openAPIV3Schema: + type: object + properties: + spec: + type: object + properties: + defaultInterface: + type: string + customInterfaces: + type: array + items: + type: object + properties: + interface: + type: string + nodes: + type: array + items: + type: string + excludeNodes: + type: array + items: + type: string + required: + - defaultInterface + status: + type: object + properties: + readyNodes: + type: array + items: + type: string + vlans: + type: array + items: + type: string + conditions: + type: array + items: + type: object + properties: + node: + type: string + type: + type: string + status: + type: string + reason: + type: string + message: + type: string + lastUpdateTime: + type: string + lastTransitionTime: + type: string + additionalPrinterColumns: + - name: DefaultInterface + type: string + jsonPath: .spec.defaultInterface + scope: Cluster + names: + plural: provider-networks + singular: provider-network + kind: ProviderNetwork + listKind: ProviderNetworkList +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition metadata: name: vpcs.kubeovn.io spec: diff --git a/roles/network_plugin/kube-ovn/templates/cni-ovn.yml.j2 b/roles/network_plugin/kube-ovn/templates/cni-ovn.yml.j2 index 6bf400390..b90175986 100644 --- a/roles/network_plugin/kube-ovn/templates/cni-ovn.yml.j2 +++ b/roles/network_plugin/kube-ovn/templates/cni-ovn.yml.j2 @@ -33,6 +33,8 @@ kind: ConfigMap metadata: name: ovn-config namespace: kube-system +data: + defaultNetworkType: geneve --- apiVersion: v1 kind: ServiceAccount @@ -65,6 +67,8 @@ rules: - vpc-nat-gateways - ips - vlans + - provider-networks + - provider-networks/status - networks verbs: - "*" @@ -381,6 +385,8 @@ spec: - mountPath: /sys name: host-sys readOnly: true + - mountPath: /etc/cni/net.d + name: cni-conf - mountPath: /etc/openvswitch name: host-config-openvswitch - mountPath: /etc/ovn @@ -431,6 +437,9 @@ spec: - name: host-sys hostPath: path: /sys + - name: cni-conf + hostPath: + path: /etc/cni/net.d - name: host-config-openvswitch hostPath: path: /etc/origin/openvswitch