Browse Source

Adding node autoapprover.

Kenny Woodson 7 năm trước cách đây
mục cha
commit
740ad21187

+ 4 - 0
playbooks/common/openshift-cluster/upgrades/upgrade_control_plane.yml

@@ -63,6 +63,10 @@
       name: openshift_master
       tasks_from: upgrade.yml
 
+  - name: Setup and enable bootstrapping options
+    include_tasks: ../../../openshift-master/private/tasks/enable_bootstrap.yml
+    when: openshift_master_bootstrap_enabled | default(false) | bool
+
   # Run the upgrade hook prior to restarting services/system if defined:
   - debug: msg="Running master upgrade hook {{ openshift_master_upgrade_hook }}"
     when: openshift_master_upgrade_hook is defined

+ 4 - 0
playbooks/openshift-master/enable_bootstrap.yml

@@ -0,0 +1,4 @@
+---
+- import_playbook: ../init/main.yml
+
+- import_playbook: private/enable_bootstrap.yml

+ 2 - 4
playbooks/openshift-master/private/config.yml

@@ -207,11 +207,9 @@
       tasks_from: master
     when: openshift_use_kuryr | default(false) | bool
 
-  - name: Setup the node group config maps
-    import_role:
-      name: openshift_node_group
+  - name: setup bootstrap settings
+    include_tasks: tasks/enable_bootstrap.yml
     when: openshift_master_bootstrap_enabled | default(false) | bool
-    run_once: True
 
   post_tasks:
   - name: Create group for deployment type

+ 7 - 0
playbooks/openshift-master/private/enable_bootstrap.yml

@@ -0,0 +1,7 @@
+---
+- name: Enable bootstrapping for masters
+  hosts: oo_masters_to_config
+  gather_facts: no
+  tasks:
+  - name: include bootstrapping tasks
+    include_tasks: tasks/enable_bootstrap.yml

+ 20 - 0
playbooks/openshift-master/private/tasks/enable_bootstrap.yml

@@ -0,0 +1,20 @@
+---
+- name: Setup the master bootstrap settings
+  import_role:
+    name: openshift_master
+    tasks_from: bootstrap_settings.yml
+
+- name: Setup the bootstrap kubeconfig
+  import_role:
+    name: openshift_master
+    tasks_from: bootstrap.yml
+
+- name: Setup the node group config maps
+  import_role:
+    name: openshift_node_group
+  run_once: True
+
+- name: Setup the node bootstrap auto approver
+  import_role:
+    name: openshift_bootstrap_autoapprover
+  run_once: True