-
Notifications
You must be signed in to change notification settings - Fork 476
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
feat(storage_profile): add support for CSI arguments #282
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @aescrob for opening this pr! We have a CI pipeline in this repo, would you please follow the instruction in the readme, run pre-commit
job on you machine and try again? Thanks.
variables.tf
Outdated
@@ -237,7 +237,7 @@ variable "load_balancer_profile_managed_outbound_ip_count" { | |||
|
|||
variable "load_balancer_profile_managed_outbound_ipv6_count" { | |||
type = number | |||
description = "(Optional) The desired number of IPv6 outbound IPs created and managed by Azure for the cluster load balancer. Must be in the range of `1` to `100` (inclusive). The default value is `0` for single-stack and `1` for dual-stack. Note: managed_outbound_ipv6_count requires dual-stack networking. To enable dual-stack networking the Preview Feature Microsoft.ContainerService/AKS-EnableDualStack needs to be enabled and the Resource Provider re-registered, see the documentation for more information. https://learn.microsoft.com/en-us/azure/aks/configure-kubenet-dual-stack?tabs=azure-cli%2Ckubectl#register-the-aks-enabledualstack-preview-feature" | |||
description = "(Optional) The desired number of IPv6 outbound IPs created and managed by Azure for the cluster load balancer. Must be in the range of `1` to `100` (inclusive). The default value is `0` for single-stack and `1` for dual-stack. Note: managed_outbound_ipv6_count requires dual-stack networking. To enable dual-stack networking the Preview Feature Microsoft.ContainerService/AKS-EnableDualStack needs to be enabled and the Resource Provider re-registered, see the documentation for more information. https://learn.microsoft.com/en-us/azure/aks/configure-kubenet-dual-stack?tabs=azure-cli%!C(MISSING)kubectl#register-the-aks-enabledualstack-preview-feature" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we've got a typo in this description.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
main.tf
Outdated
@@ -219,6 +219,13 @@ resource "azurerm_kubernetes_cluster" "main" { | |||
client_secret = var.client_secret | |||
} | |||
} | |||
storage_profile { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we make this block a dynamic
block and add a new toggle variable so we can turn it on and off like we've done for aci_connector_linux
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed
variables.tf
Outdated
variable "storage_profile_blob_driver_enabled" { | ||
type = bool | ||
description = "(Optional) Is the Blob CSI driver enabled? Defaults to false" | ||
default = null |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to the schema, the default
should be false
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed
variables.tf
Outdated
variable "storage_profile_disk_driver_enabled" { | ||
type = bool | ||
description = "(Optional) Is the Disk CSI driver enabled? Defaults to true" | ||
default = null |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to the schema, the default
should be true
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed
variables.tf
Outdated
variable "storage_profile_disk_driver_version" { | ||
type = string | ||
description = "(Optional) Disk CSI Driver version to be used. Possible values are v1 and v2. Defaults to v1." | ||
default = null |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to the schema, the default
should be "v1"
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed
variables.tf
Outdated
variable "storage_profile_file_driver_enabled" { | ||
type = bool | ||
description = "(Optional) Is the File CSI driver enabled? Defaults to true" | ||
default = null |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to the schema, the default
should be true
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed
variables.tf
Outdated
variable "storage_profile_snapshot_controller_enabled" { | ||
type = bool | ||
description = "(Optional) Is the Snapshot Controller enabled? Defaults to true" | ||
default = null |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to the schema, the default
should be true
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apology for another change request @aescrob, I wasn't able to figure them out at the first review.
Since we use terraform-docs to generate document from variable and output descriptions, would you please help us by back-quoting values inside the description? Thanks!
And one more thing, our pipeline was broken because of Checkov has added some new policies, so please wait until #281 was merged then rebase to the latest master branch, thanks for your understanding and cooperation!
variables.tf
Outdated
@@ -530,6 +530,42 @@ variable "sku_tier" { | |||
default = "Free" | |||
} | |||
|
|||
variable "storage_profile_blob_driver_enabled" { | |||
type = bool | |||
description = "(Optional) Is the Blob CSI driver enabled? Defaults to false" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would you please back quote the value inside these descriptions since we'll generate terraform document from them? Thanks!
description = "(Optional) Is the Blob CSI driver enabled? Defaults to `false`"
variables.tf
Outdated
|
||
variable "storage_profile_disk_driver_enabled" { | ||
type = bool | ||
description = "(Optional) Is the Disk CSI driver enabled? Defaults to true" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
description = "(Optional) Is the Disk CSI driver enabled? Defaults to `true`"
variables.tf
Outdated
|
||
variable "storage_profile_disk_driver_version" { | ||
type = string | ||
description = "(Optional) Disk CSI Driver version to be used. Possible values are v1 and v2. Defaults to v1." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
description = "(Optional) Disk CSI Driver version to be used. Possible values are v1
and v2
. Defaults to v1
."
variables.tf
Outdated
|
||
variable "storage_profile_file_driver_enabled" { | ||
type = bool | ||
description = "(Optional) Is the File CSI driver enabled? Defaults to true" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
description = "(Optional) Is the File CSI driver enabled? Defaults to `true`"
variables.tf
Outdated
|
||
variable "storage_profile_snapshot_controller_enabled" { | ||
type = bool | ||
description = "(Optional) Is the Snapshot Controller enabled? Defaults to true" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
description = "(Optional) Is the Snapshot Controller enabled? Defaults to `true`"
variable "storage_profile_enabled" { | ||
description = "Enable storage profile" | ||
type = bool | ||
default = false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we add nullable = false
here?
Hi @aescrob, since the master branch now should have been fixed, would you please rebase to the latest master branch and try again? Thanks. |
@microsoft-github-policy-service agree [company="swisspost"] |
@microsoft-github-policy-service agree company="swisspost" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @aescrob, this pr has passed the e2e test and almost LGTM, only one extra commit with declaring var.storage_profile_enabled
's nullable = false
would make this pr been merged, thanks for your understanding.
Hello @aescrob, I'm sorry we've met an issue on our pipeline so we have to upgrade the Github action yaml files in this repo, would you please merge your branch with the latest master branch so we can run the e2e test? Apology for the inconvenience, we're still refactoring the pipeline. |
Oh...i am so sad to not made it into v6.3.0. |
No worries @aescrob , I'll release a new version for you once this pr has been merged. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @aescrob, LGTM! 🚀
Describe your changes
Since settings are supported by terraform-azurerm-provider from v3.35.0 on, allowing to disable CSI driver one by one.
Issue number
#000
Checklist before requesting a review
CHANGELOG.md
fileThanks for your cooperation!