Skip to content
Snippets Groups Projects
Verified Commit 0eaba8b8 authored by Varac's avatar Varac
Browse files

Migrate installTiller() to master

Closes #68
parent 384ac5cd
No related branches found
No related tags found
No related merge requests found
apiVersion: v1
kind: ServiceAccount
metadata:
name: tiller
namespace: kube-system
---
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1beta1
metadata:
name: tiller-clusterrolebinding
subjects:
- kind: ServiceAccount
name: tiller
namespace: kube-system
roleRef:
kind: ClusterRole
name: cluster-admin
apiGroup: ""
......@@ -21,10 +21,32 @@
src: /oas/control/local/rke/kube_config_cluster.yml
dest: /root/.kube/config
- name: Install python3-pip
package:
name: python3-pip
- name: Install openshift python module via pip3
pip:
name: openshift
executable: /usr/bin/pip3
- name: Install Tiller
command: 'oas_control /usr/local/bin/control installTiller'
register: installTiller
- debug: var=installTiller.stdout
k8s:
state: present
definition: "{{ lookup('file', 'k8s-config/tiller-permissions.yml') }}"
- name: Check if tiller is already instaled
shell: '/snap/bin/helm ls || /bin/true'
register: helm_ls
changed_when: false
- name: Initialize helm
command: /snap/bin/helm init --upgrade --service-account=tiller
when: helm_ls.stderr.find('Error') != -1
- name: Wait for tiller to become available
command: /snap/bin/kubectl rollout status -n kube-system deployment/tiller-deploy
changed_when: false
- name: Create Storage
command: 'oas_control /usr/local/bin/control createStorage'
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment