{% include 'kubernetes.yaml' %}
{% include 'easyrsa.yaml' %}
{% include 'etcd.yaml' %}
-{% include 'subordinate.yaml' %}
{% if k8.feature.loadbalancer %}
{% include 'kubeapi-load-balancer.yaml' %}
{% endif %}
+{% if k8.network.controller == 'ovn' %}
+{% include 'ovn.yaml' %}
+{% else %}
+{% include 'flannel.yaml' %}
+{% endif %}
+
relations:
- [ 'ntp:juju-info', 'nodes:juju-info' ]
--- /dev/null
+
+ flannel:
+ charm: cs:~containers/flannel
+{% if os.service.bindings %}
+ bindings:
+ "": internal-api
+{% endif %}
\ No newline at end of file
charm: "cs:~containers/kubernetes-master"
num_units: 1
expose: true
+{% if os.service.bindings %}
+ bindings:
+ "": internal-api
+{% endif %}
+{% if k8.network.controller == 'ovn' %}
+ options:
+ channel: 1.5/stable
+{% endif %}
to:
- "nodes/0"
+
+
+
kubernetes-worker:
charm: "cs:~containers/kubernetes-worker"
num_units: {{ opnfv.units - 1 }}
expose: true
+{% if os.service.bindings %}
+ bindings:
+ "": internal-api
+{% endif %}
+{% if k8.network.controller == 'ovn' %}
+ options:
+ channel: 1.5/stable
+{% endif %}
to:
{% for unit_id in range(1, opnfv.units) %}
- "nodes/{{ unit_id }}"
--- /dev/null
+
+ ovn:
+ charm: "cs:~aakashkt/ovn-2"
+{% if os.service.bindings %}
+ bindings:
+ "": internal-api
+{% endif %}
+ options:
+ gateway-physical-interface: "intf100"
\ No newline at end of file
- [ 'kubernetes-master:etcd', 'etcd:db' ]
- [ 'kubernetes-master:kube-control', 'kubernetes-worker:kube-control' ]
- [ 'kubernetes-worker:certificates', 'easyrsa:client' ]
+{% if k8.network.controller == 'ovn' %}
+ - [ 'ovn:cni', 'kubernetes-master:cni' ]
+ - [ 'ovn:cni', 'kubernetes-worker:cni' ]
+{% else %}
- [ 'flannel:etcd', 'etcd:db' ]
- [ 'flannel:cni', 'kubernetes-master:cni' ]
- [ 'flannel:cni', 'kubernetes-worker:cni' ]
+{% endif %}
- [ 'etcd:certificates', 'easyrsa:client' ]
{% if k8.feature.loadbalancer %}
- [ 'kubernetes-master:loadbalancer', 'kubeapi-load-balancer:loadbalancer' ]
+++ /dev/null
-
- flannel:
- charm: cs:~containers/flannel
-
k8:
feature:
loadbalancer: False
+ network:
+ controller: nosdn
if 'lb' in features:
config['k8']['feature']['loadbalancer'] = True
+# change ha mode
+config['k8']['network']['controller'] = sdn
+
# Set beta option from extra
if 'hugepages' in extra:
config['os']['beta']['huge_pages'] = True