Selaa lähdekoodia

Move controller args back to template

Also fix upgrade path
Hemant Kumar 6 vuotta sitten
vanhempi
commit
285513dd57

+ 12 - 0
roles/openshift_control_plane/tasks/upgrade.yml

@@ -80,3 +80,15 @@
     key: "kubernetesMasterConfig.apiServerArguments.runtime-config"
     value: "{{ runtime_config.result | join(',') | regex_replace('(?:,)*apis/settings\\.k8s\\.io/v1alpha1=true','') }}"
   when: runtime_config.result
+- name: Update controller-manager to have nfs recycler pod
+  yedit:
+    src: "{{ openshift.common.config_base }}/master/master-config.yaml"
+    key: "kubernetesMasterConfig.controllerArguments.pv-recycler-pod-template-filepath-nfs"
+    value: "/etc/origin/master/recycler_pod.yaml"
+    value_type: list
+- name: Update controller-manager to have hostpath recycler pod
+  yedit:
+    src: "{{ openshift.common.config_base }}/master/master-config.yaml"
+    key: "kubernetesMasterConfig.controllerArguments.pv-recycler-pod-template-filepath-hostpath"
+    value: "/etc/origin/master/recycler_pod.yaml"
+    value_type: list

+ 4 - 0
roles/openshift_control_plane/templates/master.yaml.v1.j2

@@ -83,6 +83,10 @@ kubernetesMasterConfig:
     - VolumeScheduling=true
 {% endif %}
   controllerArguments: {{ openshift.master.controller_args | default(None) | lib_utils_to_padded_yaml( level=2 ) }}
+    pv-recycler-pod-template-filepath-nfs:
+    - "/etc/origin/master/recycler_pod.yaml"
+    pv-recycler-pod-template-filepath-hostpath:
+    - "/etc/origin/master/recycler_pod.yaml"
 {% if openshift_is_atomic | bool %}
     flex-volume-plugin-dir:
     - "/etc/origin/kubelet-plugins/volume/exec"

+ 1 - 4
roles/openshift_facts/library/openshift_facts.py

@@ -608,10 +608,7 @@ def build_controller_args(facts):
     cloud_cfg_path = os.path.join(facts['common']['config_base'],
                                   'cloudprovider')
     if 'master' in facts:
-        controller_args = {
-            'pv-recycler-pod-template-filepath-nfs': ['/etc/origin/master/recycler_pod.yaml'],
-            'pv-recycler-pod-template-filepath-hostpath': ['/etc/origin/master/recycler_pod.yaml']
-        }
+        controller_args = {}
 
         if 'cloudprovider' in facts:
             if 'kind' in facts['cloudprovider']: