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

[WIP] [ocp4_workload_nmstate] Configure ocp4_workload_nmstate to enable the creation of NNCP #8882

Draft
wants to merge 2 commits into
base: development
Choose a base branch
from
Draft
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,8 @@ ocp4_workload_nmstate_catalog_snapshot_image: quay.io/gpte-devops-automation/olm

# Catalog snapshot image tag
ocp4_workload_nmstate_catalog_snapshot_image_tag: "v4.15_2024_05_27"

# Flag to decide if configure NodeNetworkConfigurationPolicy
ocp4_workload_nmstate_configure_nncp: false
ocp4_workload_nmstate_nncp_bridge_name: br-flat
ocp4_workload_nmstate_nncp_interface_name: enp3s0
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,12 @@
state: present
definition: "{{ lookup('file', 'nmstate.yaml') }}"

- name: Configure NodeNetworkConfigurationPolicy
when: ocp4_workload_nmstate_configure_nncp | default(false)
kubernetes.core.k8s:
state: present
definition: "{{ lookup('template', 'nncp.yaml') }}"

# Leave this as the last task in the playbook.
- name: Workload tasks complete
when: not silent|bool
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
apiVersion: nmstate.io/v1
kind: NodeNetworkConfigurationPolicy
metadata:
name: {{ ocp4_workload_nmstate_nncp_bridge_name }}
spec:
nodeSelector:
node-role.kubernetes.io/worker: ""
desiredState:
interfaces:
- name: {{ ocp4_workload_nmstate_nncp_bridge_name }}
description: Linux bridge with {{ ocp4_workload_nmstate_nncp_interface_name }} as a port
type: linux-bridge
state: up
ipv4:
dhcp: false
enabled: false
bridge:
options:
stp:
enabled: false
port:
- name: {{ ocp4_workload_nmstate_nncp_interface_name }}
Loading