Use v1beta3 node definitions

pull/6/head
Eric Paris 2015-04-03 11:51:45 -04:00
parent 35c7b16592
commit c4241fb2ae
2 changed files with 19 additions and 6 deletions

View File

@ -24,13 +24,13 @@
service: name=kube-scheduler enabled=yes state=started
- name: Copy minion definition json files to master
template: src=node.j2 dest=/tmp/node-{{ item }}.yml
template: src=node.j2 dest=/tmp/node-{{ item }}.json
changed_when: false
with_items:
groups['minions']
- name: Load minion definition into master
command: /usr/bin/kubectl create -f /tmp/node-{{ item }}.yml
command: /usr/bin/kubectl create -f /tmp/node-{{ item }}.json
register: command_result
failed_when: command_result.rc != 0 and 'already exists' not in command_result.stderr
changed_when: "command_result.rc == 0"
@ -38,7 +38,7 @@
groups['minions']
- name: Delete minion definitions from master
file: path=/tmp/node-{{ item }}.yml state=absent
file: path=/tmp/node-{{ item }}.json state=absent
changed_when: false
with_items:
groups['minions']

View File

@ -1,3 +1,16 @@
apiVersion: v1beta1
id: {{ item }}
kind: Minion
{
"apiVersion": "v1beta3",
"kind": "Node",
"metadata": {
"name": "{{ item }}"
},
"spec": {
"externalID": "{{ item }}"
},
"status": {
"capacity": {
"cpu": "1",
"memory": "1"
}
}
}