Skip to content

Conversation

@rammanoj
Copy link
Contributor

@rammanoj rammanoj commented Aug 21, 2025

📝 Description

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

  • Add label to NodePool

✔️ 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.
  • Set the LINODE_API_TOKEN environment variable.
  • Use the below configuration to ensure that a NodePool is created with the label name, printed and deleted to the cluster.
- 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
        cluster_id: <cluster-id>
      
        tags: ['my-pool']
        count: 4
        type: g6-standard-2
        label: my-second-pool
        
        autoscaler:
            enabled: true
            min: 1
            max: 5

        state: present
      register: node_pool

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

    - name: Create a Linode LKE node pool with autoscaler
      linode.cloud.lke_node_pool:
        api_version: v4beta
        cluster_id: <cluster-id>
      
        tags: ['my-pool']
        state: absent
  • To test cluster creation. Use below playbook:
- 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 cluster with autoscaler
      linode.cloud.lke_cluster:
        api_version: v4beta
        label: 'my-cluster'
        region: us-ord
        k8s_version: v1.31.8+lke5
        tier: enterprise
        node_pools:
          - type: g6-standard-1
            count: 2
            label: 'my-first-nodepool'
        state: present
      register: cluster

    - name: Output cluster details
      debug:
        var: cluster

@rammanoj rammanoj marked this pull request as ready for review September 8, 2025 22:35
@rammanoj rammanoj requested a review from a team as a code owner September 8, 2025 22:35
@rammanoj rammanoj requested review from ezilber-akamai and vshanthe and removed request for a team September 8, 2025 22:35
Copy link
Collaborator

@jriddle-linode jriddle-linode left a comment

Choose a reason for hiding this comment

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

Looks good, works locally, thank you!

Copy link
Contributor

@ezilber-akamai ezilber-akamai left a comment

Choose a reason for hiding this comment

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

Looks good overall! Just one small fix in the test. Thanks for the contribution!

@ezilber-akamai ezilber-akamai self-requested a review September 12, 2025 19:28
Copy link
Contributor

@ezilber-akamai ezilber-akamai left a comment

Choose a reason for hiding this comment

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

Nice work!

@ezilber-akamai ezilber-akamai merged commit 1b27a15 into linode:dev Sep 12, 2025
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants