From 12e48297a651e66115de395970f803345d053e22 Mon Sep 17 00:00:00 2001
From: Liz Rice <liz@lizrice.com>
Date: Fri, 17 May 2019 14:21:42 +0100
Subject: [PATCH] Config file improvements

Correct defaults in main config.yaml file
Remove unnecessary overrides in version-specific config.yaml
---
 cfg/1.11/config.yaml     | 33 +--------------------------------
 cfg/1.13/config.yaml     | 33 +--------------------------------
 cfg/1.8/config.yaml      | 33 +--------------------------------
 cfg/config.yaml          | 24 +++++++++++++-----------
 cfg/ocp-3.10/config.yaml |  8 +-------
 5 files changed, 17 insertions(+), 114 deletions(-)

diff --git a/cfg/1.11/config.yaml b/cfg/1.11/config.yaml
index d6bd9bc..b783945 100644
--- a/cfg/1.11/config.yaml
+++ b/cfg/1.11/config.yaml
@@ -1,33 +1,2 @@
 ---
-## Controls Files.
-# These are YAML files that hold all the details for running checks.
-#
-## Uncomment to use different control file paths.
-# masterControls: ./cfg/master.yaml
-# nodeControls: ./cfg/node.yaml
-# federatedControls: ./cfg/federated.yaml
-
-master:
-  apiserver:
-    confs:
-      - /etc/kubernetes/manifests/kube-apiserver.yaml
-      - /etc/kubernetes/manifests/kube-apiserver.manifest
-    defaultconf: /etc/kubernetes/manifests/kube-apiserver.yaml
-
-  scheduler:
-    confs:
-      - /etc/kubernetes/manifests/kube-scheduler.yaml
-      - /etc/kubernetes/manifests/kube-scheduler.manifest
-    defaultconf: /etc/kubernetes/manifests/kube-scheduler.yaml
-
-  controllermanager:
-    confs:
-      - /etc/kubernetes/manifests/kube-controller-manager.yaml
-      - /etc/kubernetes/manifests/kube-controller-manager.manifest
-    defaultconf: /etc/kubernetes/manifests/kube-controller-manager.yaml
-
-  etcd:
-    confs:
-      - /etc/kubernetes/manifests/etcd.yaml
-      - /etc/kubernetes/manifests/etcd.manifest
-    defaultconf: /etc/kubernetes/manifests/etcd.yaml
+## Version-specific settings that override the values in cfg/config.yaml
diff --git a/cfg/1.13/config.yaml b/cfg/1.13/config.yaml
index 7093d50..4d9b1b8 100644
--- a/cfg/1.13/config.yaml
+++ b/cfg/1.13/config.yaml
@@ -1,33 +1,2 @@
 ---
-## Controls Files.
-# These are YAML files that hold all the details for running checks.
-#
-## Uncomment to use different control file paths.
-# masterControls: ./cfg/master.yaml
-# nodeControls: ./cfg/node.yaml
-# federatedControls: ./cfg/federated.yaml
-
-master:
-  apiserver:
-    confs:
-      - /etc/kubernetes/manifests/kube-apiserver.yaml
-      - /etc/kubernetes/manifests/kube-apiserver.manifest
-    defaultconf: /etc/kubernetes/manifests/kube-apiserver.yaml
-
-  scheduler:
-    confs:
-      - /etc/kubernetes/manifests/kube-scheduler.yaml
-      - /etc/kubernetes/manifests/kube-scheduler.manifest
-    defaultconf: /etc/kubernetes/manifests/kube-scheduler.yaml
-
-  controllermanager:
-    confs:
-      - /etc/kubernetes/manifests/kube-controller-manager.yaml
-      - /etc/kubernetes/manifests/kube-controller-manager.manifest
-    defaultconf: /etc/kubernetes/manifests/kube-controller-manager.yaml
-
-  etcd:
-    confs:
-      - /etc/kubernetes/manifests/etcd.yaml
-      - /etc/kubernetes/manifests/etcd.manifest
-    defaultconf: /etc/kubernetes/manifests/etcd.yaml
+## Version-specific settings that override the values in cfg/config.yaml
\ No newline at end of file
diff --git a/cfg/1.8/config.yaml b/cfg/1.8/config.yaml
index 9dc66a5..b783945 100644
--- a/cfg/1.8/config.yaml
+++ b/cfg/1.8/config.yaml
@@ -1,33 +1,2 @@
 ---
-## Controls Files. 
-# These are YAML files that hold all the details for running checks.
-#
-## Uncomment to use different control file paths.
-# masterControls: ./cfg/master.yaml
-# nodeControls: ./cfg/node.yaml
-# federatedControls: ./cfg/federated.yaml
-
-master:
-  apiserver:
-    confs:
-      - /etc/kubernetes/manifests/kube-apiserver.yaml
-      - /etc/kubernetes/manifests/kube-apiserver.manifest
-    defaultconf: /etc/kubernetes/manifests/kube-apiserver.yaml
-
-  scheduler:
-    confs: 
-      - /etc/kubernetes/manifests/kube-scheduler.yaml
-      - /etc/kubernetes/manifests/kube-scheduler.manifest
-    defaultconf: /etc/kubernetes/manifests/kube-scheduler.yaml
-
-  controllermanager:
-    confs:
-      - /etc/kubernetes/manifests/kube-controller-manager.yaml
-      - /etc/kubernetes/manifests/kube-controller-manager.manifest
-    defaultconf: /etc/kubernetes/manifests/kube-controller-manager.yaml
-
-  etcd:
-    confs:
-      - /etc/kubernetes/manifests/etcd.yaml
-      - /etc/kubernetes/manifests/etcd.manifest
-    defaultconf: /etc/kubernetes/manifests/etcd.yaml
+## Version-specific settings that override the values in cfg/config.yaml
diff --git a/cfg/config.yaml b/cfg/config.yaml
index 1c86219..912ca89 100644
--- a/cfg/config.yaml
+++ b/cfg/config.yaml
@@ -27,9 +27,9 @@ master:
       - "hyperkube kube-apiserver"
       - "apiserver"
     confs:
-      - /etc/kubernetes/apiserver.conf
-      - /etc/kubernetes/apiserver
-    defaultconf: /etc/kubernetes/apiserver
+      - /etc/kubernetes/manifests/kube-apiserver.yaml
+      - /etc/kubernetes/manifests/kube-apiserver.manifest
+    defaultconf: /etc/kubernetes/manifests/kube-apiserver.yaml
 
   scheduler:
     bins:
@@ -37,10 +37,10 @@ master:
       - "hyperkube scheduler"
       - "hyperkube kube-scheduler"
       - "scheduler"
-    confs: 
-      - /etc/kubernetes/scheduler.conf
-      - /etc/kubernetes/scheduler
-    defaultconf: /etc/kubernetes/scheduler
+    confs:
+      - /etc/kubernetes/manifests/kube-scheduler.yaml
+      - /etc/kubernetes/manifests/kube-scheduler.manifest
+    defaultconf: /etc/kubernetes/manifests/kube-scheduler.yaml
 
   controllermanager:
     bins:
@@ -49,17 +49,19 @@ master:
       - "hyperkube kube-controller-manager"
       - "controller-manager"
     confs:
-      - /etc/kubernetes/controller-manager.conf
-      - /etc/kubernetes/controller-manager
-    defaultconf: /etc/kubernetes/controller-manager
+      - /etc/kubernetes/manifests/kube-controller-manager.yaml
+      - /etc/kubernetes/manifests/kube-controller-manager.manifest
+    defaultconf: /etc/kubernetes/manifests/kube-controller-manager.yaml
 
   etcd:
     optional: true
     bins:
       - "etcd"
     confs:
+      - /etc/kubernetes/manifests/etcd.yaml
+      - /etc/kubernetes/manifests/etcd.manifest
       - /etc/etcd/etcd.conf
-    defaultconf: /etc/etcd/etcd.conf
+    defaultconf: /etc/kubernetes/manifests/etcd.yaml
 
   flanneld:
     optional: true
diff --git a/cfg/ocp-3.10/config.yaml b/cfg/ocp-3.10/config.yaml
index 4b78264..c63b27b 100644
--- a/cfg/ocp-3.10/config.yaml
+++ b/cfg/ocp-3.10/config.yaml
@@ -1,11 +1,5 @@
 ---
-## Controls Files.
-# These are YAML files that hold all the details for running checks.
-#
-## Uncomment to use different control file paths.
-# masterControls: ./cfg/master.yaml
-# nodeControls: ./cfg/node.yaml
-# federatedControls: ./cfg/federated.yaml
+## Version-specific settings that override the values in cfg/config.yaml
 
 master:
   apiserver:
-- 
GitLab