Add fields for specifying GKE logging variant at the cluster-wide and node pool level. #13049
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #12667
This PR implements the feature request from Add GKE logging variant field for increasing log agent throughput #12667. By adding a logging_variant field within the node_pool_defaults, GKE users will be able to select a cluster-level default value for the logging agent of the node pools in a cluster. For example, by specifying
every node pool (i.e. the default node pool) in the cluster will have the max throughput logging agent configured by default (see the GKE docs for more information).
GKE users will also be able to select a logging variant at the node pool level. For example, by specifying
node pools in the cluster (e.g. the default node pool) will have the default logging agent configured (see the GKE docs for more information), but the specified node pool will have the max throughput agent.
I acknowledge that I have:
Searched through the issue tracker for an open issue that this either resolves or contributes to, commented on it to claim it, and written "fixes {url}" or "part of {url}" in this PR description. If there were no relevant open issues, I opened one and commented that I would like to work on it (not necessary for very small changes).
Generated Terraform, and ran
make test
andmake lint
to ensure it passes unit and linter tests.The output of
make test
isbut only after I run
make fmt
. There were 2 files unrelated to my change that required Go formatting.I added the following tests:
TestAccContainerCluster_withNoSpecifiedLoggingVariant
TestAccContainerCluster_withDefaultLoggingVariant
TestAccContainerCluster_withMaxThroughputLoggingVariant
TestAccContainerCluster_withLoggingVariantUpdates
TestAccNodePool_withNoSpecifiedLoggingVariant
TestAccNodePool_withDefaultLoggingVariant
TestAccNodePool_withMaxThroughputLoggingVariant
TestAccNodePool_withLoggingVariantUpdates
I ran the tests that I added myself (see previous items). When I ran
TF_LOG=TRACE make testacc TEST=./google TESTARGS='-run=TestAccContainerCluster' | tee output.log
in the terraform-provider-google repo, I ran into some failures apparently unrelated to my change, but I'm as of yet unable to figure out why. The TRACE level logs suggested by the command in the README generate about 475 MB of log output, and it's difficult to find anything unless you know what to search for (i.e. "Check failed").Release Note Template for Downstream PRs (will be copied)
Derived from GoogleCloudPlatform/magic-modules#6744