From 59ff7955549b36252c9dce5b1950f42c1b9cf7e4 Mon Sep 17 00:00:00 2001 From: gjmzj Date: Mon, 23 Jul 2018 22:00:06 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=BF=AE=E6=94=B9.gitignore=EF=BC=8C?= =?UTF-8?q?=E6=96=B9=E4=BE=BF=E8=87=AA=E5=AE=9A=E4=B9=89=E5=8F=82=E6=95=B0?= =?UTF-8?q?=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 12 ++++++++++++ roles/cluster-addon/defaults/main.yml | 5 +++++ roles/cluster-addon/vars/main.yml | 6 ------ 3 files changed, 17 insertions(+), 6 deletions(-) delete mode 100644 roles/cluster-addon/vars/main.yml diff --git a/.gitignore b/.gitignore index 8014359..0e1a7b1 100644 --- a/.gitignore +++ b/.gitignore @@ -1,10 +1,22 @@ down/* !down/download.sh !down/offline_images + +# k8s binaries directory bin/* !bin/readme.md + +# kube-dns controller manifests/kubedns/kubedns.yaml manifests/coredns/coredns.yaml + +# ansible hosts hosts + +# k8s backup directory roles/cluster-backup/files/* !roles/cluster-backup/files/readme.md + +# roles/xxx/vars, exclude roles/os-harden/vars/ +vars/* +!/roles/os-harden/vars/ diff --git a/roles/cluster-addon/defaults/main.yml b/roles/cluster-addon/defaults/main.yml index a8ffe85..f4e1e1c 100644 --- a/roles/cluster-addon/defaults/main.yml +++ b/roles/cluster-addon/defaults/main.yml @@ -3,6 +3,11 @@ dns_install: "yes" dns_backend: "coredns" kubedns_offline: "kubedns_1.14.10.tar" coredns_offline: "coredns_1.1.3.tar" +dns_offline: "{%- if dns_backend == 'coredns' -%} \ + {{ coredns_offline }} \ + {%- else -%} \ + {{ kubedns_offline }} \ + {%- endif -%}" # metric server 自动安装 metricsserver_install: "yes" diff --git a/roles/cluster-addon/vars/main.yml b/roles/cluster-addon/vars/main.yml deleted file mode 100644 index 76d7617..0000000 --- a/roles/cluster-addon/vars/main.yml +++ /dev/null @@ -1,6 +0,0 @@ -dns_offline: "{%- if dns_backend == 'coredns' -%} \ - {{ coredns_offline }} \ - {%- else -%} \ - {{ kubedns_offline }} \ - {%- endif -%}" - From 099cd4adb384936fd703f5f660aac9caf47571f7 Mon Sep 17 00:00:00 2001 From: gjmzj Date: Mon, 23 Jul 2018 22:19:18 +0800 Subject: [PATCH 2/2] fix in .gitignore --- .gitignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 0e1a7b1..be486dc 100644 --- a/.gitignore +++ b/.gitignore @@ -18,5 +18,5 @@ roles/cluster-backup/files/* !roles/cluster-backup/files/readme.md # roles/xxx/vars, exclude roles/os-harden/vars/ -vars/* +/roles/*/vars/* !/roles/os-harden/vars/