diff options
-rw-r--r-- | inventory/byo/hosts.example | 8 | ||||
-rw-r--r-- | roles/openshift_master/tasks/main.yml | 5 | ||||
-rw-r--r-- | roles/openshift_master/templates/master.yaml.v1.j2 | 11 | ||||
-rw-r--r-- | roles/openshift_master/templates/v1_partials/projectConfig.j2 | 1 |
4 files changed, 19 insertions, 6 deletions
diff --git a/inventory/byo/hosts.example b/inventory/byo/hosts.example index 646790c42..b7ad231d7 100644 --- a/inventory/byo/hosts.example +++ b/inventory/byo/hosts.example @@ -38,6 +38,14 @@ openshift_master_identity_providers=[{'name': 'htpasswd_auth', 'login': 'true', # Allow all auth #openshift_master_identity_providers=[{'name': 'allow_all', 'login': 'true', 'challenge': 'true', 'kind': 'AllowAllPasswordIdentityProvider'}] +# Project Configuration +#osm_default_node_selector='' +#osm_project_request_message='' +#osm_project_request_template='' +#osm_mcs_allocator_range='s0:/2' +#osm_mcs_labels_per_project=5 +#osm_uid_allocator_range='1000000000-1999999999/10000' + # master cluster ha variables using pacemaker or RHEL HA #openshift_master_cluster_password=openshift_cluster #openshift_master_cluster_vip=192.168.133.25 diff --git a/roles/openshift_master/tasks/main.yml b/roles/openshift_master/tasks/main.yml index 3ee21b902..8ecc553cd 100644 --- a/roles/openshift_master/tasks/main.yml +++ b/roles/openshift_master/tasks/main.yml @@ -56,6 +56,11 @@ default_subdomain: "{{ osm_default_subdomain | default(None) }}" custom_cors_origins: "{{ osm_custom_cors_origins | default(None) }}" default_node_selector: "{{ osm_default_node_selector | default(None) }}" + project_request_message: "{{ osm_project_request_message | default(None) }}" + project_request_template: "{{ osm_project_request_template | default(None) }}" + mcs_allocator_range: "{{ osm_mcs_allocator_range | default(None) }}" + mcs_labels_per_project: "{{ osm_mcs_labels_per_project | default(None) }}" + uid_allocator_range: "{{ osm_uid_allocator_range | default(None) }}" api_server_args: "{{ osm_api_server_args | default(None) }}" controller_args: "{{ osm_controller_args | default(None) }}" diff --git a/roles/openshift_master/templates/master.yaml.v1.j2 b/roles/openshift_master/templates/master.yaml.v1.j2 index 44567aa22..b738084c0 100644 --- a/roles/openshift_master/templates/master.yaml.v1.j2 +++ b/roles/openshift_master/templates/master.yaml.v1.j2 @@ -99,15 +99,14 @@ policyConfig: bootstrapPolicyFile: {{ openshift_master_policy }} openshiftInfrastructureNamespace: openshift-infra openshiftSharedResourcesNamespace: openshift -{# TODO: Allow users to override projectConfig items #} projectConfig: defaultNodeSelector: "{{ openshift.master.default_node_selector | default("") }}" - projectRequestMessage: "" - projectRequestTemplate: "" + projectRequestMessage: "{{ openshift.master.project_request_message | default("") }}" + projectRequestTemplate: "{{ openshift.master.project_request_template | default("") }}" securityAllocator: - mcsAllocatorRange: s0:/2 - mcsLabelsPerProject: 5 - uidAllocatorRange: 1000000000-1999999999/10000 + mcsAllocatorRange: "{{ openshift.master.project_request_template | default("s0:/2") }}" + mcsLabelsPerProject: "{{ openshift.master.mcs_labels_per_project | default("5") }}" + uidAllocatorRange: "{{ openshift.master.uid_allocator_range | default("1000000000-1999999999/10000") }}" routingConfig: subdomain: "{{ openshift.master.default_subdomain | default("") }}" serviceAccountConfig: diff --git a/roles/openshift_master/templates/v1_partials/projectConfig.j2 b/roles/openshift_master/templates/v1_partials/projectConfig.j2 new file mode 100644 index 000000000..55170e406 --- /dev/null +++ b/roles/openshift_master/templates/v1_partials/projectConfig.j2 @@ -0,0 +1 @@ +{{ openshift.master.project_config[0] | to_nice_yaml }} |