Skip to content

Comments

Add firewall_id to LNP#725

Merged
lgarber-akamai merged 17 commits intolinode:devfrom
rammanoj:add-lnp-firewall
Dec 5, 2025
Merged

Add firewall_id to LNP#725
lgarber-akamai merged 17 commits intolinode:devfrom
rammanoj:add-lnp-firewall

Conversation

@rammanoj
Copy link
Contributor

@rammanoj rammanoj commented Nov 5, 2025

📝 Description

What does this PR do and why is this change necessary?

  • Add firewall_id to LNP

✔️ How to Test

What are the steps to reproduce the issue or verify the changes?

  • Run make install which installs the ansible collection.
  • Create an LKEE cluster through the UI.
  • Create 2 firewalls (firewall1 and firewall2).
  • Set the LINODE_API_TOKEN environment variable.
  • Use the below configuration to ensure that a NodePool is created with the existing firewall_id (run ansible-playbook playbook.yaml)
- name: Manage nodePool
  hosts: localhost
  vars:
    ansible_python_interpreter: `<point-to-python-env-where-collection-is-installed>`
  collections:
    - linode.cloud
  tasks:
    - name: Create a Linode LKE node pool with autoscaler
      linode.cloud.lke_node_pool:
        api_version: v4beta
        tags: ['hello-world']
        cluster_id: <cluster-id>
        count: 4
        type: g6-standard-2
        firewall_id: <firewall-1-id>
        state: present
      register: node_pool

    - name: Output node pool details
      debug:
        var: node_pool

  • Change firewall_id to id of firewall2 and re-run the playbook. Ensure that the firewall-id is updated both in UI the job went well.

@rammanoj rammanoj requested a review from a team as a code owner November 5, 2025 16:08
@rammanoj rammanoj requested review from lgarber-akamai and yec-akamai and removed request for a team November 5, 2025 16:08
@lgarber-akamai lgarber-akamai self-requested a review December 1, 2025 17:57
@lgarber-akamai
Copy link
Contributor

@rammanoj This looks great! For the CI failures, could you run make format and push this PR back up?

)
)

def _update_pool(self, pool: LKENodePool) -> LKENodePool:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would you mind adding the following lint comment to right above the def _update_pool? We will probably want to address this eventually through a refactor but that's definitely out of the scope of this PR 👍

# pylint: disable=too-many-statements

@lgarber-akamai
Copy link
Contributor

One more tiny thing: Assuming firewall_id is only returned for enterprise clusters, we might be need to move the test changes from this PR to lke_cluster_enterprise and lke_node_pool_enterprise.

Copy link
Contributor

@lgarber-akamai lgarber-akamai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks for the contribution!

@zliang-akamai zliang-akamai requested a review from Copilot December 4, 2025 23:20
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds support for the firewall_id parameter to Linode Kubernetes Engine (LKE) node pools, allowing users to associate firewalls with node pools during creation and update operations.

Key Changes:

  • Added firewall_id field to node pool specifications in both lke_node_pool and lke_cluster modules
  • Implemented update logic to handle firewall ID changes on existing node pools
  • Added integration tests to verify firewall assignment and updates

Reviewed changes

Copilot reviewed 7 out of 8 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
plugins/modules/lke_node_pool.py Added firewall_id field specification and update logic for standalone node pool management
plugins/modules/lke_cluster.py Added firewall_id field to node pool sub-options and update logic in cluster-level node pool management
tests/integration/targets/lke_node_pool_enterprise/tasks/main.yaml Added integration tests for firewall creation, assignment, and updates on enterprise node pools
tests/integration/targets/lke_cluster_enterprise/tasks/main.yaml Added assertion to verify firewall ID is set correctly during cluster creation
tests/integration/targets/lke_node_pool_basic/tasks/main.yaml Removed extraneous blank line
docs/modules/lke_node_pool.md Added documentation for the new firewall_id parameter
docs/modules/lke_cluster.md Added documentation for the new firewall_id parameter in node pool sub-options

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@lgarber-akamai lgarber-akamai merged commit 52eda1d into linode:dev Dec 5, 2025
13 checks passed
@ezilber-akamai ezilber-akamai added the new-feature for new features in the changelog. label Dec 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

new-feature for new features in the changelog.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants