瀏覽代碼

Revert "Remove several unused vars"

Scott Dodson 6 年之前
父節點
當前提交
80f0245f3d

+ 1 - 0
playbooks/openshift-master/private/config.yml

@@ -138,6 +138,7 @@
   roles:
   - role: openshift_manage_node
     openshift_master_host: "{{ groups.oo_first_master.0 }}"
+    openshift_manage_node_is_master: "{{ ('oo_masters_to_config' in group_names) | bool }}"
     openshift_node_master_api_url: "{{ hostvars[groups.oo_first_master.0].openshift.master.api_url }}"
 
 - name: Master Install Checkpoint End

+ 1 - 0
playbooks/openshift-master/private/upgrade.yml

@@ -255,3 +255,4 @@
       tasks_from: config.yml
     vars:
       openshift_master_host: "{{ groups.oo_first_master.0 }}"
+      openshift_manage_node_is_master: true

+ 1 - 0
playbooks/openshift-node/private/join.yml

@@ -63,6 +63,7 @@
   roles:
   - role: openshift_manage_node
     openshift_master_host: "{{ groups.oo_first_master.0 }}"
+    openshift_manage_node_is_master: "{{ ('oo_masters_to_config' in group_names) | bool }}"
 
 - name: Node Join Checkpoint End
   hosts: all

+ 1 - 0
playbooks/openstack/sample-inventory/group_vars/all.yml

@@ -42,6 +42,7 @@ openshift_openstack_external_network_name: "public"
 
 #use_trunk_ports: True
 #os_sdn_network_plugin_name: cni
+#openshift_node_proxy_mode: userspace
 
 # # Kuryr needs to know the network or the subnet you will be taking Floating
 # IPs for the loadbalancer services from.

+ 6 - 0
roles/etcd/defaults/main.yaml

@@ -2,6 +2,8 @@
 r_etcd_common_backup_tag: ''
 r_etcd_common_backup_sufix_name: ''
 
+l_etcd_bootstrapped: '{{ openshift.node.bootstrapped }}'
+
 l_etcd_static_pod: "{{ (inventory_hostname in groups['oo_masters']) | bool }}"
 
 # runc, docker, static pod, host
@@ -56,6 +58,10 @@ etcd_ca_serial: "{{ etcd_ca_dir }}/serial"
 etcd_ca_crl_number: "{{ etcd_ca_dir }}/crlnumber"
 etcd_ca_default_days: 1825
 
+r_etcd_common_master_peer_cert_file: /etc/origin/master/master.etcd-client.crt
+r_etcd_common_master_peer_key_file: /etc/origin/master/master.etcd-client.key
+r_etcd_common_master_peer_ca_file: /etc/origin/master/master.etcd-ca.crt
+
 # etcd server & certificate vars
 etcd_hostname: "{{ openshift.common.hostname }}"
 etcd_ip: "{{ openshift.common.ip }}"

+ 17 - 0
roles/openshift_control_plane/defaults/main.yml

@@ -1,4 +1,7 @@
 ---
+# openshift_master_defaults_in_use is a workaround to detect if we are consuming
+# the plays from the role or outside of the role.
+openshift_master_defaults_in_use: True
 openshift_master_debug_level: "{{ debug_level | default(2) }}"
 
 r_openshift_master_firewall_enabled: "{{ os_firewall_enabled | default(True) }}"
@@ -20,6 +23,13 @@ l_osm_id_providers_dict:
 
 openshift_master_identity_providers: "{{ l_osm_id_providers_dict[openshift_deployment_type] }}"
 
+l_osm_disabled_features: "{{ openshift_deployment_subtype == 'registry' | bool }}"
+l_osm_disabled_features_list:
+- Builder
+- S2IBuilder
+- WebConsole
+
+
 openshift_master_dns_port: 8053
 osm_project_request_template: ''
 osm_mcs_allocator_range: 's0:/2'
@@ -28,6 +38,8 @@ osm_uid_allocator_range: '1000000000-1999999999/10000'
 osm_project_request_message: ''
 
 openshift_node_ips: []
+r_openshift_master_clean_install: false
+r_openshift_master_os_firewall_enable: true
 r_openshift_master_os_firewall_deny: []
 default_r_openshift_master_os_firewall_allow:
 - service: api server https
@@ -42,6 +54,9 @@ r_openshift_master_os_firewall_allow: "{{ default_r_openshift_master_os_firewall
 
 oreg_auth_credentials_path: "{{ r_openshift_master_data_dir }}/.docker"
 
