diff --git a/osia/cli.py b/osia/cli.py index 9bfad4e..b99fd46 100644 --- a/osia/cli.py +++ b/osia/cli.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # -# Copyright 2020 Osia authors +# Copyright 2022 Osia authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -63,6 +63,8 @@ def _read_list(in_str: str) -> List[str]: 'default': 'images'}, 'skip_clean': {'help': 'Skip clean when installation fails', 'action': 'store_true'}, 'enable_fips': {'help': 'Enable fips mode to the cluster', 'action': 'store_true'}, + 'enable_ipv6': {'help': 'Install custer with internally used ipv6.', + 'action': 'store_true'}, }, 'deprecated': { 'psi_cloud': {'help': 'DEPRECATED see osp_cloud'}, @@ -182,7 +184,7 @@ def _setup_parser(): def main_cli(): """Function represents main entrypoint for the - osia intaller + osia installer It sets up the cli and starts the executor.""" parser = _setup_parser() diff --git a/osia/installer/clouds/base.py b/osia/installer/clouds/base.py index 7ff4fe9..93c375a 100644 --- a/osia/installer/clouds/base.py +++ b/osia/installer/clouds/base.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # -# Copyright 2020 Osia authors +# Copyright 2022 Osia authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -28,7 +28,7 @@ class AbstractInstaller(ABC): __env: Environment = None - # pylint: disable=too-many-arguments + # pylint: disable=too-many-arguments,too-many-locals def __init__(self, cluster_name=None, base_domain=None, @@ -42,6 +42,7 @@ def __init__(self, cluster_directory=None, skip_clean=False, enable_fips=False, + enable_ipv6=False, installer=None, **unused_kwargs): self.cluster_name = cluster_name @@ -60,6 +61,7 @@ def __init__(self, self.skip_clean = skip_clean self.installer = installer self.enable_fips = enable_fips + self.enable_ipv6 = enable_ipv6 @abstractmethod def acquire_resources(self): diff --git a/osia/installer/templates/install-config-base.yaml.jinja2 b/osia/installer/templates/install-config-base.yaml.jinja2 index 8b5355a..8153249 100644 --- a/osia/installer/templates/install-config-base.yaml.jinja2 +++ b/osia/installer/templates/install-config-base.yaml.jinja2 @@ -1,5 +1,5 @@ {# -Copyright 2020 Osia authors +Copyright 2022 Osia authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -39,10 +39,15 @@ networking: clusterNetwork: - cidr: 10.128.0.0/14 hostPrefix: 23 - machineCIDR: {% block networkIp %}{% endblock %} - networkType: OpenShiftSDN +{% if enable_ipv6 %} - cidr: fd01::/48 + hostPrefix: 64{% endif %} + machineNetwork: + - cidr: {% block networkIp %}{% endblock %} +{#{% if enable_ipv6 %} - cidr: fd00::/48{% endif %}#} + networkType: {% if enable_ipv6 %}OVNKubernetes{% else %}OpenShiftSDN{% endif %} serviceNetwork: - 172.30.0.0/16 +{% if enable_ipv6 %} - fd02::/112{% endif %} platform:{% block platform %}{% endblock %} pullSecret: '{{ pull_secret }}' sshKey: | diff --git a/pyproject.toml b/pyproject.toml index 887c7aa..3299934 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -22,7 +22,7 @@ osia = 'osia.cli:main_cli' [tool.poetry.dependencies] python = "^3.8" -openstacksdk = "*" +openstacksdk = "<0.99" boto3 = "*" jinja2 = "*" dynaconf = {extras = ["yaml"], version = "*"}