Skip to content

Commit 687dab5

Browse files
committed
[edpm_deploy_baremetal] Add custom_bootstrap flag to skip inline bootstrap patch
The inline kustomization hardcodes edpm_bootstrap_command to "sudo dnf -y update", preventing downstream jobs from providing a custom bootstrap command via file-based kustomizations (which are applied first and get overwritten by the inline patch). Add cifmw_edpm_deploy_baremetal_custom_bootstrap (default: false) that, when true, skips the inline edpm_bootstrap_command patch so file-based kustomizations can define it instead. Existing jobs are unaffected since the default is false. Signed-off-by: Vito Castellano <vcastell@redhat.com>
1 parent 6f21028 commit 687dab5

4 files changed

Lines changed: 6 additions & 2 deletions

File tree

docs/dictionary/en-custom.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ bmo
5151
bool
5252
booleans
5353
boostrap
54+
bootc
5455
bootmacaddress
5556
bootmode
5657
buildah

roles/edpm_deploy_baremetal/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ This role doesn't need privilege escalation.
1919
* `cifmw_edpm_deploy_baremetal_repo_setup_override`: (Boolean) Override the repo-setup service in OpenStackDataPlane with repo-setup-downstream. Default: `false`
2020
* `cifmw_edpm_deploy_baremetal_create_vms`: (Boolean) If enabled, compute nodes are pre-provisioned using Ironic else OpenStackProvisioner. Default: `true`
2121
* `cifmw_edpm_deploy_baremetal_nova_compute_extra_config`: (String) Oslo config snippet defining extra configuration for the nova-compute services. Defaults to an empty string.
22+
* `cifmw_edpm_deploy_baremetal_custom_bootstrap`: (Boolean) When true, skips the inline `edpm_bootstrap_command` kustomization patch so that a file-based kustomization can provide a custom bootstrap command instead. Default: `false`
23+
* `cifmw_edpm_deploy_baremetal_bootc`: (Boolean) Disables the inline `edpm_bootstrap_command` patch and `dnf update` for bootc-based immutable nodes. Default: `false`
2224

2325
## Examples
2426

roles/edpm_deploy_baremetal/defaults/main.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,5 @@ cifmw_edpm_deploy_baremetal_update_os_containers: false
2929
cifmw_edpm_deploy_baremetal_repo_setup_override: false
3030
cifmw_edpm_deploy_baremetal_create_vms: true
3131
cifmw_edpm_deploy_baremetal_nova_compute_extra_config: ""
32+
cifmw_edpm_deploy_baremetal_custom_bootstrap: false
3233
cifmw_edpm_deploy_baremetal_bootc: false

roles/edpm_deploy_baremetal/tasks/main.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@
120120
target_path: "{{ cifmw_edpm_deploy_openstack_crs_path }}"
121121
sort_ascending: false
122122
kustomizations: |-
123-
{% if content_provider_registry_ip is defined or not cifmw_edpm_deploy_baremetal_bootc %}
123+
{% if content_provider_registry_ip is defined or (not cifmw_edpm_deploy_baremetal_bootc and not cifmw_edpm_deploy_baremetal_custom_bootstrap) %}
124124
apiVersion: kustomize.config.k8s.io/v1beta1
125125
kind: Kustomization
126126
patches:
@@ -133,7 +133,7 @@
133133
value: ["{{ content_provider_registry_ip }}:5001"]
134134
{% endif %}
135135
136-
{% if not cifmw_edpm_deploy_baremetal_bootc %}
136+
{% if not cifmw_edpm_deploy_baremetal_bootc and not cifmw_edpm_deploy_baremetal_custom_bootstrap %}
137137
- op: add
138138
path: /spec/nodeTemplate/ansible/ansibleVars/edpm_bootstrap_command
139139
value: sudo dnf -y update

0 commit comments

Comments
 (0)