Skip to content
This repository was archived by the owner on May 24, 2020. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions deploy/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
kubeconfig
31 changes: 30 additions & 1 deletion deploy/deploy-k8s.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,40 @@
---
- name: Install extra packages
hosts: all
become: true
tasks:

- name: Install packages
command: "rpm-ostree install {{ item }}"
with_items:
# socat is needed for Helm
- socat
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had a thought. It may be a good idea to get this change in to Kubespray itself. Kubespray supports deploying helm on the kubernetes clusters it creates, so it should do this as well.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

kubernetes-sigs/kubespray#2879 is already opened for this and you've already found it. So this is okay till that gets fixed.


- name: Reboot to make layered packages available
shell: sleep 2 && systemctl reboot
async: 1
poll: 0

- name: Wait for host to be available
wait_for_connection:
delay: 15

- name: Deploy K8S
import_playbook: "kubespray/cluster.yml"
vars:
dns_mode: "coredns"
docker_mount_flags: "shared"
kube_network_plugin: "flannel"
kube_version: "v1.12.1"
kubeconfig_localhost: true
local_volumes_enabled: true
kube_feature_gates: ["VolumeSnapshotDataSource=true","CSINodeInfo=true","CSIDriverRegistry=true"]

- name: Fetch config
hosts: kube-master[0]
become: true
tasks:
- name: Retrieve kubectl config
fetch:
dest: ./kubeconfig
flat: yes
src: /root/.kube/config