-
Notifications
You must be signed in to change notification settings - Fork 244
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
(Part 3)Fix diffs in compute forwarding rule: remove networkTier
field from global forwarding rule
#2724
Closed
Closed
(Part 3)Fix diffs in compute forwarding rule: remove networkTier
field from global forwarding rule
#2724
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
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.
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 don't quite get this (but I like this comment). Could you describe what the Compute GCP service does for this field? I guess I'm confused because from your description it looks like TF sets the default "PREMIUM", in which case this code shall use "PREMIUM" as well to keep the behavior, but it sets 'nil'? Or, is the "PREMIUM" set by the GCP service if nil is passed in? If it is the latter, does the GCP return any errors/warnings?
Regarding the previous TF behavior, I guess it could relate to the spec "auto-correct" in
state-into-spec:merge
mode.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 latter one.
TF for global forwarding rule does not have "networkTier" field(see their documentation), that means whatever value provided by user, will be ignored in the request. If the field is unspecified, GCP will default it to "PREMIUM", no errors/warnings. I hope below example can explain that clearly:
Configuration yaml:
request body with TF controller:
response body with TF controller:
Quote the field description:
For regional ForwardingRule, the valid values are 'PREMIUM' and 'STANDARD'. For GlobalForwardingRule, the valid value is 'PREMIUM'. If this field is not specified, it is assumed to be 'PREMIUM'.
I think that explains why TF does not support this field for global forwarding rule and uses GCP default value.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.
Thanks for the explanation. I think
networkTier
field instatus.observedState
.forwardingRule.NetworkTier = nil
, with the previous TF-basedstate-into-spec: merge
default, this guarantees backward compatibility for existing forwarding rules.