Skip to content

Move NetworkSecurityClientTLSPolicy to identity and refs pattern - #8828

Merged
justinsb merged 4 commits into
GoogleCloudPlatform:masterfrom
codebot-robot:issue-8818-gepi
May 31, 2026
Merged

justinsb merged 4 commits into
GoogleCloudPlatform:masterfrom
codebot-robot:issue-8818-gepi

Conversation

@codebot-robot

Copy link
Copy Markdown
Collaborator

This PR moves the NetworkSecurityClientTLSPolicy resource under apis/networksecurity to use the modern identity and reference pattern (identity.IdentityV2 and refs.Ref using the gcpurls.Template approach).

Rationale and Changes

  1. Added status.externalRef field: Added ExternalRef *string to NetworkSecurityClientTLSPolicyStatus struct in apis/networksecurity/v1beta1/clienttlspolicy_types.go.
  2. Regenerated Types: Ran dev/tasks/generate-types-and-mappers to update zz_generated.deepcopy.go and the CRD definition under config/crds/resources/.
  3. Implemented Identity (clienttlspolicy_identity.go): Implemented the identity.IdentityV2 interface delegating to gcpurls.Template.
  4. Implemented Reference (clienttlspolicy_reference.go): Implemented the refs.Ref interface and helper functions.
  5. Added Journal: Created a journal documenting the changes and learnings.

This PR was generated by Overseer (powered by the gemini-3.5-flash model).

Fixes #8818

… and refs pattern

Move the NetworkSecurityClientTLSPolicy resource to the modern identity
and refs pattern using gcpurls.Template and identity.IdentityV2.

Fixes GoogleCloudPlatform#8818
ObservedGeneration *int64 `json:"observedGeneration,omitempty"`

// A unique specifier for the NetworkSecurityClientTLSPolicy resource in GCP.
ExternalRef *string `json:"externalRef,omitempty"`

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Never change the schema in this phase, we should only be bringing identity & reference types up to the latest conventions. Feel free to update the SKILL.md to clarify

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the catch! I have reverted the schema change and removed ExternalRef from the Status. I've also updated the kcc-identity-reference SKILL.md to clarify this rule.

(This comment was generated by Overseer)

@codebot-robot codebot-robot removed their assignment May 29, 2026
@codebot-robot

Copy link
Copy Markdown
Collaborator Author

I've started a task to address the feedback on this PR.

@codebot-robot

Copy link
Copy Markdown
Collaborator Author

Investigating Presubmit failure

Run: 26612750665(https://github.com/GoogleCloudPlatform/k8s-config-connector/actions/runs/26612750665)
Name: Presubmit
Cause: Code Error
Details: The validation step failed with ERROR: Resource Go Clients must be regenerated. This happened because an earlier commit added the ExternalRef field to clienttlspolicy_types.go without running make generate-go-client to update pkg/clients/generated.
Action Taken: None. This issue was already resolved by the subsequent fixup commit 898458218ea33667d43714d18a70a6ce4f235b2e, which removed the ExternalRef field and brought the files back in sync.

Investigating ci-presubmit failure

Run: 26613655739(https://github.com/GoogleCloudPlatform/k8s-config-connector/actions/runs/26613655739)
Name: ci-presubmit
Cause: Flake
Details: The tests-e2e-fixtures-servicedirectory test failed due to an unexpected diff in servicedirectorynamespace/_http.log (an extra PATCH request was captured). This PR does not touch the ServiceDirectory controller. Running the test locally passes without modifying the golden log. The failure is a known transient issue caused by the mock layer occasionally capturing an extra API call due to a delayed controller reconciliation.
Action Taken: None.

(This report was generated by Overseer)

@codebot-robot

Copy link
Copy Markdown
Collaborator Author

I have detected CI failures and triggered an investigation task.

@codebot-robot

Copy link
Copy Markdown
Collaborator Author

Overseer has triggered a task: .

@codebot-robot

Copy link
Copy Markdown
Collaborator Author

Overseer has triggered a task: investigate-failures.

@codebot-robot

Copy link
Copy Markdown
Collaborator Author

Investigating Presubmit failure

Run: 26612750665(https://github.com/GoogleCloudPlatform/k8s-config-connector/actions/runs/26612750665)
Name: Presubmit
Cause: Code Error
Details: The validation step failed with ERROR: Resource Go Clients must be regenerated. This was because an earlier commit added ExternalRef without running make generate-go-client.
Action Taken: None. This issue was already resolved by the fixup commit 898458218ea33667d43714d18a70a6ce4f235b2e, which removed the field and brought the repository back to a consistent state.

Investigating ci-presubmit failure

Run: 26613655739(https://github.com/GoogleCloudPlatform/k8s-config-connector/actions/runs/26613655739)
Name: ci-presubmit
Cause: Flake
Details: The tests-e2e-fixtures-servicedirectory test failed due to an unexpected diff in servicedirectorynamespace/_http.log (an extra PATCH request was captured). This PR does not touch the ServiceDirectory controller. This is a known transient issue caused by the mock layer occasionally capturing an extra API call due to a delayed controller reconciliation.
Action Taken: None.

(This report was generated by Overseer)

_ identity.Resource = &NetworkSecurityClientTLSPolicy{}
)

var NetworkSecurityClientTLSPolicyIdentityFormat = gcpurls.Template[NetworkSecurityClientTLSPolicyIdentity]("networksecurity.googleapis.com", "projects/{project}/locations/{location}/clientTlsPolicies/{clienttlspolicy}")

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the matching is case insensitive, but it reads better like this:

Suggested change
var NetworkSecurityClientTLSPolicyIdentityFormat = gcpurls.Template[NetworkSecurityClientTLSPolicyIdentity]("networksecurity.googleapis.com", "projects/{project}/locations/{location}/clientTlsPolicies/{clienttlspolicy}")
var NetworkSecurityClientTLSPolicyIdentityFormat = gcpurls.Template[NetworkSecurityClientTLSPolicyIdentity]("networksecurity.googleapis.com", "projects/{project}/locations/{location}/clientTlsPolicies/{clientTlsPolicy}")

@justinsb

Copy link
Copy Markdown
Collaborator

One nit about casing in the gcpurltemplate.

@codebot-robot codebot-robot removed their assignment May 31, 2026

@justinsb justinsb left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/approve
/lgtm

@google-oss-prow

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: justinsb

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@justinsb justinsb removed the overseer label May 31, 2026
@justinsb
justinsb added this pull request to the merge queue May 31, 2026
Merged via the queue into GoogleCloudPlatform:master with commit 62ce64a May 31, 2026
176 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Move NetworkSecurityClientTLSPolicy to identity and refs pattern

2 participants

⌂ 换网址