summaryrefslogtreecommitdiffstats
path: root/ci/config_tpl/juju2
diff options
context:
space:
mode:
authorNarinder Gupta <narinder.gupta@canonical.com>2016-12-23 12:47:49 -0600
committerNarinder Gupta <narinder.gupta@canonical.com>2016-12-23 12:51:49 -0600
commit3470a4a0d81047d9d65a4b1e1e3b18e47865d4b6 (patch)
tree1744fd06855748c57a543b21188b784bebb8f386 /ci/config_tpl/juju2
parentf2fee53204aa7f3f8fe532b0394b60300a7f96f6 (diff)
modified to add load balancer kubernetes.
Change-Id: I87218dd9717c386db1ea721821d0d0e1bf4a08f9 Signed-off-by: Narinder Gupta <narinder.gupta@canonical.com>
Diffstat (limited to 'ci/config_tpl/juju2')
-rw-r--r--ci/config_tpl/juju2/bundle_tpl/keystone.yaml2
-rw-r--r--ci/config_tpl/juju2/bundlek8_tpl/bundle.yaml4
-rw-r--r--ci/config_tpl/juju2/bundlek8_tpl/etcd.yaml10
-rw-r--r--ci/config_tpl/juju2/bundlek8_tpl/kubeapi-load-balancer.yaml8
-rw-r--r--ci/config_tpl/juju2/bundlek8_tpl/relations.yaml28
5 files changed, 42 insertions, 10 deletions
diff --git a/ci/config_tpl/juju2/bundle_tpl/keystone.yaml b/ci/config_tpl/juju2/bundle_tpl/keystone.yaml
index bbb23584..5a8e16c1 100644
--- a/ci/config_tpl/juju2/bundle_tpl/keystone.yaml
+++ b/ci/config_tpl/juju2/bundle_tpl/keystone.yaml
@@ -18,7 +18,7 @@
region: {{ os.region }}
admin-role: {{ os.admin.role }}
keystone-admin-role: {{ os.admin.role }}
- preferred-api-version: 3
+ preferred-api-version: 2
{% if os.network.ipv6 %}
prefer-ipv6: {{ os.network.ipv6 }}
{% endif %}
diff --git a/ci/config_tpl/juju2/bundlek8_tpl/bundle.yaml b/ci/config_tpl/juju2/bundlek8_tpl/bundle.yaml
index 7af74afa..17281be1 100644
--- a/ci/config_tpl/juju2/bundlek8_tpl/bundle.yaml
+++ b/ci/config_tpl/juju2/bundlek8_tpl/bundle.yaml
@@ -16,6 +16,10 @@
{% include 'easyrsa.yaml' %}
{% include 'etcd.yaml' %}
{% include 'subordinate.yaml' %}
+{% if os.kubernetes.loadbalancer %}
+{% include 'kubeapi-load-balancer.yaml' %}
+{% endif %}
+
relations:
- [ 'ntp:juju-info', 'nodes:juju-info' ]
diff --git a/ci/config_tpl/juju2/bundlek8_tpl/etcd.yaml b/ci/config_tpl/juju2/bundlek8_tpl/etcd.yaml
index ba99d0e9..eaea9543 100644
--- a/ci/config_tpl/juju2/bundlek8_tpl/etcd.yaml
+++ b/ci/config_tpl/juju2/bundlek8_tpl/etcd.yaml
@@ -1,6 +1,16 @@
etcd:
charm: "./{{ ubuntu.release }}/etcd"
+{% if os.kubernetes.loadbalancer %}
+ num_units: 3
+{% else %}
num_units: 1
+{% endif %}
to:
+{% if os.kubernetes.loadbalancer %}
+{% for unit_id in to_select() %}
+ - "nodes/{{ unit_id }}"
+{% endfor %}
+{% else %}
- "nodes/0"
+{% endif %}
diff --git a/ci/config_tpl/juju2/bundlek8_tpl/kubeapi-load-balancer.yaml b/ci/config_tpl/juju2/bundlek8_tpl/kubeapi-load-balancer.yaml
new file mode 100644
index 00000000..08e7b33a
--- /dev/null
+++ b/ci/config_tpl/juju2/bundlek8_tpl/kubeapi-load-balancer.yaml
@@ -0,0 +1,8 @@
+
+ kubeapi-load-balancer:
+ charm: "./{{ ubuntu.release }}/kubeapi-load-balancer"
+ num_units: 1
+ expose: true
+ to:
+ - "nodes/0"
+
diff --git a/ci/config_tpl/juju2/bundlek8_tpl/relations.yaml b/ci/config_tpl/juju2/bundlek8_tpl/relations.yaml
index fd56090c..63fefab4 100644
--- a/ci/config_tpl/juju2/bundlek8_tpl/relations.yaml
+++ b/ci/config_tpl/juju2/bundlek8_tpl/relations.yaml
@@ -1,9 +1,19 @@
- - [ "kubernetes-master:kube-api-endpoint", "kubernetes-worker:kube-api-endpoint" ]
- - [ "kubernetes-master:cluster-dns", "kubernetes-worker:kube-dns" ]
- - [ "kubernetes-master:certificates", "easyrsa:client" ]
- - [ "kubernetes-master:etcd", "etcd:db" ]
- - [ "kubernetes-worker:certificates", "easyrsa:client" ]
- - [ "flannel:etcd", "etcd:db" ]
- - [ "flannel:cni", "kubernetes-master:cni" ]
- - [ "flannel:cni", "kubernetes-worker:cni" ]
- - [ "etcd:certificates", "easyrsa:client" ]
+{% if os.kubernetes.loadbalancer %}
+ - [ 'kubernetes-master:kube-api-endpoint', 'kubeapi-load-balancer:apiserver' ]
+{% else %}
+ - [ 'kubernetes-master:kube-api-endpoint', 'kubernetes-worker:kube-api-endpoint' ]
+{% endif %}
+ - [ 'kubernetes-master:cluster-dns', 'kubernetes-worker:kube-dns' ]
+ - [ 'kubernetes-master:certificates', 'easyrsa:client' ]
+ - [ 'kubernetes-master:etcd', 'etcd:db' ]
+ - [ 'kubernetes-worker:certificates', 'easyrsa:client' ]
+ - [ 'flannel:etcd', 'etcd:db' ]
+ - [ 'flannel:cni', 'kubernetes-master:cni' ]
+ - [ 'flannel:cni', 'kubernetes-worker:cni' ]
+ - [ 'etcd:certificates', 'easyrsa:client' ]
+{% if os.kubernetes.loadbalancer %}
+ - [ 'kubernetes-master:loadbalancer', 'kubeapi-load-balancer:loadbalancer' ]
+ - [ 'kubernetes-worker:kube-api-endpoint', 'kubeapi-load-balancer:website' ]
+ - [ 'kubeapi-load-balancer:certificates', 'easyrsa:client' ]
+{% endif %}
+