summaryrefslogtreecommitdiffstats
path: root/ci/config_tpl/juju2/bundlek8_tpl
diff options
context:
space:
mode:
Diffstat (limited to 'ci/config_tpl/juju2/bundlek8_tpl')
-rw-r--r--ci/config_tpl/juju2/bundlek8_tpl/bundle.yaml7
-rw-r--r--ci/config_tpl/juju2/bundlek8_tpl/easyrsa.yaml6
-rw-r--r--ci/config_tpl/juju2/bundlek8_tpl/etcd.yaml8
-rw-r--r--ci/config_tpl/juju2/bundlek8_tpl/flannel.yaml7
-rw-r--r--ci/config_tpl/juju2/bundlek8_tpl/kubernetes.yaml20
-rw-r--r--ci/config_tpl/juju2/bundlek8_tpl/ovn.yaml9
-rw-r--r--ci/config_tpl/juju2/bundlek8_tpl/relations.yaml5
-rw-r--r--ci/config_tpl/juju2/bundlek8_tpl/subordinate.yaml4
8 files changed, 60 insertions, 6 deletions
diff --git a/ci/config_tpl/juju2/bundlek8_tpl/bundle.yaml b/ci/config_tpl/juju2/bundlek8_tpl/bundle.yaml
index 400dcb45..96a27cfb 100644
--- a/ci/config_tpl/juju2/bundlek8_tpl/bundle.yaml
+++ b/ci/config_tpl/juju2/bundlek8_tpl/bundle.yaml
@@ -15,11 +15,16 @@
{% 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' ]
diff --git a/ci/config_tpl/juju2/bundlek8_tpl/easyrsa.yaml b/ci/config_tpl/juju2/bundlek8_tpl/easyrsa.yaml
index a4633fcb..ea46e424 100644
--- a/ci/config_tpl/juju2/bundlek8_tpl/easyrsa.yaml
+++ b/ci/config_tpl/juju2/bundlek8_tpl/easyrsa.yaml
@@ -6,5 +6,9 @@
"": internal-api
{% endif %}
to:
- - "lxd:nodes/0"
+{% if k8.network.controller == 'ovn' %}
+ - "nodes/1"
+{% else %}
+ - "lxd:nodes/0"
+{% endif %}
diff --git a/ci/config_tpl/juju2/bundlek8_tpl/etcd.yaml b/ci/config_tpl/juju2/bundlek8_tpl/etcd.yaml
index 5915038c..d902adf8 100644
--- a/ci/config_tpl/juju2/bundlek8_tpl/etcd.yaml
+++ b/ci/config_tpl/juju2/bundlek8_tpl/etcd.yaml
@@ -1,7 +1,11 @@
etcd:
charm: "cs:~containers/etcd"
{% if k8.feature.loadbalancer %}
+{% if k8.network.controller == 'ovn' %}
+ num_units: 1
+{% else %}
num_units: 3
+{% endif %}
{% else %}
num_units: 1
{% endif %}
@@ -10,6 +14,9 @@
"": internal-api
{% endif %}
to:
+{% if k8.network.controller == 'ovn' %}
+ - "nodes/0"
+{% else %}
{% if k8.feature.loadbalancer %}
{% for unit_id in to_select() %}
- "lxd:nodes/0"
@@ -17,4 +24,5 @@
{% else %}
- "lxd:nodes/0"
{% endif %}
+{% endif %}
diff --git a/ci/config_tpl/juju2/bundlek8_tpl/flannel.yaml b/ci/config_tpl/juju2/bundlek8_tpl/flannel.yaml
new file mode 100644
index 00000000..561e0880
--- /dev/null
+++ b/ci/config_tpl/juju2/bundlek8_tpl/flannel.yaml
@@ -0,0 +1,7 @@
+
+ flannel:
+ charm: cs:~containers/flannel
+{% if os.service.bindings %}
+ bindings:
+ "": internal-api
+{% endif %} \ No newline at end of file
diff --git a/ci/config_tpl/juju2/bundlek8_tpl/kubernetes.yaml b/ci/config_tpl/juju2/bundlek8_tpl/kubernetes.yaml
index 93f8890e..933c1ef7 100644
--- a/ci/config_tpl/juju2/bundlek8_tpl/kubernetes.yaml
+++ b/ci/config_tpl/juju2/bundlek8_tpl/kubernetes.yaml
@@ -2,13 +2,33 @@
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
+ service-cidr: "192.168.200.0/24"
+{% 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 }}"
diff --git a/ci/config_tpl/juju2/bundlek8_tpl/ovn.yaml b/ci/config_tpl/juju2/bundlek8_tpl/ovn.yaml
new file mode 100644
index 00000000..978c07c9
--- /dev/null
+++ b/ci/config_tpl/juju2/bundlek8_tpl/ovn.yaml
@@ -0,0 +1,9 @@
+
+ ovn:
+ charm: "cs:~aakashkt/ovn-15"
+{% if os.service.bindings %}
+ bindings:
+ "": internal-api
+{% endif %}
+ options:
+ gateway-physical-interface: "none" \ No newline at end of file
diff --git a/ci/config_tpl/juju2/bundlek8_tpl/relations.yaml b/ci/config_tpl/juju2/bundlek8_tpl/relations.yaml
index 3a34aa1e..44018201 100644
--- a/ci/config_tpl/juju2/bundlek8_tpl/relations.yaml
+++ b/ci/config_tpl/juju2/bundlek8_tpl/relations.yaml
@@ -7,9 +7,14 @@
- [ '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' ]
diff --git a/ci/config_tpl/juju2/bundlek8_tpl/subordinate.yaml b/ci/config_tpl/juju2/bundlek8_tpl/subordinate.yaml
deleted file mode 100644
index 30832c54..00000000
--- a/ci/config_tpl/juju2/bundlek8_tpl/subordinate.yaml
+++ /dev/null
@@ -1,4 +0,0 @@
-
- flannel:
- charm: cs:~containers/flannel
-