diff --git a/docs/component-replaces-generator/main.yml b/docs/component-replaces-generator/main.yml new file mode 100644 index 000000000..0871f4fba --- /dev/null +++ b/docs/component-replaces-generator/main.yml @@ -0,0 +1,8 @@ +--- +- name: Documentation generator + hosts: localhost + gather_facts: no + tasks: + - name: Generate some documentation + ansible.builtin.import_role: + name: docs_generator diff --git a/docs/component-replaces-generator/roles/docs_generator/README.md b/docs/component-replaces-generator/roles/docs_generator/README.md new file mode 100644 index 000000000..225dd44b9 --- /dev/null +++ b/docs/component-replaces-generator/roles/docs_generator/README.md @@ -0,0 +1,38 @@ +Role Name +========= + +A brief description of the role goes here. + +Requirements +------------ + +Any pre-requisites that may not be covered by Ansible itself or the role should be mentioned here. For instance, if the role uses the EC2 module, it may be a good idea to mention in this section that the boto package is required. + +Role Variables +-------------- + +A description of the settable variables for this role should go here, including any variables that are in defaults/main.yml, vars/main.yml, and any variables that can/should be set via parameters to the role. Any variables that are read from other roles and/or the global scope (ie. hostvars, group vars, etc.) should be mentioned here as well. + +Dependencies +------------ + +A list of other roles hosted on Galaxy should go here, plus any details in regards to parameters that may need to be set for other roles, or variables that are used from other roles. + +Example Playbook +---------------- + +Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too: + + - hosts: servers + roles: + - { role: username.rolename, x: 42 } + +License +------- + +BSD + +Author Information +------------------ + +An optional section for the role authors to include contact information, or a website (HTML is not allowed). diff --git a/docs/component-replaces-generator/roles/docs_generator/defaults/main.yml b/docs/component-replaces-generator/roles/docs_generator/defaults/main.yml new file mode 100644 index 000000000..c30d51cf2 --- /dev/null +++ b/docs/component-replaces-generator/roles/docs_generator/defaults/main.yml @@ -0,0 +1,2 @@ +--- +# defaults file for docs_generator diff --git a/docs/component-replaces-generator/roles/docs_generator/filter_plugins/.gitignore b/docs/component-replaces-generator/roles/docs_generator/filter_plugins/.gitignore new file mode 100644 index 000000000..96403d36f --- /dev/null +++ b/docs/component-replaces-generator/roles/docs_generator/filter_plugins/.gitignore @@ -0,0 +1 @@ +__pycache__/* diff --git a/docs/component-replaces-generator/roles/docs_generator/filter_plugins/tree.py b/docs/component-replaces-generator/roles/docs_generator/filter_plugins/tree.py new file mode 100644 index 000000000..63ea93e58 --- /dev/null +++ b/docs/component-replaces-generator/roles/docs_generator/filter_plugins/tree.py @@ -0,0 +1,22 @@ +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type + +ANSIBLE_METADATA = { + 'metadata_version': '0.1', + 'status': ['preview'], + 'supported_by': 'community' +} + +class FilterModule(object): + def filters(self): + return { + 'tree': self.tree_builder + } + + def tree_builder(self, value): + tree = {} + + t = tree + for part in value.split('.'): + t = t.setdefault(part, {}) + return tree diff --git a/docs/component-replaces-generator/roles/docs_generator/handlers/main.yml b/docs/component-replaces-generator/roles/docs_generator/handlers/main.yml new file mode 100644 index 000000000..794a11e03 --- /dev/null +++ b/docs/component-replaces-generator/roles/docs_generator/handlers/main.yml @@ -0,0 +1,2 @@ +--- +# handlers file for docs_generator diff --git a/docs/component-replaces-generator/roles/docs_generator/meta/main.yml b/docs/component-replaces-generator/roles/docs_generator/meta/main.yml new file mode 100644 index 000000000..f79e4c3a8 --- /dev/null +++ b/docs/component-replaces-generator/roles/docs_generator/meta/main.yml @@ -0,0 +1,52 @@ +galaxy_info: + author: Leif Madsen + description: Generates common component replaces requirements documentation + company: Red Hat + + # If the issue tracker for your role is not on github, uncomment the + # next line and provide a value + # issue_tracker_url: http://example.com/issue/tracker + + # Choose a valid license ID from https://spdx.org - some suggested licenses: + # - BSD-3-Clause (default) + # - MIT + # - GPL-2.0-or-later + # - GPL-3.0-only + # - Apache-2.0 + # - CC-BY-4.0 + license: Apache-2.0 + + min_ansible_version: 2.16 + + # If this a Container Enabled role, provide the minimum Ansible Container version. + # min_ansible_container_version: + + # + # Provide a list of supported platforms, and for each platform a list of versions. + # If you don't wish to enumerate all versions for a particular platform, use 'all'. + # To view available platforms and versions (or releases), visit: + # https://galaxy.ansible.com/api/v1/platforms/ + # + # platforms: + # - name: Fedora + # versions: + # - all + # - 25 + # - name: SomePlatform + # versions: + # - all + # - 1.0 + # - 7 + # - 99.99 + + galaxy_tags: [] + # List tags for your role here, one per line. A tag is a keyword that describes + # and categorizes the role. Users find roles by searching for tags. Be sure to + # remove the '[]' above, if you add tags to this list. + # + # NOTE: A tag is limited to a single word comprised of alphanumeric characters. + # Maximum 20 tags per role. + +dependencies: [] + # List your role dependencies here, one per line. Be sure to remove the '[]' above, + # if you add dependencies to this list. diff --git a/docs/component-replaces-generator/roles/docs_generator/tasks/generate_component_interface.yaml b/docs/component-replaces-generator/roles/docs_generator/tasks/generate_component_interface.yaml new file mode 100644 index 000000000..6e7e02420 --- /dev/null +++ b/docs/component-replaces-generator/roles/docs_generator/tasks/generate_component_interface.yaml @@ -0,0 +1,55 @@ +--- +- name: Show component contents + ansible.builtin.debug: + var: component_path + +- name: Set component name + ansible.builtin.set_fact: + component_name: "{{ component_path.split('/')[-2] | trim }}" + +- name: Set component directory + ansible.builtin.set_fact: + component_dir: "{{ component_path.split('/')[:-1] | join('/') }}" + +- name: Read contents of module + ansible.builtin.slurp: + src: "{{ component_path }}" + register: kustomization_contents + +- name: Interpret as yaml + ansible.builtin.set_fact: + kustomize_yaml: '{{ kustomization_contents.content | b64decode | from_yaml }}' + +- name: Show yaml + ansible.builtin.debug: + var: kustomize_yaml + +- name: Get all the fieldpaths + ansible.builtin.set_fact: + fieldpaths: "{{ fieldpaths|default([]) + [item.source.fieldPath] }}" + loop: "{{ kustomize_yaml.replacements }}" + when: "'replacements' in kustomize_yaml" + +- name: Show replacements + ansible.builtin.debug: + var: fieldpaths + +- name: Build new structure + loop: "{{ fieldpaths }}" + ansible.builtin.set_fact: + source_dict: "{{ source_dict|default({}) | combine(item | tree, recursive=True) }}" + +- name: Show source_dict + ansible.builtin.debug: + var: source_dict + +- name: Describe which component we're working on + ansible.builtin.debug: + msg: | + Working on documentation for {{ component_name }} at {{ component_dir }} + +- name: Generate the documentation {{ component_name }} + ansible.builtin.template: + src: component_docs.j2 + dest: "{{ component_dir }}/component_replacements.md" + when: "'replacements' in kustomize_yaml" diff --git a/docs/component-replaces-generator/roles/docs_generator/tasks/main.yml b/docs/component-replaces-generator/roles/docs_generator/tasks/main.yml new file mode 100644 index 000000000..19ab1d61c --- /dev/null +++ b/docs/component-replaces-generator/roles/docs_generator/tasks/main.yml @@ -0,0 +1,23 @@ +--- +# tasks file for docs_generator +- name: Find common component directories + ansible.builtin.find: + paths: "{{ playbook_dir }}/../../lib/" + recurse: yes + patterns: 'kustomization.yaml' + register: common_components_index + +- name: Set common component path list + ansible.builtin.set_fact: + common_components: "{{ common_components_index.files | map(attribute='path') | list }}" + +- name: Show common components + ansible.builtin.debug: + msg: "{{ item }}" + loop: "{{ common_components }}" + +- name: Generate component interface documentation + loop: "{{ common_components }}" + ansible.builtin.include_tasks: generate_component_interface.yaml + loop_control: + loop_var: component_path diff --git a/docs/component-replaces-generator/roles/docs_generator/templates/component_docs.j2 b/docs/component-replaces-generator/roles/docs_generator/templates/component_docs.j2 new file mode 100644 index 000000000..0f1ebfe94 --- /dev/null +++ b/docs/component-replaces-generator/roles/docs_generator/templates/component_docs.j2 @@ -0,0 +1,32 @@ +--- +## Component {{ component_name }} replacement requirements + +Each component expects a set of ConfigMap parameters to be passed to it so that +manifests can be generated by kustomize. + +The component expects the parameters to be set in a corresponding local +ConfigMap in the overlay. Defaults are generally not provided by the component, +and errors will be thrown if the expected parameter is missing when building +the manifests with kustomize. + +| ConfigMap source name | Parameter field path | +| ----------- | ---------- | +{% for replacement in kustomize_yaml.replacements %} +| {{ replacement.source.name }} | {{ replacement.source.fieldPath }} | +{% endfor %} + +### Creating the local ConfigMap file + +In the overlay, create a file that will hold the parameters for the component which will be later included as a resource within the `kustomization.yaml` file. The resource name may match the ConfigMap source name with `.yaml` appended or another filename such as `values.yaml`. + +```yaml +# local-config: referenced, but not emitted by kustomize +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: + annotations: + config.kubernetes.io/local-config: "true" +{{ source_dict | to_nice_yaml }} +``` diff --git a/docs/component-replaces-generator/roles/docs_generator/tests/inventory b/docs/component-replaces-generator/roles/docs_generator/tests/inventory new file mode 100644 index 000000000..878877b07 --- /dev/null +++ b/docs/component-replaces-generator/roles/docs_generator/tests/inventory @@ -0,0 +1,2 @@ +localhost + diff --git a/docs/component-replaces-generator/roles/docs_generator/tests/test.yml b/docs/component-replaces-generator/roles/docs_generator/tests/test.yml new file mode 100644 index 000000000..6bb88f299 --- /dev/null +++ b/docs/component-replaces-generator/roles/docs_generator/tests/test.yml @@ -0,0 +1,5 @@ +--- +- hosts: localhost + remote_user: root + roles: + - docs_generator diff --git a/docs/component-replaces-generator/roles/docs_generator/vars/main.yml b/docs/component-replaces-generator/roles/docs_generator/vars/main.yml new file mode 100644 index 000000000..efecb2987 --- /dev/null +++ b/docs/component-replaces-generator/roles/docs_generator/vars/main.yml @@ -0,0 +1,2 @@ +--- +# vars file for docs_generator diff --git a/lib/control-plane/component_replacements.md b/lib/control-plane/component_replacements.md new file mode 100644 index 000000000..3854e13e5 --- /dev/null +++ b/lib/control-plane/component_replacements.md @@ -0,0 +1,88 @@ +--- +## Component control-plane replacement requirements + +Each component expects a set of ConfigMap parameters to be passed to it so that +manifests can be generated by kustomize. + +The component expects the parameters to be set in a corresponding local +ConfigMap in the overlay. Defaults are generally not provided by the component, +and errors will be thrown if the expected parameter is missing when building +the manifests with kustomize. + +| ConfigMap source name | Parameter field path | +| ----------- | ---------- | +| network-values | data.internalapi.endpoint_annotations | +| network-values | data.ctlplane.endpoint_annotations | +| network-values | data.rabbitmq.endpoint_annotations | +| network-values | data.rabbitmq-cell1.endpoint_annotations | +| network-values | data.lbServiceType | +| network-values | data.dns-resolver.options | +| network-values | data.storageClass | +| network-values | data.bridgeName | + +### Creating the local ConfigMap file + +In the overlay, create a file that will hold the parameters for the component which will be later included as a resource within the `kustomization.yaml` file. The resource name may match the ConfigMap source name with `.yaml` appended or another filename such as `values.yaml`. + +```yaml +# local-config: referenced, but not emitted by kustomize +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: + annotations: + config.kubernetes.io/local-config: "true" +data: + bridgeName: {} + ctlplane: + endpoint_annotations: {} + iface: {} + mtu: {} + prefix-length: {} + dns-resolver: + config: {} + options: {} + internalapi: + base_iface: {} + endpoint_annotations: {} + mtu: {} + prefix-length: {} + vlan: {} + lbServiceType: {} + node_0: + ctlplane_ip: {} + internalapi_ip: {} + name: {} + storage_ip: {} + tenant_ip: {} + node_1: + ctlplane_ip: {} + internalapi_ip: {} + name: {} + storage_ip: {} + tenant_ip: {} + node_2: + ctlplane_ip: {} + internalapi_ip: {} + name: {} + storage_ip: {} + tenant_ip: {} + rabbitmq: + endpoint_annotations: {} + rabbitmq-cell1: + endpoint_annotations: {} + routes: {} + storage: + base_iface: {} + mtu: {} + prefix-length: {} + vlan: {} + storageClass: {} + tenant: + base_iface: {} + mtu: {} + prefix-length: {} + vlan: {} + +``` diff --git a/lib/dataplane/nodeset/component_replacements.md b/lib/dataplane/nodeset/component_replacements.md new file mode 100644 index 000000000..1eeb3317b --- /dev/null +++ b/lib/dataplane/nodeset/component_replacements.md @@ -0,0 +1,103 @@ +--- +## Component nodeset replacement requirements + +Each component expects a set of ConfigMap parameters to be passed to it so that +manifests can be generated by kustomize. + +The component expects the parameters to be set in a corresponding local +ConfigMap in the overlay. Defaults are generally not provided by the component, +and errors will be thrown if the expected parameter is missing when building +the manifests with kustomize. + +| ConfigMap source name | Parameter field path | +| ----------- | ---------- | +| edpm-nodeset-values | data.nodeset.ansible | +| edpm-nodeset-values | data.nodeset.networks | +| edpm-nodeset-values | data.nodeset.nodes | +| edpm-nodeset-values | data.nodeset.services | +| edpm-nodeset-values | data.ssh_keys.authorized | +| edpm-nodeset-values | data.ssh_keys.private | +| edpm-nodeset-values | data.ssh_keys.public | +| edpm-nodeset-values | data.nova.migration.ssh_keys.private | +| edpm-nodeset-values | data.nova.migration.ssh_keys.public | + +### Creating the local ConfigMap file + +In the overlay, create a file that will hold the parameters for the component which will be later included as a resource within the `kustomization.yaml` file. The resource name may match the ConfigMap source name with `.yaml` appended or another filename such as `values.yaml`. + +```yaml +# local-config: referenced, but not emitted by kustomize +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: + annotations: + config.kubernetes.io/local-config: "true" +data: + bridgeName: {} + ctlplane: + endpoint_annotations: {} + iface: {} + mtu: {} + prefix-length: {} + dns-resolver: + config: {} + options: {} + internalapi: + base_iface: {} + endpoint_annotations: {} + mtu: {} + prefix-length: {} + vlan: {} + lbServiceType: {} + node_0: + ctlplane_ip: {} + internalapi_ip: {} + name: {} + storage_ip: {} + tenant_ip: {} + node_1: + ctlplane_ip: {} + internalapi_ip: {} + name: {} + storage_ip: {} + tenant_ip: {} + node_2: + ctlplane_ip: {} + internalapi_ip: {} + name: {} + storage_ip: {} + tenant_ip: {} + nodeset: + ansible: {} + networks: {} + nodes: {} + services: {} + nova: + migration: + ssh_keys: + private: {} + public: {} + rabbitmq: + endpoint_annotations: {} + rabbitmq-cell1: + endpoint_annotations: {} + routes: {} + ssh_keys: + authorized: {} + private: {} + public: {} + storage: + base_iface: {} + mtu: {} + prefix-length: {} + vlan: {} + storageClass: {} + tenant: + base_iface: {} + mtu: {} + prefix-length: {} + vlan: {} + +``` diff --git a/lib/networking/metallb/component_replacements.md b/lib/networking/metallb/component_replacements.md new file mode 100644 index 000000000..3a064dbd2 --- /dev/null +++ b/lib/networking/metallb/component_replacements.md @@ -0,0 +1,115 @@ +--- +## Component metallb replacement requirements + +Each component expects a set of ConfigMap parameters to be passed to it so that +manifests can be generated by kustomize. + +The component expects the parameters to be set in a corresponding local +ConfigMap in the overlay. Defaults are generally not provided by the component, +and errors will be thrown if the expected parameter is missing when building +the manifests with kustomize. + +| ConfigMap source name | Parameter field path | +| ----------- | ---------- | +| network-values | data.ctlplane.lb_addresses | +| network-values | data.internalapi.lb_addresses | +| network-values | data.storage.lb_addresses | +| network-values | data.tenant.lb_addresses | +| network-values | data.ctlplane.lb_addresses | +| network-values | data.internalapi.lb_addresses | +| network-values | data.tenant.lb_addresses | +| network-values | data.ctlplane.lb_addresses | +| network-values | data.storage.lb_addresses | +| network-values | data.bridgeName | +| network-values | data.tenant.iface | +| network-values | data.storage.iface | +| network-values | data.internalapi.iface | + +### Creating the local ConfigMap file + +In the overlay, create a file that will hold the parameters for the component which will be later included as a resource within the `kustomization.yaml` file. The resource name may match the ConfigMap source name with `.yaml` appended or another filename such as `values.yaml`. + +```yaml +# local-config: referenced, but not emitted by kustomize +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: + annotations: + config.kubernetes.io/local-config: "true" +data: + bridgeName: {} + ctlplane: + endpoint_annotations: {} + iface: {} + lb_addresses: {} + mtu: {} + prefix-length: {} + dns-resolver: + config: {} + options: {} + internalapi: + base_iface: {} + endpoint_annotations: {} + iface: {} + lb_addresses: {} + mtu: {} + prefix-length: {} + vlan: {} + lbServiceType: {} + node_0: + ctlplane_ip: {} + internalapi_ip: {} + name: {} + storage_ip: {} + tenant_ip: {} + node_1: + ctlplane_ip: {} + internalapi_ip: {} + name: {} + storage_ip: {} + tenant_ip: {} + node_2: + ctlplane_ip: {} + internalapi_ip: {} + name: {} + storage_ip: {} + tenant_ip: {} + nodeset: + ansible: {} + networks: {} + nodes: {} + services: {} + nova: + migration: + ssh_keys: + private: {} + public: {} + openstack-operator-image: {} + rabbitmq: + endpoint_annotations: {} + rabbitmq-cell1: + endpoint_annotations: {} + routes: {} + ssh_keys: + authorized: {} + private: {} + public: {} + storage: + base_iface: {} + iface: {} + lb_addresses: {} + mtu: {} + prefix-length: {} + vlan: {} + storageClass: {} + tenant: + base_iface: {} + iface: {} + lb_addresses: {} + mtu: {} + prefix-length: {} + vlan: {} + +``` diff --git a/lib/networking/nad/component_replacements.md b/lib/networking/nad/component_replacements.md new file mode 100644 index 000000000..540461b57 --- /dev/null +++ b/lib/networking/nad/component_replacements.md @@ -0,0 +1,113 @@ +--- +## Component nad replacement requirements + +Each component expects a set of ConfigMap parameters to be passed to it so that +manifests can be generated by kustomize. + +The component expects the parameters to be set in a corresponding local +ConfigMap in the overlay. Defaults are generally not provided by the component, +and errors will be thrown if the expected parameter is missing when building +the manifests with kustomize. + +| ConfigMap source name | Parameter field path | +| ----------- | ---------- | +| network-values | data.ctlplane.net-attach-def | +| network-values | data.internalapi.net-attach-def | +| network-values | data.storage.net-attach-def | +| network-values | data.tenant.net-attach-def | +| network-values | data.datacentre.net-attach-def | + +### Creating the local ConfigMap file + +In the overlay, create a file that will hold the parameters for the component which will be later included as a resource within the `kustomization.yaml` file. The resource name may match the ConfigMap source name with `.yaml` appended or another filename such as `values.yaml`. + +```yaml +# local-config: referenced, but not emitted by kustomize +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: + annotations: + config.kubernetes.io/local-config: "true" +data: + bridgeName: {} + ctlplane: + endpoint_annotations: {} + iface: {} + lb_addresses: {} + mtu: {} + net-attach-def: {} + prefix-length: {} + datacentre: + net-attach-def: {} + dns-resolver: + config: {} + options: {} + internalapi: + base_iface: {} + endpoint_annotations: {} + iface: {} + lb_addresses: {} + mtu: {} + net-attach-def: {} + prefix-length: {} + vlan: {} + lbServiceType: {} + node_0: + ctlplane_ip: {} + internalapi_ip: {} + name: {} + storage_ip: {} + tenant_ip: {} + node_1: + ctlplane_ip: {} + internalapi_ip: {} + name: {} + storage_ip: {} + tenant_ip: {} + node_2: + ctlplane_ip: {} + internalapi_ip: {} + name: {} + storage_ip: {} + tenant_ip: {} + nodeset: + ansible: {} + networks: {} + nodes: {} + services: {} + nova: + migration: + ssh_keys: + private: {} + public: {} + openstack-operator-image: {} + rabbitmq: + endpoint_annotations: {} + rabbitmq-cell1: + endpoint_annotations: {} + routes: {} + ssh_keys: + authorized: {} + private: {} + public: {} + storage: + base_iface: {} + iface: {} + lb_addresses: {} + mtu: {} + net-attach-def: {} + prefix-length: {} + vlan: {} + storageClass: {} + tenant: + base_iface: {} + iface: {} + lb_addresses: {} + mtu: {} + net-attach-def: {} + prefix-length: {} + vlan: {} + +``` diff --git a/lib/networking/netconfig/component_replacements.md b/lib/networking/netconfig/component_replacements.md new file mode 100644 index 000000000..d83a304e8 --- /dev/null +++ b/lib/networking/netconfig/component_replacements.md @@ -0,0 +1,135 @@ +--- +## Component netconfig replacement requirements + +Each component expects a set of ConfigMap parameters to be passed to it so that +manifests can be generated by kustomize. + +The component expects the parameters to be set in a corresponding local +ConfigMap in the overlay. Defaults are generally not provided by the component, +and errors will be thrown if the expected parameter is missing when building +the manifests with kustomize. + +| ConfigMap source name | Parameter field path | +| ----------- | ---------- | +| network-values | data.ctlplane.dnsDomain | +| network-values | data.internalapi.dnsDomain | +| network-values | data.external.dnsDomain | +| network-values | data.storage.dnsDomain | +| network-values | data.tenant.dnsDomain | +| network-values | data.ctlplane.mtu | +| network-values | data.internalapi.mtu | +| network-values | data.external.mtu | +| network-values | data.storage.mtu | +| network-values | data.tenant.mtu | +| network-values | data.ctlplane.subnets | +| network-values | data.internalapi.subnets | +| network-values | data.external.subnets | +| network-values | data.storage.subnets | +| network-values | data.tenant.subnets | + +### Creating the local ConfigMap file + +In the overlay, create a file that will hold the parameters for the component which will be later included as a resource within the `kustomization.yaml` file. The resource name may match the ConfigMap source name with `.yaml` appended or another filename such as `values.yaml`. + +```yaml +# local-config: referenced, but not emitted by kustomize +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: + annotations: + config.kubernetes.io/local-config: "true" +data: + bridgeName: {} + ctlplane: + dnsDomain: {} + endpoint_annotations: {} + iface: {} + lb_addresses: {} + mtu: {} + net-attach-def: {} + prefix-length: {} + subnets: {} + datacentre: + net-attach-def: {} + dns-resolver: + config: {} + options: {} + external: + dnsDomain: {} + mtu: {} + subnets: {} + internalapi: + base_iface: {} + dnsDomain: {} + endpoint_annotations: {} + iface: {} + lb_addresses: {} + mtu: {} + net-attach-def: {} + prefix-length: {} + subnets: {} + vlan: {} + lbServiceType: {} + node_0: + ctlplane_ip: {} + internalapi_ip: {} + name: {} + storage_ip: {} + tenant_ip: {} + node_1: + ctlplane_ip: {} + internalapi_ip: {} + name: {} + storage_ip: {} + tenant_ip: {} + node_2: + ctlplane_ip: {} + internalapi_ip: {} + name: {} + storage_ip: {} + tenant_ip: {} + nodeset: + ansible: {} + networks: {} + nodes: {} + services: {} + nova: + migration: + ssh_keys: + private: {} + public: {} + openstack-operator-image: {} + rabbitmq: + endpoint_annotations: {} + rabbitmq-cell1: + endpoint_annotations: {} + routes: {} + ssh_keys: + authorized: {} + private: {} + public: {} + storage: + base_iface: {} + dnsDomain: {} + iface: {} + lb_addresses: {} + mtu: {} + net-attach-def: {} + prefix-length: {} + subnets: {} + vlan: {} + storageClass: {} + tenant: + base_iface: {} + dnsDomain: {} + iface: {} + lb_addresses: {} + mtu: {} + net-attach-def: {} + prefix-length: {} + subnets: {} + vlan: {} + +``` diff --git a/lib/nncp/component_replacements.md b/lib/nncp/component_replacements.md new file mode 100644 index 000000000..b86647dc0 --- /dev/null +++ b/lib/nncp/component_replacements.md @@ -0,0 +1,112 @@ +--- +## Component nncp replacement requirements + +Each component expects a set of ConfigMap parameters to be passed to it so that +manifests can be generated by kustomize. + +The component expects the parameters to be set in a corresponding local +ConfigMap in the overlay. Defaults are generally not provided by the component, +and errors will be thrown if the expected parameter is missing when building +the manifests with kustomize. + +| ConfigMap source name | Parameter field path | +| ----------- | ---------- | +| network-values | data.internalapi.base_iface | +| network-values | data.internalapi.vlan | +| network-values | data.internalapi.mtu | +| network-values | data.tenant.base_iface | +| network-values | data.tenant.vlan | +| network-values | data.tenant.mtu | +| network-values | data.storage.base_iface | +| network-values | data.storage.vlan | +| network-values | data.storage.mtu | +| network-values | data.ctlplane.iface | +| network-values | data.ctlplane.mtu | +| network-values | data.node_0.internalapi_ip | +| network-values | data.node_0.tenant_ip | +| network-values | data.node_0.ctlplane_ip | +| network-values | data.node_0.storage_ip | +| network-values | data.node_1.internalapi_ip | +| network-values | data.node_1.tenant_ip | +| network-values | data.node_1.ctlplane_ip | +| network-values | data.node_1.storage_ip | +| network-values | data.node_2.internalapi_ip | +| network-values | data.node_2.tenant_ip | +| network-values | data.node_2.ctlplane_ip | +| network-values | data.node_2.storage_ip | +| network-values | data.ctlplane.prefix-length | +| network-values | data.internalapi.prefix-length | +| network-values | data.tenant.prefix-length | +| network-values | data.storage.prefix-length | +| network-values | data.ctlplane.prefix-length | +| network-values | data.internalapi.prefix-length | +| network-values | data.tenant.prefix-length | +| network-values | data.storage.prefix-length | +| network-values | data.ctlplane.prefix-length | +| network-values | data.internalapi.prefix-length | +| network-values | data.tenant.prefix-length | +| network-values | data.storage.prefix-length | +| network-values | data.node_0.name | +| network-values | data.node_1.name | +| network-values | data.node_2.name | +| network-values | data.dns-resolver.config | +| network-values | data.routes | +| network-values | data.bridgeName | + +### Creating the local ConfigMap file + +In the overlay, create a file that will hold the parameters for the component which will be later included as a resource within the `kustomization.yaml` file. The resource name may match the ConfigMap source name with `.yaml` appended or another filename such as `values.yaml`. + +```yaml +# local-config: referenced, but not emitted by kustomize +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: + annotations: + config.kubernetes.io/local-config: "true" +data: + bridgeName: {} + ctlplane: + iface: {} + mtu: {} + prefix-length: {} + dns-resolver: + config: {} + internalapi: + base_iface: {} + mtu: {} + prefix-length: {} + vlan: {} + node_0: + ctlplane_ip: {} + internalapi_ip: {} + name: {} + storage_ip: {} + tenant_ip: {} + node_1: + ctlplane_ip: {} + internalapi_ip: {} + name: {} + storage_ip: {} + tenant_ip: {} + node_2: + ctlplane_ip: {} + internalapi_ip: {} + name: {} + storage_ip: {} + tenant_ip: {} + routes: {} + storage: + base_iface: {} + mtu: {} + prefix-length: {} + vlan: {} + tenant: + base_iface: {} + mtu: {} + prefix-length: {} + vlan: {} + +``` diff --git a/lib/olm-openstack/component_replacements.md b/lib/olm-openstack/component_replacements.md new file mode 100644 index 000000000..334344a34 --- /dev/null +++ b/lib/olm-openstack/component_replacements.md @@ -0,0 +1,96 @@ +--- +## Component olm-openstack replacement requirements + +Each component expects a set of ConfigMap parameters to be passed to it so that +manifests can be generated by kustomize. + +The component expects the parameters to be set in a corresponding local +ConfigMap in the overlay. Defaults are generally not provided by the component, +and errors will be thrown if the expected parameter is missing when building +the manifests with kustomize. + +| ConfigMap source name | Parameter field path | +| ----------- | ---------- | +| olm-values | data.openstack-operator-image | + +### Creating the local ConfigMap file + +In the overlay, create a file that will hold the parameters for the component which will be later included as a resource within the `kustomization.yaml` file. The resource name may match the ConfigMap source name with `.yaml` appended or another filename such as `values.yaml`. + +```yaml +# local-config: referenced, but not emitted by kustomize +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: + annotations: + config.kubernetes.io/local-config: "true" +data: + bridgeName: {} + ctlplane: + endpoint_annotations: {} + iface: {} + mtu: {} + prefix-length: {} + dns-resolver: + config: {} + options: {} + internalapi: + base_iface: {} + endpoint_annotations: {} + mtu: {} + prefix-length: {} + vlan: {} + lbServiceType: {} + node_0: + ctlplane_ip: {} + internalapi_ip: {} + name: {} + storage_ip: {} + tenant_ip: {} + node_1: + ctlplane_ip: {} + internalapi_ip: {} + name: {} + storage_ip: {} + tenant_ip: {} + node_2: + ctlplane_ip: {} + internalapi_ip: {} + name: {} + storage_ip: {} + tenant_ip: {} + nodeset: + ansible: {} + networks: {} + nodes: {} + services: {} + nova: + migration: + ssh_keys: + private: {} + public: {} + openstack-operator-image: {} + rabbitmq: + endpoint_annotations: {} + rabbitmq-cell1: + endpoint_annotations: {} + routes: {} + ssh_keys: + authorized: {} + private: {} + public: {} + storage: + base_iface: {} + mtu: {} + prefix-length: {} + vlan: {} + storageClass: {} + tenant: + base_iface: {} + mtu: {} + prefix-length: {} + vlan: {} + +```