+containerized_svc_dir: "/usr/lib/systemd/system"
+ha_svc_template_path: "native-cluster"
+
 openshift_docker_service_name: "docker"
 
 openshift_master_loopback_config: "/etc/origin/master/openshift-master.kubeconfig"
@@ -63,6 +78,8 @@ openshift_master_valid_grant_methods:
 - prompt
 - deny
 
+openshift_master_is_scaleup_host: False
+
 # openshift_master_oauth_template is deprecated.  Should be added to deprecations
 # and removed.
 openshift_master_oauth_template: False

+ 1 - 0
roles/openshift_docker_gc/defaults/main.yml

@@ -1,4 +1,5 @@
 ---
+r_enable_docker_gc: "{{ openshift_crio_enable_docker_gc }}"
 r_docker_gc_node_selectors: "{{ openshift_crio_docker_gc_node_selector | default({'runtime': 'cri-o'}) }}"
 
 openshift_docker_gc_image_dict:

+ 3 - 0
roles/openshift_examples/defaults/main.yml

@@ -20,6 +20,9 @@ db_templates_base: "{{ examples_base }}/db-templates"
 xpaas_image_streams: "{{ examples_base }}/xpaas-streams/"
 xpaas_templates_base: "{{ examples_base }}/xpaas-templates"
 quickstarts_base: "{{ examples_base }}/quickstart-templates"
+infrastructure_origin_base: "{{ examples_base }}/infrastructure-templates/origin"
+infrastructure_enterprise_base: "{{ examples_base }}/infrastructure-templates/enterprise"
+cockpit_ui_base: "{{ examples_base }}/infrastructure-templates/enterprise"
 
 openshift_examples_import_command: "create"
 registry_host: "{{ openshift_examples_registryurl.split('/')[0] if '.' in openshift_examples_registryurl.split('/')[0] else '' }}"

+ 4 - 0
roles/openshift_expand_partition/defaults/main.yml

@@ -7,6 +7,10 @@ oep_drive: "/dev/xvda"
 # Partition that we wish to expand.
 oep_partition: 3
 
+# oep_partition_mount_point
+# Where the partition is mounted
+oep_partition_mount_point: /var
+
 # oep_file_system
 # What file system is on the partition
 #   Currently only xfs, and ext(2,3,4) are supported

+ 4 - 1
roles/openshift_facts/defaults/main.yml

@@ -30,6 +30,7 @@ l_os_registry_url: "{{ oreg_url | default(l_osm_registry_url_default) | regex_re
 openshift_image_default: "{{ l_os_registry_url | regex_replace('${component}' | regex_escape, 'node') }}"
 # not sure why this one is more complicated than other images
 openshift_cli_image: "{{ (system_images_registry == 'docker') | ternary(openshift_image_default, (openshift_image_default.split('/')|length==2) | ternary(system_images_registry + '/' + openshift_image_default, openshift_image_default)) }}"
+system_openshift_cli_image: "{{ (system_images_registry == 'docker') | ternary('docker:' + openshift_cli_image, openshift_cli_image) }}"
 osn_image: "{{ l_os_registry_url | regex_replace('${component}' | regex_escape, 'node') }}"
 osm_image: "{{ l_osm_registry_url | regex_replace('${component}' | regex_escape, 'control-plane') }}"
 
@@ -40,7 +41,9 @@ openshift_use_crio: False
 openshift_use_crio_only: False
 openshift_crio_enable_docker_gc: True
 
-openshift_master_default_subdomain: "router.default.svc.cluster.local"
+# osm_default_subdomain is an old migrated fact, can probably be removed.
+osm_default_subdomain: "router.default.svc.cluster.local"
+openshift_master_default_subdomain: "{{ osm_default_subdomain }}"
 
 openshift_portal_net: "{{ openshift_master_portal_net | default(None) }}"
 openshift_cluster_network_cidr: "{{ osm_cluster_network_cidr | default('10.128.0.0/14') }}"

+ 6 - 1
roles/openshift_hosted/defaults/main.yml

@@ -3,6 +3,8 @@
 # Common #
 ##########
 openshift_hosted_infra_selector: "node-role.kubernetes.io/infra=true"
+r_openshift_hosted_use_calico_default: "{{ openshift_use_calico | default(False) }}"
+r_openshift_hosted_use_calico: "{{ r_openshift_hosted_use_calico_default }}"
 
 openshift_default_projects:
   default:
