Skip to content

Commit dc97e17

Browse files
committed
ignore port binding/dhcp options for caas
1 parent ba4c3e9 commit dc97e17

File tree

1 file changed

+47
-0
lines changed

1 file changed

+47
-0
lines changed

ansible/roles/cluster_infra/templates/resources.tf.j2

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,14 @@ resource "openstack_networking_port_v2" "login" {
219219
binding {
220220
vnic_type = "{{ cluster_vnic_type | default('normal') }}"
221221
}
222+
223+
lifecycle {
224+
ignore_changes = [
225+
binding, # fixes running as admin
226+
extra_dhcp_option # required for networking-mlnx neutron plugin
227+
]
228+
}
229+
222230
}
223231

224232
# Storage network
@@ -235,6 +243,14 @@ resource "openstack_networking_port_v2" "login_storage" {
235243
binding {
236244
vnic_type = "{{ cluster_storage_vnic_type | default('normal') }}"
237245
}
246+
247+
lifecycle {
248+
ignore_changes = [
249+
binding, # fixes running as admin
250+
extra_dhcp_option # required for networking-mlnx neutron plugin
251+
]
252+
}
253+
238254
}
239255
{% endif %}
240256

@@ -258,8 +274,15 @@ resource "openstack_networking_port_v2" "control" {
258274

259275
binding {
260276
vnic_type = "{{ cluster_vnic_type | default('normal') }}"
277+
}
261278

279+
lifecycle {
280+
ignore_changes = [
281+
binding, # fixes running as admin
282+
extra_dhcp_option # required for networking-mlnx neutron plugin
283+
]
262284
}
285+
263286
}
264287

265288
# Storage network
@@ -276,6 +299,14 @@ resource "openstack_networking_port_v2" "control_storage" {
276299
binding {
277300
vnic_type = "{{ cluster_storage_vnic_type | default('normal') }}"
278301
}
302+
303+
lifecycle {
304+
ignore_changes = [
305+
binding, # fixes running as admin
306+
extra_dhcp_option # required for networking-mlnx neutron plugin
307+
]
308+
}
309+
279310
}
280311
{% endif %}
281312

@@ -301,6 +332,14 @@ resource "openstack_networking_port_v2" "{{ nodegroup.name }}" {
301332
binding {
302333
vnic_type = "{{ cluster_vnic_type | default('normal') }}"
303334
}
335+
336+
lifecycle {
337+
ignore_changes = [
338+
binding, # fixes running as admin
339+
extra_dhcp_option # required for networking-mlnx neutron plugin
340+
]
341+
}
342+
304343
}
305344

306345
# Storage network
@@ -318,6 +357,14 @@ resource "openstack_networking_port_v2" "{{ nodegroup.name }}_storage" {
318357
binding {
319358
vnic_type = "{{ cluster_storage_vnic_type | default('normal') }}"
320359
}
360+
361+
lifecycle {
362+
ignore_changes = [
363+
binding, # fixes running as admin
364+
extra_dhcp_option # required for networking-mlnx neutron plugin
365+
]
366+
}
367+
321368
}
322369
{% endif %}
323370

0 commit comments

Comments
 (0)