diff --git a/apps.yml b/apps.yml index ee9d9f36b..a7f0078e8 100644 --- a/apps.yml +++ b/apps.yml @@ -9,6 +9,7 @@ - { role: apps/k8s-elasticsearch, tags: 'elasticsearch' } - { role: apps/k8s-memcached, tags: 'memcached' } - { role: apps/k8s-redis, tags: 'redis' } + - { role: apps/k8s-mongodb-simple, tags: 'mongodb-simple' } # Msg Broker - { role: apps/k8s-rabbitmq, tags: 'rabbitmq' } @@ -27,3 +28,6 @@ # ETCD - { role: apps/k8s-etcd, tags: 'etcd'} + + # Chat Apps + - { role: apps/k8s-rocketchat, tags: 'rocketchat'} \ No newline at end of file diff --git a/roles/apps/k8s-common b/roles/apps/k8s-common index c69c5f881..8abd4ec3b 160000 --- a/roles/apps/k8s-common +++ b/roles/apps/k8s-common @@ -1 +1 @@ -Subproject commit c69c5f881fe414f6856f811b9bb40cd19bcf83f4 +Subproject commit 8abd4ec3bcdc5f36d96c312f3a424724520a12b8 diff --git a/roles/kubernetes/master/files/namespace.yml b/roles/kubernetes/master/files/namespace.yml new file mode 100644 index 000000000..986f4b482 --- /dev/null +++ b/roles/kubernetes/master/files/namespace.yml @@ -0,0 +1,4 @@ +apiVersion: v1 +kind: Namespace +metadata: + name: kube-system diff --git a/roles/kubernetes/master/tasks/main.yml b/roles/kubernetes/master/tasks/main.yml index cbdf555e7..ae7c5d8cc 100644 --- a/roles/kubernetes/master/tasks/main.yml +++ b/roles/kubernetes/master/tasks/main.yml @@ -56,15 +56,24 @@ delay: 10 timeout: 60 -- name: Create 'kube-system' namespace - uri: - url: http://127.0.0.1:{{ kube_apiserver_insecure_port }}/api/v1/namespaces - method: POST - body: "{{namespace_kubesystem|to_json}}" - status_code: 201,409 +- name: copy 'kube-system' namespace manifest + copy: src=namespace.yml dest=/etc/kubernetes/kube-system-ns.yml run_once: yes when: inventory_hostname == groups['kube-master'][0] +- name: Check if kube-system exists + command: kubectl get ns kube-system + register: 'kubesystem' + changed_when: False + ignore_errors: yes + run_once: yes + +- name: Create 'kube-system' namespace + command: kubectl create -f /etc/kubernetes/kube-system-ns.yml + when: kubesystem|failed + changed_when: False + run_once: yes + - name: Write kube-controller-manager manifest template: src: manifests/kube-controller-manager.manifest.j2