Merge "Add minimal AIO files for k8s clusters"

This commit is contained in:
Zuul
2025-12-15 21:06:46 +00:00
committed by Gerrit Code Review
7 changed files with 58 additions and 1 deletions

View File

@@ -48,3 +48,7 @@ collections:
source: https://github.com/ansible-collections/openvswitch.openvswitch
type: git
version: 2.1.1
- name: osa_ops.mcapi_vexxhost
source: https://opendev.org/openstack/openstack-ansible-ops#/mcapi_vexxhost
type: git
version: master

View File

@@ -0,0 +1,9 @@
---
cluster-api_hosts:
aio1:
ip: {{ bootstrap_host_public_address }}
management_ip: {{ bootstrap_host_management_address }}
{% if 'k8sHA' in bootstrap_host_scenarios_expanded %}
affinity:
k8s_container: 3
{% endif %}

34
inventory/env.d/k8s.yml Normal file
View File

@@ -0,0 +1,34 @@
---
# Copyright 2025, BBC R&D
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
component_skel:
k8s_capi:
belongs_to:
- k8s_all
container_skel:
k8s_container:
belongs_to:
- cluster-api_containers
contains:
- k8s_capi
physical_skel:
cluster-api_containers:
belongs_to:
- all_containers
cluster-api_hosts:
belongs_to:
- hosts

View File

@@ -41,6 +41,9 @@ bootstrap_host_scenarios_expanded: |-
{% set _ = scenario_list.extend(['cinder', 'glance', 'neutron', 'nova', 'placement', 'horizon']) %}
{% endif %}
{# Service additions based on scenario presence #}
{% if ('capi' in bootstrap_host_scenarios) %}
{% set _ = scenario_list.extend(['k8s']) %}
{% endif %}
{% if 'cloudkitty' in bootstrap_host_scenarios %}
{% set _ = scenario_list.extend(['ceilometer', 'gnocchi']) %}
{% endif %}

View File

@@ -193,6 +193,9 @@ class TestAnsibleInventoryFormatConstraints(unittest.TestCase):
'cloudkitty_engine',
'rating_hosts',
'rating_all',
'cluster-api_all',
'cluster-api_containers',
'cluster-api_hosts',
'coordination_containers',
'coordination_hosts',
'compute-infra_all',
@@ -269,6 +272,9 @@ class TestAnsibleInventoryFormatConstraints(unittest.TestCase):
'ironic-inspector_hosts',
'ironic_inspector_container',
'ironic_neutron_agent',
'k8s_all',
'k8s_capi',
'k8s_container',
'key-manager_containers',
'key-manager_hosts',
'key-manager_all',

View File

@@ -92,6 +92,7 @@
- name: openstack/openstack-ansible-plugins
- name: openstack/openstack-ansible-rabbitmq_server
- name: openstack/openstack-ansible-repo_server
- name: openstack/openstack-ansible-ops
- name: openstack/ansible-role-httpd
- name: openstack/ansible-role-systemd_service
- name: openstack/ansible-role-systemd_mount

View File

@@ -115,7 +115,7 @@
vars:
content_var:
collections: |-
{% set collections = [] %}
{% set collections = osa_extra_ansible_collections | default([]) %}
{% for result in zuul_collections.results %}
{% if result.stat.exists %}
{% set _ = collections.append({