Skip to content

Fix example disk type values for LKE (ext-4 vs ext4) #961

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

Closed

Conversation

mabojars
Copy link

@mabojars mabojars commented Sep 9, 2024

The Linode API supports either ext4 or raw for the disk type value, in LKE routes. The OpenAPI spec examples suggest ext-4 (with the -), which is incorrect. Requests using the ext-4 value yield a validation error response from the Linode API.

Example:

curl --request POST \
     --url https://api.linode.com/v4/lke/clusters \
     --header 'accept: application/json' \
     --header "authorization: Bearer YEEEEHAW!" \
     --header 'content-type: application/json' \
     --data '
{
  "k8s_version": "1.30",
  "label": "lkecluster12345",
  "node_pools": [
    {
      "autoscaler": {
        "enabled": true,
        "max": 12,
        "min": 3
      },
      "count": 6,
      "disks": [
        {
          "size": 1024,
          "type": "ext-4"
        }
      ],
      "labels": {
        "example.com/my-app": "teams"
      },
      "tags": [
        "example tag",
        "another example"
      ],
      "taints": [
        {
          "effect": "NoSchedule",
          "key": "example.com/my-app",
          "value": "teamA"
        },
        {
          "effect": "NoExecute",
          "key": "myapp.io/team",
          "value": "teamB"
        }
      ],
      "type": "g6-standard-4"
    }
  ],
  "region": "us-central",
  "tags": [
    "ecomm",
    "blogs"
  ]
}
'

{"errors": [{"reason": "Must be one of raw, ext4", "field": "node_pools[0].disks[0].type"}]}

It appears the ext-4 vs ext4 discrepancy was introduced in linode-api-docs/pull/283 (1 match for ext-4), and then disseminated in linode-api-docs/pull/956 (6 matches for ext-4).

This PR replaces all occurrences of ext-4 with the valid ext4, for LKE routes.

@mabojars
Copy link
Author

mabojars commented Sep 9, 2024

@Vernholio will take over introducing these changes from here - thanks!

@mabojars mabojars closed this Sep 9, 2024
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.

1 participant