Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set ansible-init metadata for Kubernetes #664

Merged
merged 1 commit into from
Oct 18, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 46 additions & 0 deletions roles/azimuth_capi_operator/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,51 @@ azimuth_capi_operator_capi_helm_registry_mirrors: >-
# The additional packages for provisioned clusters
azimuth_capi_operator_capi_helm_additional_packages: []

# Work out the ansible-init collections to use for tenant clusters
azimuth_capi_operator_ansible_init_collections_default: >-
{{ ansible_init_default_collections | default([]) }}
azimuth_capi_operator_ansible_init_collections_extra: []
azimuth_capi_operator_ansible_init_collections: >-
{{
azimuth_capi_operator_ansible_init_collections_default +
azimuth_capi_operator_ansible_init_collections_extra
}}

# Work out the ansible-init playbooks to use for tenant clusters
azimuth_capi_operator_ansible_init_playbooks_default: >-
{{ ansible_init_default_playbooks | default([]) }}
azimuth_capi_operator_ansible_init_playbooks_extra: []
azimuth_capi_operator_ansible_init_playbooks: >-
{{
azimuth_capi_operator_ansible_init_playbooks_default +
azimuth_capi_operator_ansible_init_playbooks_extra
}}

# Metadata to associate with the machines in provisioned clusters
# By default, we set the metadata for the ansible-init collections and playbooks
azimuth_capi_operator_capi_helm_machine_metadata_defaults: |-
{
{% for collection in azimuth_capi_operator_ansible_init_collections %}
"ansible_init_coll_{{ loop.index0 }}_name": "{{ collection.name }}",
"ansible_init_coll_{{ loop.index0 }}_type": "{{ collection.type }}",
"ansible_init_coll_{{ loop.index0 }}_version": "{{ collection.version }}",
{% if collection.source is defined %}
"ansible_init_coll_{{ loop.index0 }}_source": "{{ collection.source }}",
{% endif %}
{% endfor %}
{% for playbook in azimuth_capi_operator_ansible_init_playbooks %}
"ansible_init_pb_{{ loop.index0 }}_name": "{{ playbook.name }}",
{% if playbook.stage is defined %}
"ansible_init_pb_{{ loop.index0 }}_stage": "{{ playbook.stage }}",
{% endif %}
{% endfor %}
}
azimuth_capi_operator_capi_helm_machine_metadata_overrides: {}
azimuth_capi_operator_capi_helm_machine_metadata: >-
{{-
azimuth_capi_operator_capi_helm_machine_metadata_defaults |
combine(azimuth_capi_operator_capi_helm_machine_metadata_overrides, recursive = True)
}}

# Indicates whether the failure domain (availability zone) should be omitted from control plane nodes
# Omitting the failure domain allows OpenStack to select a suitable AZ based on other scheduling constraints
Expand Down Expand Up @@ -122,6 +167,7 @@ azimuth_capi_operator_capi_helm_csi_cinder_default_volume_type:
azimuth_capi_operator_capi_helm_ingress_allow_snippet_annotations: true

azimuth_capi_operator_capi_helm_values_defaults:
machineMetadata: "{{ azimuth_capi_operator_capi_helm_machine_metadata }}"
kubeNetwork:
pods: >-
{{-
Expand Down
Loading