Closed r2ronoha closed 1 year ago
I believe that this piece of code is responsible for this issue:
if reflect.DeepEqual(in, reflect.Zero(reflect.TypeOf(in)).Interface()) {
return nil
}
The reflect.Zero
basically says that if manage_storage_classes == false
, it should translate to nil
.
This file is generated by https://github.com/eddycharly/terraform-provider-kops/tree/main/hack/gen-tf-code but I wasn't able to find out how to tell it that the default value is true
Further looking in the code, I believe manage_storage_classes
should be a nullable argument.
Does it make sense, @eddycharly ? If so, I can prepare a PR.
hi @kuldazbraslav thanks for reporting, making manage_storage_classes
nullable makes sense.
When setting
cloud_config.manage_storage_classes = false
this does not populatecloudConfig.manageStorageClasses
leaving it to the default value oftrue
when the value is nil As a result, the kops default storageclass is created, creating conflicts with a custom default storageclass, preventing PVCs without explicit storage class to be created, until the kops default class is manually deletedmanage_storage_classes: true
manage_storage_classes: false
Version: 1.25.3