Skip to content

Commit

Permalink
Revert "Implemented changes for Linode Disk Encryption (#550)" (#581)
Browse files Browse the repository at this point in the history
This reverts commit 19fb287.
  • Loading branch information
ezilber-akamai authored Aug 28, 2024
1 parent 19fb287 commit 1b2d1a7
Show file tree
Hide file tree
Showing 14 changed files with 5 additions and 264 deletions.
7 changes: 1 addition & 6 deletions docs/modules/instance.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,6 @@ Manage Linode Instances, Configs, and Disks.
| `auto_disk_resize` | <center>`bool`</center> | <center>Optional</center> | Whether implicitly created disks should be resized during a type change operation. **(Default: `False`)** |
| `tags` | <center>`list`</center> | <center>Optional</center> | An array of tags applied to this object. Tags are for organizational purposes only. **(Updatable)** |
| [`placement_group` (sub-options)](#placement_group) | <center>`dict`</center> | <center>Optional</center> | A Placement Group to create this Linode under. |
| `disk_encryption` | <center>`str`</center> | <center>Optional</center> | The disk encryption status of this Linode. NOTE: Disk encryption may not currently be available to all users. **(Choices: `enabled`, `disabled`)** |
| `swap_size` | <center>`int`</center> | <center>Optional</center> | When deploying from an Image, this field is optional, otherwise it is ignored. This is used to set the swap disk size for the newly-created Linode. |

### configs
Expand Down Expand Up @@ -275,7 +274,6 @@ Manage Linode Instances, Configs, and Disks.
| `authorized_keys` | <center>`list`</center> | <center>Optional</center> | A list of SSH public key parts to deploy for the root user. |
| `authorized_users` | <center>`list`</center> | <center>Optional</center> | A list of usernames. |
| `filesystem` | <center>`str`</center> | <center>Optional</center> | The filesystem to create this disk with. |
| `disk_encryption` | <center>`str`</center> | <center>Optional</center> | The disk encryption status of this disk.NOTE: Disk encryption may not currently be available to all users. **(Choices: `enabled`, `disabled`)** |
| `image` | <center>`str`</center> | <center>Optional</center> | An Image ID to deploy the Disk from. |
| `root_pass` | <center>`str`</center> | <center>Optional</center> | The root user’s password on the newly-created Linode. |
| `stackscript_id` | <center>`int`</center> | <center>Optional</center> | The ID of the StackScript to use when creating the instance. See the [Linode API documentation](https://techdocs.akamai.com/linode-api/reference/get-stack-scripts). |
Expand Down Expand Up @@ -356,8 +354,6 @@ Manage Linode Instances, Configs, and Disks.
"placement_group_type": "anti_affinity:local",
"placement_group_policy": "strict"
}
"disk_encryption": "enabled",
"lke_cluster_id": null
}
```
- See the [Linode API response documentation](https://techdocs.akamai.com/linode-api/reference/get-linode-instance) for a list of returned fields
Expand Down Expand Up @@ -443,8 +439,7 @@ Manage Linode Instances, Configs, and Disks.
"label": "Debian 9 Disk",
"size": 48640,
"status": "ready",
"updated": "2018-01-01T00:01:01",
"disk_encryption": "enabled"
"updated": "2018-01-01T00:01:01"
}
]
```
Expand Down
5 changes: 1 addition & 4 deletions docs/modules/instance_info.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,6 @@ Get info about a Linode Instance.
"placement_group_type": "anti_affinity:local",
"placement_group_policy": "strict"
}
"disk_encryption": "enabled",
"lke_cluster_id": null
}
```
- See the [Linode API response documentation](https://techdocs.akamai.com/linode-api/reference/get-linode-instance) for a list of returned fields
Expand Down Expand Up @@ -176,8 +174,7 @@ Get info about a Linode Instance.
"label": "Debian 9 Disk",
"size": 48640,
"status": "ready",
"updated": "2018-01-01T00:01:01",
"disk_encryption": "enabled"
"updated": "2018-01-01T00:01:01"
}
]
```
Expand Down
4 changes: 1 addition & 3 deletions docs/modules/instance_list.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,7 @@ List and filter on Instances.
],
"type": "g6-standard-1",
"updated": "2018-01-01T00:01:01",
"watchdog_enabled": true,
"disk_encryption": "enabled",
"lke_cluster_id": null
"watchdog_enabled": true
}
]
```
Expand Down
1 change: 0 additions & 1 deletion docs/modules/lke_cluster.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,6 @@ Manage Linode LKE clusters.
"max": 12,
"min": 3
},
"disk_encryption": "enabled",
"count": 6,
"disks": [
{
Expand Down
1 change: 0 additions & 1 deletion docs/modules/lke_cluster_info.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ Get info about a Linode LKE cluster.
"max": 12,
"min": 3
},
"disk_encryption": "enabled",
"count": 6,
"disks": [
{
Expand Down
1 change: 0 additions & 1 deletion docs/modules/lke_node_pool.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ Manage Linode LKE cluster node pools.
"max": 12,
"min": 3
},
"disk_encryption": "enabled",
"count": 6,
"disks": [
{
Expand Down
5 changes: 1 addition & 4 deletions plugins/module_utils/doc_fragments/instance.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,6 @@
"placement_group_type": "anti_affinity:local",
"placement_group_policy": "strict"
}
"disk_encryption": "enabled",
"lke_cluster_id": null
}''']

result_configs_samples = ['''[
Expand Down Expand Up @@ -208,8 +206,7 @@
"label": "Debian 9 Disk",
"size": 48640,
"status": "ready",
"updated": "2018-01-01T00:01:01",
"disk_encryption": "enabled"
"updated": "2018-01-01T00:01:01"
}
]''']

Expand Down
4 changes: 1 addition & 3 deletions plugins/module_utils/doc_fragments/instance_list.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,6 @@
],
"type": "g6-standard-1",
"updated": "2018-01-01T00:01:01",
"watchdog_enabled": true,
"disk_encryption": "enabled",
"lke_cluster_id": null
"watchdog_enabled": true
}
]''']
1 change: 0 additions & 1 deletion plugins/module_utils/doc_fragments/lke_cluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@
"max": 12,
"min": 3
},
"disk_encryption": "enabled",
"count": 6,
"disks": [
{
Expand Down
1 change: 0 additions & 1 deletion plugins/module_utils/doc_fragments/lke_node_pool.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
"max": 12,
"min": 3
},
"disk_encryption": "enabled",
"count": 6,
"disks": [
{
Expand Down
12 changes: 0 additions & 12 deletions plugins/modules/instance.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,12 +83,6 @@
type=FieldType.string,
description=["The filesystem to create this disk with."],
),
"disk_encryption": SpecField(
type=FieldType.string,
description="The disk encryption status of this disk."
+ "NOTE: Disk encryption may not currently be available to all users.",
choices=["enabled", "disabled"],
),
"image": SpecField(
type=FieldType.string,
description=["An Image ID to deploy the Disk from."],
Expand Down Expand Up @@ -529,12 +523,6 @@
suboptions=linode_instance_placement_group_spec,
description=["A Placement Group to create this Linode under."],
),
"disk_encryption": SpecField(
type=FieldType.string,
description="The disk encryption status of this Linode. "
+ "NOTE: Disk encryption may not currently be available to all users.",
choices=["enabled", "disabled"],
),
"swap_size": SpecField(
type=FieldType.integer,
description=[
Expand Down
143 changes: 0 additions & 143 deletions tests/integration/targets/instance_disk_encryption/tasks/main.yaml

This file was deleted.

30 changes: 0 additions & 30 deletions tests/integration/targets/lke_cluster_basic/tasks/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,6 @@
# Sometimes only one LKE version is available for provisioning
kube_version: '{{ lke_versions[1].id if lke_versions|length > 1 else lke_versions[0].id }}'

- name: List regions that support Disk Encryption
linode.cloud.region_list: {}
register: all_regions

- set_fact:
lde_region: '{{ (all_regions.regions | selectattr("capabilities", "search", "Disk Encryption") | list)[0].id }}'

- name: Create a Linode LKE cluster
linode.cloud.lke_cluster:
label: 'ansible-test-{{ r }}'
Expand Down Expand Up @@ -154,23 +147,6 @@
- info_by_label.node_pools[0].count == 1
- info_by_label.node_pools[0].id == create_cluster.node_pools[0].id

- name: Create a Linode LKE cluster with a pool with disk encryption enabled
linode.cloud.lke_cluster:
label: 'ansible-test-de-{{ r }}'
region: '{{ lde_region }}'
k8s_version: '{{ old_kube_version }}'
node_pools:
- type: g6-standard-1
count: 3
skip_polling: true
state: present
register: create_cluster_disk_encryption

- name: Assert LKE cluster is created
assert:
that:
- create_cluster_disk_encryption.node_pools[0].disk_encryption == 'enabled'

always:
- ignore_errors: yes
block:
Expand All @@ -179,12 +155,6 @@
label: '{{ create_cluster.cluster.label }}'
state: absent

- name: Delete the LKE cluster
linode.cloud.lke_cluster:
label: '{{ create_cluster_disk_encryption.cluster.label }}'
state: absent


environment:
LINODE_UA_PREFIX: '{{ ua_prefix }}'
LINODE_API_TOKEN: '{{ api_token }}'
Expand Down
Loading

0 comments on commit 1b2d1a7

Please sign in to comment.