diff options
Diffstat (limited to 'roles')
14 files changed, 65 insertions, 23 deletions
diff --git a/roles/cockpit-ui/tasks/main.yml b/roles/cockpit-ui/tasks/main.yml index 09f4259a2..f60912033 100644 --- a/roles/cockpit-ui/tasks/main.yml +++ b/roles/cockpit-ui/tasks/main.yml @@ -41,6 +41,7 @@      command: >        {{ openshift.common.client_binary }} new-app --template=registry-console        {% if openshift_cockpit_deployer_prefix is defined  %}-p IMAGE_PREFIX="{{ openshift_cockpit_deployer_prefix }}"{% endif %} +      {% if openshift_cockpit_deployer_basename is defined  %}-p IMAGE_BASENAME="{{ openshift_cockpit_deployer_basename }}"{% endif %}        {% if openshift_cockpit_deployer_version is defined  %}-p IMAGE_VERSION="{{ openshift_cockpit_deployer_version }}"{% endif %}        -p OPENSHIFT_OAUTH_PROVIDER_URL="{{ openshift.master.public_api_url }}"        -p REGISTRY_HOST="{{ docker_registry_route.results[0].spec.host }}" diff --git a/roles/kuryr/README.md b/roles/kuryr/README.md index 7b618f902..269788a11 100644 --- a/roles/kuryr/README.md +++ b/roles/kuryr/README.md @@ -31,6 +31,11 @@ pods. This allows to have interconnectivity between pods and OpenStack VMs.  * ``kuryr_openstack_pod_service_id=service_subnet_uuid``  * ``kuryr_openstack_pod_project_id=pod_project_uuid``  * ``kuryr_openstack_worker_nodes_subnet_id=worker_nodes_subnet_uuid`` +* ``kuryr_openstack_enable_pools=True`` +* ``kuryr_openstack_pool_max=0`` +* ``kuryr_openstack_pool_min=1`` +* ``kuryr_openstack_pool_batch=5`` +* ``kuryr_openstack_pool_update_frequency=20``  ## Kuryr resources diff --git a/roles/kuryr/templates/configmap.yaml.j2 b/roles/kuryr/templates/configmap.yaml.j2 index e874d6c25..6bf6c1db2 100644 --- a/roles/kuryr/templates/configmap.yaml.j2 +++ b/roles/kuryr/templates/configmap.yaml.j2 @@ -161,6 +161,14 @@ data:      # The driver that provides VIFs for Kubernetes Pods. (string value)      pod_vif_driver = nested-vlan +    # The driver that manages VIFs pools for Kubernetes Pods (string value) +    vif_pool_driver = {{ kuryr_openstack_enable_pools | default(False) | ternary('nested', 'noop') }} + +    [vif_pool] +    ports_pool_max = {{ kuryr_openstack_pool_max | default(0) }} +    ports_pool_min = {{ kuryr_openstack_pool_min | default(1) }} +    ports_pool_batch = {{ kuryr_openstack_pool_batch | default(5) }} +    ports_pool_update_frequency = {{ kuryr_openstack_pool_update_frequency | default(20) }}      [neutron]      # Configuration options for OpenStack Neutron diff --git a/roles/openshift_health_checker/openshift_checks/docker_image_availability.py b/roles/openshift_health_checker/openshift_checks/docker_image_availability.py index 587c6f85c..4f91f6bb3 100644 --- a/roles/openshift_health_checker/openshift_checks/docker_image_availability.py +++ b/roles/openshift_health_checker/openshift_checks/docker_image_availability.py @@ -12,15 +12,15 @@ DEPLOYMENT_IMAGE_INFO = {      "origin": {          "namespace": "openshift",          "name": "origin", -        "registry_console_template": "${prefix}kubernetes:${version}",          "registry_console_prefix": "cockpit/", +        "registry_console_basename": "kubernetes",          "registry_console_default_version": "latest",      },      "openshift-enterprise": {          "namespace": "openshift3",          "name": "ose", -        "registry_console_template": "${prefix}registry-console:${version}", -        "registry_console_prefix": "registry.access.redhat.com/openshift3/", +        "registry_console_prefix": "openshift3/", +        "registry_console_basename": "registry-console",          "registry_console_default_version": "${short_version}",      },  } @@ -156,7 +156,8 @@ class DockerImageAvailability(DockerHostMixin, OpenShiftCheck):          if 'oo_nodes_to_config' in host_groups:              for suffix in NODE_IMAGE_SUFFIXES:                  required.add(image_url.replace("${component}", suffix).replace("${version}", image_tag)) -            required.add(self._registry_console_image(image_tag, image_info)) +            if self.get_var("osm_use_cockpit", default=True, convert=bool): +                required.add(self._registry_console_image(image_tag, image_info))          # images for containerized components          if self.get_var("openshift", "common", "is_containerized"): @@ -180,6 +181,10 @@ class DockerImageAvailability(DockerHostMixin, OpenShiftCheck):              "openshift_cockpit_deployer_prefix",              default=image_info["registry_console_prefix"],          ) +        basename = self.get_var( +            "openshift_cockpit_deployer_basename", +            default=image_info["registry_console_basename"], +        )          # enterprise template just uses v3.6, v3.7, etc          match = re.match(r'v\d+\.\d+', image_tag) @@ -187,8 +192,7 @@ class DockerImageAvailability(DockerHostMixin, OpenShiftCheck):          version = image_info["registry_console_default_version"].replace("${short_version}", short_version)          version = self.get_var("openshift_cockpit_deployer_version", default=version) -        template = image_info["registry_console_template"] -        return template.replace('${prefix}', prefix).replace('${version}', version) +        return prefix + basename + ':' + version      def local_images(self, images):          """Filter a list of images and return those available locally.""" diff --git a/roles/openshift_health_checker/test/docker_image_availability_test.py b/roles/openshift_health_checker/test/docker_image_availability_test.py index 484aa72e0..ec46c3b4b 100644 --- a/roles/openshift_health_checker/test/docker_image_availability_test.py +++ b/roles/openshift_health_checker/test/docker_image_availability_test.py @@ -217,7 +217,7 @@ def test_registry_availability(image, registries, connection_test_failed, skopeo              'foo.io/openshift3/ose-docker-registry:f13ac45',              'foo.io/openshift3/ose-haproxy-router:f13ac45',              # registry-console is not constructed/versioned the same as the others. -            'registry.access.redhat.com/openshift3/registry-console:vtest', +            'openshift3/registry-console:vtest',              # containerized images aren't built from oreg_url              'openshift3/node:vtest',              'openshift3/openvswitch:vtest', @@ -261,7 +261,7 @@ def test_required_images(deployment_type, is_containerized, groups, oreg_url, ex              openshift_deployment_type="openshift-enterprise",              openshift_image_tag="vtest",          ), -        "registry.access.redhat.com/openshift3/registry-console:vtest", +        "openshift3/registry-console:vtest",      ), (          dict(              openshift_deployment_type="openshift-enterprise", diff --git a/roles/openshift_hosted_templates/files/v3.6/enterprise/registry-console.yaml b/roles/openshift_hosted_templates/files/v3.6/enterprise/registry-console.yaml index f821efd6b..cc3159a32 100644 --- a/roles/openshift_hosted_templates/files/v3.6/enterprise/registry-console.yaml +++ b/roles/openshift_hosted_templates/files/v3.6/enterprise/registry-console.yaml @@ -27,7 +27,7 @@ objects:          spec:            containers:              - name: registry-console -              image: ${IMAGE_PREFIX}registry-console:${IMAGE_VERSION} +              image: ${IMAGE_PREFIX}${IMAGE_BASENAME}:${IMAGE_VERSION}                ports:                  - containerPort: 9090                    protocol: TCP @@ -89,7 +89,7 @@ objects:          - annotations: null            from:              kind: DockerImage -            name: ${IMAGE_PREFIX}registry-console:${IMAGE_VERSION} +            name: ${IMAGE_PREFIX}${IMAGE_BASENAME}:${IMAGE_VERSION}            name: ${IMAGE_VERSION}    - kind: OAuthClient      apiVersion: v1 @@ -102,7 +102,10 @@ objects:  parameters:    - description: 'Specify "registry/repository" prefix for container image; e.g. for "registry.access.redhat.com/openshift3/registry-console:latest", set prefix "registry.access.redhat.com/openshift3/"'      name: IMAGE_PREFIX -    value: "registry.access.redhat.com/openshift3/" +    value: "openshift3/" +  - description: 'Specify component name for container image; e.g. for "registry.access.redhat.com/openshift3/registry-console:latest", use base name "registry-console"' +    name: IMAGE_BASENAME +    value: "registry-console"    - description: 'Specify image version; e.g. for "registry.access.redhat.com/openshift3/registry-console:v3.6", set version "v3.6"'      name: IMAGE_VERSION      value: "v3.6" diff --git a/roles/openshift_hosted_templates/files/v3.6/origin/registry-console.yaml b/roles/openshift_hosted_templates/files/v3.6/origin/registry-console.yaml index a78146ca4..a75340eb7 100644 --- a/roles/openshift_hosted_templates/files/v3.6/origin/registry-console.yaml +++ b/roles/openshift_hosted_templates/files/v3.6/origin/registry-console.yaml @@ -27,7 +27,7 @@ objects:          spec:            containers:              - name: registry-console -              image: ${IMAGE_PREFIX}kubernetes:${IMAGE_VERSION} +              image: ${IMAGE_PREFIX}${IMAGE_BASENAME}:${IMAGE_VERSION}                ports:                  - containerPort: 9090                    protocol: TCP @@ -89,7 +89,7 @@ objects:          - annotations: null            from:              kind: DockerImage -            name: ${IMAGE_PREFIX}kubernetes:${IMAGE_VERSION} +            name: ${IMAGE_PREFIX}${IMAGE_BASENAME}:${IMAGE_VERSION}            name: ${IMAGE_VERSION}    - kind: OAuthClient      apiVersion: v1 @@ -103,6 +103,9 @@ parameters:    - description: 'Specify "registry/namespace" prefix for container image; e.g. for "registry.example.com/cockpit/kubernetes:latest", set prefix "registry.example.com/cockpit/"'      name: IMAGE_PREFIX      value: "cockpit/" +  - description: 'Specify component name for container image; e.g. for "registry.example.com/cockpit/kubernetes:latest", use base name "kubernetes"' +    name: IMAGE_BASENAME +    value: "kubernetes"    - description: 'Specify image version; e.g. for "cockpit/kubernetes:latest", set version "latest"'      name: IMAGE_VERSION      value: latest diff --git a/roles/openshift_hosted_templates/files/v3.7/enterprise/registry-console.yaml b/roles/openshift_hosted_templates/files/v3.7/enterprise/registry-console.yaml index 019d836fe..9f2e6125d 100644 --- a/roles/openshift_hosted_templates/files/v3.7/enterprise/registry-console.yaml +++ b/roles/openshift_hosted_templates/files/v3.7/enterprise/registry-console.yaml @@ -27,7 +27,7 @@ objects:          spec:            containers:              - name: registry-console -              image: ${IMAGE_PREFIX}registry-console:${IMAGE_VERSION} +              image: ${IMAGE_PREFIX}${IMAGE_BASENAME}:${IMAGE_VERSION}                ports:                  - containerPort: 9090                    protocol: TCP @@ -89,7 +89,7 @@ objects:          - annotations: null            from:              kind: DockerImage -            name: ${IMAGE_PREFIX}registry-console:${IMAGE_VERSION} +            name: ${IMAGE_PREFIX}${IMAGE_BASENAME}:${IMAGE_VERSION}            name: ${IMAGE_VERSION}    - kind: OAuthClient      apiVersion: v1 @@ -102,7 +102,10 @@ objects:  parameters:    - description: 'Specify "registry/repository" prefix for container image; e.g. for "registry.access.redhat.com/openshift3/registry-console:latest", set prefix "registry.access.redhat.com/openshift3/"'      name: IMAGE_PREFIX -    value: "registry.access.redhat.com/openshift3/" +    value: "openshift3/" +  - description: 'Specify component name for container image; e.g. for "registry.access.redhat.com/openshift3/registry-console:latest", use base name "registry-console"' +    name: IMAGE_BASENAME +    value: "registry-console"    - description: 'Specify image version; e.g. for "registry.access.redhat.com/openshift3/registry-console:v3.7", set version "v3.7"'      name: IMAGE_VERSION      value: "v3.7" diff --git a/roles/openshift_hosted_templates/files/v3.7/origin/registry-console.yaml b/roles/openshift_hosted_templates/files/v3.7/origin/registry-console.yaml index a78146ca4..a75340eb7 100644 --- a/roles/openshift_hosted_templates/files/v3.7/origin/registry-console.yaml +++ b/roles/openshift_hosted_templates/files/v3.7/origin/registry-console.yaml @@ -27,7 +27,7 @@ objects:          spec:            containers:              - name: registry-console -              image: ${IMAGE_PREFIX}kubernetes:${IMAGE_VERSION} +              image: ${IMAGE_PREFIX}${IMAGE_BASENAME}:${IMAGE_VERSION}                ports:                  - containerPort: 9090                    protocol: TCP @@ -89,7 +89,7 @@ objects:          - annotations: null            from:              kind: DockerImage -            name: ${IMAGE_PREFIX}kubernetes:${IMAGE_VERSION} +            name: ${IMAGE_PREFIX}${IMAGE_BASENAME}:${IMAGE_VERSION}            name: ${IMAGE_VERSION}    - kind: OAuthClient      apiVersion: v1 @@ -103,6 +103,9 @@ parameters:    - description: 'Specify "registry/namespace" prefix for container image; e.g. for "registry.example.com/cockpit/kubernetes:latest", set prefix "registry.example.com/cockpit/"'      name: IMAGE_PREFIX      value: "cockpit/" +  - description: 'Specify component name for container image; e.g. for "registry.example.com/cockpit/kubernetes:latest", use base name "kubernetes"' +    name: IMAGE_BASENAME +    value: "kubernetes"    - description: 'Specify image version; e.g. for "cockpit/kubernetes:latest", set version "latest"'      name: IMAGE_VERSION      value: latest diff --git a/roles/openshift_hosted_templates/files/v3.8/enterprise/registry-console.yaml b/roles/openshift_hosted_templates/files/v3.8/enterprise/registry-console.yaml index 5acbb02b3..f04ce06d3 100644 --- a/roles/openshift_hosted_templates/files/v3.8/enterprise/registry-console.yaml +++ b/roles/openshift_hosted_templates/files/v3.8/enterprise/registry-console.yaml @@ -27,7 +27,7 @@ objects:          spec:            containers:              - name: registry-console -              image: ${IMAGE_PREFIX}registry-console:${IMAGE_VERSION} +              image: ${IMAGE_PREFIX}${IMAGE_BASENAME}:${IMAGE_VERSION}                ports:                  - containerPort: 9090                    protocol: TCP @@ -89,7 +89,7 @@ objects:          - annotations: null            from:              kind: DockerImage -            name: ${IMAGE_PREFIX}registry-console:${IMAGE_VERSION} +            name: ${IMAGE_PREFIX}${IMAGE_BASENAME}:${IMAGE_VERSION}            name: ${IMAGE_VERSION}    - kind: OAuthClient      apiVersion: v1 @@ -102,7 +102,10 @@ objects:  parameters:    - description: 'Specify "registry/repository" prefix for container image; e.g. for "registry.access.redhat.com/openshift3/registry-console:latest", set prefix "registry.access.redhat.com/openshift3/"'      name: IMAGE_PREFIX -    value: "registry.access.redhat.com/openshift3/" +    value: "openshift3/" +  - description: 'Specify component name for container image; e.g. for "registry.access.redhat.com/openshift3/registry-console:latest", use base name "registry-console"' +    name: IMAGE_BASENAME +    value: "registry-console"    - description: 'Specify image version; e.g. for "registry.access.redhat.com/openshift3/registry-console:v3.8", set version "v3.8"'      name: IMAGE_VERSION      value: "v3.8" diff --git a/roles/openshift_hosted_templates/files/v3.8/origin/registry-console.yaml b/roles/openshift_hosted_templates/files/v3.8/origin/registry-console.yaml index a78146ca4..a75340eb7 100644 --- a/roles/openshift_hosted_templates/files/v3.8/origin/registry-console.yaml +++ b/roles/openshift_hosted_templates/files/v3.8/origin/registry-console.yaml @@ -27,7 +27,7 @@ objects:          spec:            containers:              - name: registry-console -              image: ${IMAGE_PREFIX}kubernetes:${IMAGE_VERSION} +              image: ${IMAGE_PREFIX}${IMAGE_BASENAME}:${IMAGE_VERSION}                ports:                  - containerPort: 9090                    protocol: TCP @@ -89,7 +89,7 @@ objects:          - annotations: null            from:              kind: DockerImage -            name: ${IMAGE_PREFIX}kubernetes:${IMAGE_VERSION} +            name: ${IMAGE_PREFIX}${IMAGE_BASENAME}:${IMAGE_VERSION}            name: ${IMAGE_VERSION}    - kind: OAuthClient      apiVersion: v1 @@ -103,6 +103,9 @@ parameters:    - description: 'Specify "registry/namespace" prefix for container image; e.g. for "registry.example.com/cockpit/kubernetes:latest", set prefix "registry.example.com/cockpit/"'      name: IMAGE_PREFIX      value: "cockpit/" +  - description: 'Specify component name for container image; e.g. for "registry.example.com/cockpit/kubernetes:latest", use base name "kubernetes"' +    name: IMAGE_BASENAME +    value: "kubernetes"    - description: 'Specify image version; e.g. for "cockpit/kubernetes:latest", set version "latest"'      name: IMAGE_VERSION      value: latest diff --git a/roles/openshift_logging/README.md b/roles/openshift_logging/README.md index 6c5bb8693..27cfc17d6 100644 --- a/roles/openshift_logging/README.md +++ b/roles/openshift_logging/README.md @@ -84,6 +84,7 @@ When `openshift_logging_install_logging` is set to `False` the `openshift_loggin  - `openshift_logging_es_memory_limit`: The amount of RAM that should be assigned to ES. Defaults to '8Gi'.  - `openshift_logging_es_log_appenders`: The list of rootLogger appenders for ES logs which can be: 'file', 'console'. Defaults to 'file'.  - `openshift_logging_es_pv_selector`: A key/value map added to a PVC in order to select specific PVs.  Defaults to 'None'. +- `openshift_logging_es_pvc_storage_class_name`: The name of the storage class to use for a static PVC.  Defaults to ''.  - `openshift_logging_es_pvc_dynamic`: Whether or not to add the dynamic PVC annotation for any generated PVCs. Defaults to 'False'.  - `openshift_logging_es_pvc_size`: The requested size for the ES PVCs, when not provided the role will not generate any PVCs. Defaults to '""'.  - `openshift_logging_es_pvc_prefix`: The prefix for the generated PVCs. Defaults to 'logging-es'. diff --git a/roles/openshift_logging/tasks/install_logging.yaml b/roles/openshift_logging/tasks/install_logging.yaml index 89e583771..2fefdc894 100644 --- a/roles/openshift_logging/tasks/install_logging.yaml +++ b/roles/openshift_logging/tasks/install_logging.yaml @@ -84,6 +84,7 @@      openshift_logging_elasticsearch_storage_type: "{{ elasticsearch_storage_type }}"      openshift_logging_elasticsearch_pvc_pv_selector: "{{ openshift_logging_es_pv_selector }}" +    openshift_logging_elasticsearch_pvc_storage_class_name: "{{ openshift_logging_es_pvc_storage_class_name }}"      openshift_logging_elasticsearch_nodeselector: "{{ openshift_logging_es_nodeselector if outer_item.0.nodeSelector | default(None) is none else outer_item.0.nodeSelector }}"      openshift_logging_elasticsearch_storage_group: "{{ [openshift_logging_es_storage_group] if outer_item.0.storageGroups | default([]) | length == 0 else outer_item.0.storageGroups }}"      _es_containers: "{{ outer_item.0.containers}}" @@ -110,6 +111,7 @@      openshift_logging_elasticsearch_storage_type: "{{ elasticsearch_storage_type }}"      openshift_logging_elasticsearch_pvc_pv_selector: "{{ openshift_logging_es_pv_selector }}" +    openshift_logging_elasticsearch_pvc_storage_class_name: "{{ openshift_logging_es_pvc_storage_class_name }}"    with_sequence: count={{ openshift_logging_es_cluster_size | int - openshift_logging_facts.elasticsearch.deploymentconfigs.keys() | count }}    loop_control: @@ -146,6 +148,7 @@      openshift_logging_elasticsearch_pvc_size: "{{ openshift_logging_es_ops_pvc_size }}"      openshift_logging_elasticsearch_pvc_dynamic: "{{ openshift_logging_es_ops_pvc_dynamic }}"      openshift_logging_elasticsearch_pvc_pv_selector: "{{ openshift_logging_es_ops_pv_selector }}" +    openshift_logging_elasticsearch_pvc_storage_class_name: "{{ openshift_logging_es_ops_pvc_storage_class_name }}"      openshift_logging_elasticsearch_memory_limit: "{{ openshift_logging_es_ops_memory_limit }}"      openshift_logging_elasticsearch_cpu_limit: "{{ openshift_logging_es_ops_cpu_limit }}"      openshift_logging_elasticsearch_cpu_request: "{{ openshift_logging_es_ops_cpu_request }}" @@ -187,6 +190,7 @@      openshift_logging_elasticsearch_pvc_size: "{{ openshift_logging_es_ops_pvc_size }}"      openshift_logging_elasticsearch_pvc_dynamic: "{{ openshift_logging_es_ops_pvc_dynamic }}"      openshift_logging_elasticsearch_pvc_pv_selector: "{{ openshift_logging_es_ops_pv_selector }}" +    openshift_logging_elasticsearch_pvc_storage_class_name: "{{ openshift_logging_es_ops_pvc_storage_class_name }}"      openshift_logging_elasticsearch_memory_limit: "{{ openshift_logging_es_ops_memory_limit }}"      openshift_logging_elasticsearch_cpu_limit: "{{ openshift_logging_es_ops_cpu_limit }}"      openshift_logging_elasticsearch_cpu_request: "{{ openshift_logging_es_ops_cpu_request }}" diff --git a/roles/openshift_logging_elasticsearch/defaults/main.yml b/roles/openshift_logging_elasticsearch/defaults/main.yml index bec4432c3..0ea913224 100644 --- a/roles/openshift_logging_elasticsearch/defaults/main.yml +++ b/roles/openshift_logging_elasticsearch/defaults/main.yml @@ -31,6 +31,7 @@ openshift_logging_elasticsearch_pvc_name: ""  openshift_logging_elasticsearch_pvc_size: ""  openshift_logging_elasticsearch_pvc_dynamic: false  openshift_logging_elasticsearch_pvc_pv_selector: {} +openshift_logging_elasticsearch_pvc_storage_class_name: ""  openshift_logging_elasticsearch_pvc_access_modes: ['ReadWriteOnce']  openshift_logging_elasticsearch_storage_group: ['65534']  | 
