-
Notifications
You must be signed in to change notification settings - Fork 240
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
Fix value template for global ComputeTargetHTTPSProxy #2056
Fix value template for global ComputeTargetHTTPSProxy #2056
Conversation
Looks good; is this covered by a test? |
/lgtm Agreed with @justinsb that we should add a test case for it. |
Added dynamic test to cover
|
@@ -20,6 +20,8 @@ spec: | |||
description: "test description" | |||
urlMapRef: | |||
name: computeurlmap-${uniqueId} | |||
certificateMapRef: |
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.
According to the field description:
Line 64 in 8d78e49
URLs to certificate manager certificate resources that are used to authenticate connections between users and the load balancer. |
sslCertificates and certificateManagerCertificates fields can not be defined together.
And according to the latest TF doc: https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/compute_target_https_proxy#certificate_manager_certificates
Certificate manager certificates only apply when the load balancing scheme is set to INTERNAL_MANAGED. For EXTERNAL and EXTERNAL_MANAGED, use certificate_map instead.
Feels like certificateManagerCertificates
and certificateMap
are mutually exclusive fields, and certificateManagerCertificates
/ certificateMap
and sslCertificates
are mutually exclusive fields as well. I.e. only one out of the three fields can be configured.
Could you verify that certificate map is indeed configured correctly in the underlying GCP resource when ssl certificates are configured?
Once the behavior is confirmed, could you update the field descriptions of those fields to reflect the correct usage of these fields?
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 default value for load balancing schemes
is EXTERNAL, so I'm able to created a target https proxy with certificateMap
: https://screenshot.googleplex.com/7Lm35rNZ6hkmXMZ.png
However, certificateManagerCertificates
/certificateMap
and sslCertificates
are mutually exclusive fields and I noticed that sslCertificates
is discarded when both are set. I updated the test and field description.
/lgtm Defer to @maqiuyujoyce comment on verifying the field and updating the doc. |
8d78e49
to
f5b79aa
Compare
/lgtm Thank you for the change, looks good on my side /hold In case @maqiuyujoyce want to take another pass. Feel free to unhold |
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 like there are fixes for three fields. Wondering if you can add test cases for the other two fixes.
config/servicemappings/compute.yaml
Outdated
@@ -2496,7 +2499,7 @@ spec: | |||
kind: NetworkSecurityServerTLSPolicy | |||
version: v1beta1 | |||
group: networksecurity.cnrm.cloud.google.com | |||
valueTemplate: "projects/{{project}}/locations/{{location}}/serverTlsPolicies/{{value}}" | |||
valueTemplate: "projects/{{project}}/locations/global/serverTlsPolicies/{{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.
Similarly, is there a test case covering this fix?
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 noticed another issue with serverTlsPolicyRef. There's error when resolving project
: "error": "Update call failed: error fetching live state: error converting resource config: unable to resolve missing value: project"
, and I already specified projectRef
in the yaml for NetworkSecurityServerTLSPolicy resource.
This field is introduced in #941, and this is a DCL based reference field. I don't think it's necessary to address it here, so I reverted my change back and created a ticket(b/349429138) for this. Lmk if that sounds reasonable.
f5b79aa
to
1ef07ff
Compare
2b8f137
to
5b88363
Compare
5b88363
to
752722a
Compare
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: maqiuyujoyce, yuwenma The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/hold cancel |
68f10db
into
GoogleCloudPlatform:master
Change description
Fixes b/345274481
Fix value template for global ComputeTargetHTTPSProxy.
Resource created successfully:
Tests you have done
make ready-pr
to ensure this PR is ready for review.