-
Notifications
You must be signed in to change notification settings - Fork 112
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
Add a specific resource/data source to create, read, update and delete CSE Kubernetes clusters #1195
Add a specific resource/data source to create, read, update and delete CSE Kubernetes clusters #1195
Conversation
Signed-off-by: abarreiro <abarreiro@vmware.com>
Signed-off-by: abarreiro <abarreiro@vmware.com>
Signed-off-by: abarreiro <abarreiro@vmware.com>
Signed-off-by: abarreiro <abarreiro@vmware.com>
Signed-off-by: abarreiro <abarreiro@vmware.com>
Signed-off-by: abarreiro <abarreiro@vmware.com>
Signed-off-by: abarreiro <abarreiro@vmware.com>
Signed-off-by: abarreiro <abarreiro@vmware.com>
Signed-off-by: abarreiro <abarreiro@vmware.com>
Signed-off-by: abarreiro <abarreiro@vmware.com>
Signed-off-by: abarreiro <abarreiro@vmware.com>
Signed-off-by: abarreiro <abarreiro@vmware.com>
Signed-off-by: abarreiro <abarreiro@vmware.com>
Signed-off-by: abarreiro <abarreiro@vmware.com>
Signed-off-by: abarreiro <abarreiro@vmware.com>
Signed-off-by: abarreiro <abarreiro@vmware.com>
Signed-off-by: abarreiro <abarreiro@vmware.com>
Signed-off-by: abarreiro <abarreiro@vmware.com>
Signed-off-by: abarreiro <abarreiro@vmware.com>
Signed-off-by: abarreiro <abarreiro@vmware.com>
Signed-off-by: abarreiro <abarreiro@vmware.com>
Signed-off-by: abarreiro <abarreiro@vmware.com>
Signed-off-by: abarreiro <abarreiro@vmware.com>
Signed-off-by: abarreiro <abarreiro@vmware.com>
Signed-off-by: abarreiro <abarreiro@vmware.com>
Signed-off-by: abarreiro <abarreiro@vmware.com>
Signed-off-by: abarreiro <abarreiro@vmware.com>
Signed-off-by: abarreiro <abarreiro@vmware.com>
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.
Thank you for this big effort.
examples/container-service-extension/v4.2/install/step1/terraform.tfvars.example
Show resolved
Hide resolved
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.
Not easy to grasp it all - great addition.
I provisioned like 5 clusters, modified worked pools, etc. 🤞🏻
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.
First pass
examples/container-service-extension/v4.2/install/step1/3.11-cse-install-1-provider-config.tf
Outdated
Show resolved
Hide resolved
...ontainer-service-extension/v4.2/install/step1/3.11-cse-install-2-cse-server-prerequisites.tf
Outdated
Show resolved
Hide resolved
...les/container-service-extension/v4.2/install/step1/3.11-cse-install-3-cse-server-settings.tf
Outdated
Show resolved
Hide resolved
Signed-off-by: abarreiro <abarreiro@vmware.com>
Signed-off-by: abarreiro <abarreiro@vmware.com>
Signed-off-by: abarreiro <abarreiro@vmware.com>
Signed-off-by: abarreiro <abarreiro@vmware.com>
* Fix 'TestAccDataSourceNotFound' so 'vcd_cse_kubernetes_cluster' (introduced in #1195) is ignored. * Fix 'TestAccDataSourceNotFound' so 'vcd_version' (introduced in #1195) is ignored. * Adds a specific ENF data source test for 'vcd_cse_kubernetes_cluster' data source, which requires the special 'cse' config block. * Fix a hard-coded parameter in the data source template used by 'TestAccVcdCseKubernetesCluster'. * Fix 'TestAccVcdNetworkRoutedV2NsxtRouteAdvertisement' and 'TestAccVcdVAppVmCopyDifferentVdc' to not to be run with org user. * Fix changelog entry .changes/v3.12.0/1210-improvements.md which had an incorrect file name. * Fix 'TestAccVcdVersion-step2' binary test (needs to be skipped). Signed-off-by: abarreiro <abarreiro@vmware.com>
Context
While the generic Runtime Defined Entity resources and data sources (
vcd_rde
,vcd_rde_type
,vcd_rde_interface
, etc) to create and manage Kubernetes clusters is completely valid and usable, it causes some challenges to the final users, as the process can be cumbersome at certain stages, and prone to errors.The idea of this PR is to provide a new resource and data source
vcd_cse_kubernetes_cluster
that abstracts users from that complexity.Description
This PR adds the new data source and resource
vcd_cse_kubernetes_cluster
, which looks like this:The resource allows to create the cluster with the given specs, to update the existing pools or add more, or set/unset the machine health check settings.
It supports CSE 4.1.x and 4.2.0
Extra features
This PR also adds the data source
vcd_version
that fetches the VCD version and allows to make some conditionals in HCL code with it.Testing
Testing CSE methods
To run the CSE tests, one must set the
TEST_VCD_CSE
environment variable to any non-empty value. The reason is that CSE requires a very unique environment, and the tests take a long time to be executed.The tests also require a special vcd_test_config.json file that is almost empty and contains the new cse section: