Skip to content

Conversation

@rammanoj
Copy link
Contributor

@rammanoj rammanoj commented Jan 2, 2026

📝 Description

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

  • Make node_pools optional in linode.cloud.lke_cluster for enterprise clusters
  • Skip polling for kubernetes dashboard when tier is enterprise (i.e. enterprise clusters do not host kubernetes dashboard).

✔️ How to Test

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

  • Run make install which installs the ansible collection.
  • Set LINODE_TOKEN
  • Create a enterprise cluster with no nodepools.
# enterprise.yaml
- name: Manage nodePool
  hosts: localhost
  vars:
    ansible_python_interpreter: /Users/rpotla/Envs/lke-tools/bin/python
  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.9+lke7"
        tier: enterprise
        state: present
      register: cluster

    - name: Output cluster details
      debug:
        var: cluster

# Output:
TASK [Output cluster details] ***************************************************************************************************************************
task path: /Users/rpotla/Desktop/Codebase/test/tmp_ansible/two/two.yml:22
ok: [localhost] => {
    "cluster": {
        "actions": [
            "Created LKE cluster my-cluster"
        ],
        "changed": true,
        "cluster": {
            "apl_enabled": false,
            "control_plane": {
                "acl": {
                    "addresses": {
                        "ipv4": [],
                        "ipv6": []
                    },
                    "enabled": true
                },
                "high_availability": true
            },
            "created": "2026-01-02T17:10:13",
            "id": 551702,
            "k8s_version": "v1.31.9+lke7",
            "label": "my-cluster",
            "region": "us-ord",
            "status": "ready",
            "subnet_id": null,
            "tags": [],
            "tier": "enterprise",
            "updated": "2026-01-02T17:10:13",
            "vpc_id": null
        },
        "dashboard_url": null,
        "failed": false,
        "kubeconfig": "<hash>",
        "node_pools": []
    }
}

PLAY RECAP **********************************************************************************************************************************************
localhost                  : ok=3    changed=1    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0   
  • Create a standard cluster with no nodepools.
# standard.yaml
- name: Manage nodePool
  hosts: localhost
  vars:
    ansible_python_interpreter: /Users/rpotla/Envs/lke-tools/bin/python
  collections:
    - linode.cloud
  tasks:
    - name: Create a Linode LKE standard cluster with autoscaler
      linode.cloud.lke_cluster:
        api_version: v4beta
        label: 'my-second-cluster'
        region: us-ord
        k8s_version: "1.33"
        tier: standard
        state: present
      register: cluster

    - name: Output cluster details
      debug:
        var: cluster


# Output:
(lke-tools) ➜  one ansible-playbook standard.yml 
[WARNING]: No inventory was parsed, only implicit localhost is available
[WARNING]: provided hosts list is empty, only localhost is available. Note that the implicit localhost does not match 'all'

PLAY [Manage nodePool] **********************************************************************************************************************

TASK [Gathering Facts] **********************************************************************************************************************
ok: [localhost]

TASK [Create a Linode LKE standard cluster with autoscaler] *********************************************************************************
[ERROR]: Task failed: Module failed: At least one node pool must be specified when creating a standard LKE cluster.
Origin: /Users/rpotla/Desktop/Codebase/test/tmp_ansible/one/one.yml:30:7

28     #     var: node_pool
29
30     - name: Create a Linode LKE standard cluster with autoscaler
         ^ column 7

fatal: [localhost]: FAILED! => {"changed": false, "msg": "At least one node pool must be specified when creating a standard LKE cluster."}

PLAY RECAP **********************************************************************************************************************************
localhost                  : ok=1    changed=0    unreachable=0    failed=1    skipped=0    rescued=0    ignored=0   

@rammanoj rammanoj requested a review from a team as a code owner January 2, 2026 17:55
@rammanoj rammanoj requested review from lgarber-akamai and zliang-akamai and removed request for a team January 2, 2026 17:55
@rammanoj rammanoj force-pushed the optional-nodepools branch from 3833092 to c747097 Compare January 5, 2026 20:39
@rammanoj rammanoj force-pushed the optional-nodepools branch from 5c5c9cd to dbf4982 Compare January 5, 2026 20:53
@zliang-akamai
Copy link
Member

Wow!!! This is really happening! I'm exciting to hear that.

@zliang-akamai zliang-akamai requested a review from Copilot January 6, 2026 17:30
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 makes node pools optional for LKE Enterprise clusters and skips Kubernetes dashboard polling for enterprise tier clusters. The changes enable creating enterprise clusters without node pools while maintaining the requirement that standard clusters must have at least one node pool.

Key Changes:

  • Modified node pool handling to allow empty node pools for enterprise clusters while enforcing the requirement for standard clusters
  • Added conditional logic to skip dashboard URL polling for enterprise tier clusters
  • Added integration test for creating enterprise clusters without node pools

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
plugins/modules/lke_cluster.py Implements optional node pools for enterprise clusters and skips dashboard polling for enterprise tier
tests/integration/targets/lke_cluster_enterprise_no_pools/tasks/main.yaml Adds integration test to verify enterprise cluster creation without node pools

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

rammanoj and others added 4 commits January 6, 2026 23:34
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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! One small thing - can you add a test case for attempting to create a standard LKE cluster without any node pools to verify that it fails as expected? Also looks like there's a small lint issue to fix. Thanks for the contribution!

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!

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

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.


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

zliang-akamai and others added 2 commits January 15, 2026 18:48
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.


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

@zliang-akamai zliang-akamai requested a review from Copilot January 16, 2026 20:08
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

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.


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

rammanoj and others added 2 commits January 16, 2026 15:11
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…s/main.yaml

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@zliang-akamai zliang-akamai merged commit 08d98c8 into linode:dev Jan 16, 2026
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.

5 participants