@@ -85,7 +87,7 @@ r_openshift_hosted_registry_os_firewall_deny: []
 r_openshift_hosted_registry_os_firewall_allow:
 - service: Docker Registry Port
   port: 5000/tcp
-  cond: "{{ openshift_use_calico | default(False) }}"
+  cond: "{{ r_openshift_hosted_use_calico }}"
 
 openshift_hosted_registry_serviceaccount: registry
 openshift_hosted_registry_volumes: []
@@ -106,6 +108,9 @@ openshift_hosted_registry_edits:
 openshift_hosted_registry_force:
 - False
 
+# TODO: this flag should be removed when master bootstrapping is enforced
+openshift_push_via_dns: True
+
 # NOTE: settting openshift_docker_hosted_registry_insecure may affect other roles
 openshift_hosted_docker_registry_insecure_default: "{{ openshift_docker_hosted_registry_insecure | default(False) }}"
 openshift_hosted_docker_registry_insecure: "{{ openshift_hosted_docker_registry_insecure_default }}"

File diff suppressed because it is too large
+ 10 - 0
roles/openshift_hosted/tasks/registry.yml


+ 4 - 0
roles/openshift_manage_node/defaults/main.yml

@@ -1 +1,5 @@
 ---
+# openshift_manage_node_is_master is set at the play level.
+openshift_manage_node_is_master: False
+openshift_master_node_labels:
+  node-role.kubernetes.io/master: 'true'

+ 30 - 1
roles/openshift_node/defaults/main.yml

@@ -6,6 +6,8 @@ osn_storage_plugin_deps:
 - glusterfs
 - iscsi
 openshift_node_local_quota_per_fsgroup: ""
+openshift_node_proxy_mode: iptables
+openshift_set_node_ip: False
 openshift_config_base: '/etc/origin'
 
 
@@ -128,7 +130,7 @@ default_r_openshift_node_os_firewall_allow:
   cond: openshift_use_openshift_sdn | bool
 - service: Calico BGP Port
   port: 179/tcp
-  cond: "{{ openshift_use_calico | default(False) }}"
+  cond: "{{ openshift_node_use_calico }}"
 - service: Kubernetes service NodePort TCP
   port: "{{ openshift_node_port_range | default('') }}/tcp"
   cond: "{{ openshift_node_port_range is defined }}"
@@ -166,10 +168,37 @@ journald_vars_to_replace:
 - { var: ForwardToSyslog, val: no }
 - { var: ForwardToWall, val: no }
 
+# NOTE
+# r_openshift_node_*_default may be defined external to this role.
+# openshift_use_*, if defined, may affect other roles or play behavior.
+openshift_node_use_openshift_sdn_default: "{{ openshift_use_openshift_sdn | default(True) }}"
+openshift_node_use_openshift_sdn: "{{ openshift_node_use_openshift_sdn_default }}"
+
+openshift_node_sdn_network_plugin_name_default: "{{ os_sdn_network_plugin_name }}"
+openshift_node_sdn_network_plugin_name: "{{ openshift_node_sdn_network_plugin_name_default }}"
+
+openshift_node_use_calico_default: "{{ openshift_use_calico | default(False) }}"
+openshift_node_use_calico: "{{ openshift_node_use_calico_default }}"
+
+openshift_node_use_nuage_default: "{{ openshift_use_nuage | default(False) }}"
+openshift_node_use_nuage: "{{ openshift_node_use_nuage_default }}"
+
+openshift_node_use_contiv_default: "{{ openshift_use_contiv | default(False) }}"
+openshift_node_use_contiv: "{{ openshift_node_use_contiv_default }}"
+
+openshift_node_use_kuryr_default: "{{ openshift_use_kuryr | default(False) }}"
+openshift_node_use_kuryr: "{{ openshift_node_use_kuryr_default }}"
+
 openshift_node_data_dir_default: "{{ openshift_data_dir | default('/var/lib/origin') }}"
 openshift_node_data_dir: "{{ openshift_node_data_dir_default }}"
 
 openshift_node_config_dir_default: "/etc/origin/node"
 openshift_node_config_dir: "{{ openshift_node_config_dir_default }}"
 
+openshift_node_image_config_latest_default: "{{ openshift_image_config_latest | default(False) }}"
+openshift_node_image_config_latest: "{{ openshift_node_image_config_latest_default }}"
+
+
 openshift_node_use_instance_profiles: False
+
+openshift_node_use_persistentlocalvolumes: "{{ openshift_persistentlocalstorage_enabled | default(False) | bool }}"