From 156142216fa32e3feb613540eb79a269aea923ea Mon Sep 17 00:00:00 2001 From: Jeff Geerling Date: Mon, 4 Jun 2018 21:45:51 -0500 Subject: [PATCH] Issue #5: Add more configuration ability to default Flannel network manifests. --- README.md | 5 +++++ defaults/main.yml | 4 ++++ tasks/master-setup.yml | 4 ++-- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index df990c7..4ae18c1 100644 --- a/README.md +++ b/README.md @@ -59,6 +59,11 @@ Apt repository options for Kubernetes installation. Yum repository options for Kubernetes installation. + kubernetes_flannel_manifest_file_rbac: https://raw.githubusercontent.com/coreos/flannel/master/Documentation/k8s-manifests/kube-flannel-rbac.yml + kubernetes_flannel_manifest_file: https://raw.githubusercontent.com/coreos/flannel/master/Documentation/kube-flannel.yml + +Flannel manifest files to apply to the Kubernetes cluster to enable networking. You can copy your own files to your server and apply them instead, if you need to customize the Flannel networking configuration. + ## Dependencies None. diff --git a/defaults/main.yml b/defaults/main.yml index c762218..e79521d 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -28,3 +28,7 @@ kubernetes_apt_repository: "deb http://apt.kubernetes.io/ kubernetes-xenial {{ k kubernetes_apt_ignore_key_error: False kubernetes_yum_arch: x86_64 + +# Flannel config files. +kubernetes_flannel_manifest_file_rbac: https://raw.githubusercontent.com/coreos/flannel/master/Documentation/k8s-manifests/kube-flannel-rbac.yml +kubernetes_flannel_manifest_file: https://raw.githubusercontent.com/coreos/flannel/master/Documentation/kube-flannel.yml diff --git a/tasks/master-setup.yml b/tasks/master-setup.yml index 89c1922..416c6c2 100644 --- a/tasks/master-setup.yml +++ b/tasks/master-setup.yml @@ -30,8 +30,8 @@ - name: Configure Flannel networking. command: "{{ item }}" with_items: - - kubectl apply -f https://raw.githubusercontent.com/coreos/flannel/master/Documentation/k8s-manifests/kube-flannel-rbac.yml - - kubectl apply -f https://raw.githubusercontent.com/coreos/flannel/master/Documentation/kube-flannel.yml + - kubectl apply -f {{ kubernetes_flannel_manifest_file_rbac }} + - kubectl apply -f {{ kubernetes_flannel_manifest_file }} register: flannel_result changed_when: "'created' in flannel_result.stdout"