-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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 support for policy_name field in Placement Policy #8475
Add support for policy_name field in Placement Policy #8475
Conversation
Hello! I am a robot. It looks like you are a community contributor. @slevenick, a repository maintainer, has been assigned to review your changes. If you have not received review feedback within 2 business days, please leave a comment on this PR asking them to take a look. You can help make sure that review is quick by doing a self-review and by running impacted tests locally. |
LGTM |
Hi there, I'm the Modular magician. I've detected the following information about your changes: Diff reportYour PR generated some diffs in downstreams - here they are. Terraform GA: Diff ( 4 files changed, 135 insertions(+), 2 deletions(-)) |
Tests analyticsTotal tests: Action takenFound 3 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected testsTestAccContainerAwsNodePool_BetaBasicHandWritten|TestAccContainerCluster_customPlacementPolicy|TestAccContainerNodePool_customPlacementPolicy |
Rerun these tests in REPLAYING mode to catch issues
|
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.
Looks good overall and tests pass. Need to test update support
mmv1/third_party/terraform/services/container/resource_container_node_pool.go.erb
Show resolved
Hide resolved
@@ -262,6 +262,10 @@ cluster. | |||
Specifying COMPACT placement policy type places node pool's nodes in a closer | |||
physical proximity in order to reduce network latency between nodes. | |||
|
|||
* `policy_name` - (Optional) If set, refers to the name of a custom resource policy supplied by the user. |
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.
This should also be documented in the container_cluster markdown I believe? Though I'm not seeing the whole placement_policy object in there, maybe it was missed when it was added
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.
The placement_policy
is a node pool setting - it can be passed during cluster creation as documented here, but it only impacts the default created node pool. Should it be included in container_cluster markdown then?
38be41f
to
ac799f4
Compare
Thank you for the review, PTAL :) |
Hi there, I'm the Modular magician. I've detected the following information about your changes: Diff reportYour PR generated some diffs in downstreams - here they are. Terraform GA: Diff ( 4 files changed, 136 insertions(+), 2 deletions(-)) |
Tests analyticsTotal tests: Action takenFound 2 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected testsTestAccSpannerInstanceIamPolicy|TestAccContainerAwsNodePool_BetaBasicHandWritten |
Rerun these tests in REPLAYING mode to catch issues
|
/gcbrun I'm seeing an odd failure, maybe retrying will fix it |
Hi there, I'm the Modular magician. I've detected the following information about your changes: Diff reportYour PR generated some diffs in downstreams - here they are. Terraform GA: Diff ( 4 files changed, 136 insertions(+), 2 deletions(-)) |
Tests analyticsTotal tests: Action takenFound 1 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected testsTestAccContainerAwsNodePool_BetaBasicHandWritten |
|
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'm not seeing this in the v1 API at https://cloud.google.com/kubernetes-engine/docs/reference/rest/v1/projects.zones.clusters.nodePools
Is this feature available in GA, and maybe the docs aren't updated, or is it only in beta right now?
If it's only beta all this code will need to be inside the <% unless version == 'ga' -%>
tags
The feature is available in GA, it actually is listed in the v1 API: https://cloud.google.com/kubernetes-engine/docs/reference/rest/v1/projects.locations.clusters.nodePools#NodePool.PlacementPolicy :) |
Oh, strange it didn't show up on the overview page. Thanks for checking! |
Custom Placement Policy is a GKE node pool feature that allows users to use a custom resource placement policy.
If this PR is for Terraform, I acknowledge that I have:
make test
andmake lint
in the generated providers to ensure it passes unit and linter tests.Release Note Template for Downstream PRs (will be copied)
Note: I've run the added acceptance tests successfully, but the
make testacc TEST=./google TESTARGS='-run=TestAccContainerNodePool'
is partially failing. I'm running into some issues related to my project, e.g.INVALID_ARGUMENT: disabling pod cidr overprovision is not allowed for this project
orError: Error waiting for creating GKE cluster: The network "default" does not have available private IP space in 10.0.0.0/8 to reserve a /14 block for containers for cluster...
.