Resource kubernetes_persistent_volume should expose secret_namespace argument for azure_file volume type, consistently with k8s api
Empirically, this feature become _almost necessary_ with AKS/K8S version 1.19. When spec.azureFile.secretNamespace is not specified, with version 1.18 pods would lookup for azure file secret in their own namespace, with version 1.19 they look that up in the default namespace.
resource "kubernetes_persistent_volume" "data" {
metadata {
name = "my-data-pv"
}
spec {
capacity = {
storage = "100Gi"
}
access_modes = ["ReadWriteMany"]
storage_class_name = "azurefile"
persistent_volume_source {
azure_file {
secret_namespace = "my-namespace" # Here is the argument yet to be supported in TF provider
secret_name = "bla"
share_name = "blabla"
read_only = "false"
}
}
mount_options = [
...
]
}
}
I also need this because we've upgraded our AKS to 1.19 and the persistent volume stopped working. As a workaround we've moved our secret to the default namespace but we'd like to have this done properly by setting the secret_namespace.
I've opened a PR #1204
I'm going to lock this issue because it has been closed for _30 days_ ⏳. This helps our maintainers find and focus on the active issues.
If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 [email protected]. Thanks!
Most helpful comment
I also need this because we've upgraded our AKS to 1.19 and the persistent volume stopped working. As a workaround we've moved our secret to the
defaultnamespace but we'd like to have this done properly by setting thesecret_namespace.I've opened a PR #1204