Skip to content

feat: Adding storage profile configuration #18

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -413,6 +413,38 @@ Type: `number`

Default: `0`

### storage\_profile\_blob\_driver\_enabled

Description: Is the Blob CSI driver enabled?
Copy link
Member

Choose a reason for hiding this comment

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

Since this is an input, shouldn't this be worded as an imperative?
Description: Enable the Blob CSI driver.
I omit putting this on the other occurrences, but they're also affected.

Copy link
Member Author

Choose a reason for hiding this comment

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

I've used the same parameter name as the official kubernetes resource here, so it's better identifiable.


Type: `bool`

Default: `false`

### storage\_profile\_disk\_driver\_enabled

Description: Is the Disk CSI driver enabled?

Type: `bool`

Default: `true`

### storage\_profile\_file\_driver\_enabled

Description: Is the File CSI driver enabled?

Type: `bool`

Default: `true`

### storage\_profile\_snapshot\_controller\_enabled

Description: Is the Snapshot Controller enabled?

Type: `bool`

Default: `true`

### tags

Description: Map of tags for the resources
Expand Down
7 changes: 7 additions & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,13 @@ resource "azurerm_kubernetes_cluster" "k8s" {
}
}

storage_profile {
blob_driver_enabled = var.storage_profile_blob_driver_enabled
disk_driver_enabled = var.storage_profile_disk_driver_enabled
file_driver_enabled = var.storage_profile_file_driver_enabled
snapshot_controller_enabled = var.storage_profile_snapshot_controller_enabled
}

dynamic "linux_profile" {
for_each = var.ssh_public_key == "" ? [] : [var.ssh_public_key]
content {
Expand Down
24 changes: 24 additions & 0 deletions vars.tf
Original file line number Diff line number Diff line change
Expand Up @@ -329,3 +329,27 @@ variable "default_node_pool_node_soak_duration_in_minutes" {
}
default = 0
}

variable "storage_profile_blob_driver_enabled" {
type = bool
default = false
description = "Is the Blob CSI driver enabled?"
}

variable "storage_profile_disk_driver_enabled" {
type = bool
default = true
description = "Is the Disk CSI driver enabled?"
}

variable "storage_profile_file_driver_enabled" {
type = bool
default = true
description = "Is the File CSI driver enabled?"
}

variable "storage_profile_snapshot_controller_enabled" {
type = bool
default = true
description = "Is the Snapshot Controller enabled?"
}