Skip to content

Conversation

yuwenma
Copy link
Collaborator

@yuwenma yuwenma commented Oct 3, 2025

BRIEF Change description

Fixes #

WHY do we need this change?

Special notes for your reviewer:

Does this PR add something which needs to be 'release noted'?


  • Reviewer reviewed release note.

Additional documentation e.g., references, usage docs, etc.:


Intended Milestone

Please indicate the intended milestone.

  • Reviewer tagged PR with the actual milestone.

Tests you have done

  • Run make ready-pr to ensure this PR is ready for review.
  • Perform necessary E2E testing for changed resources.

@yuwenma
Copy link
Collaborator Author

yuwenma commented Oct 3, 2025

issue #5303

Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please ask for approval from yuwenma. For more information see the Kubernetes Code Review Process.

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

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

// If not provided, data associated with the workflow will not be
// CMEK-encrypted.
// +optional
KMSCryptoKeyRef *refs.KMSCryptoKeyRef `json:"kmsCryptoKeyRef,omitempty"`
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We need to fix the json name otherwise mapper-generator cannot find out the KRM field.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I thought the trick was that we could match by the field name, regardless of the json value. Do we have a standard for this (e.g. is it networkRef or computeNetworkRef)?

}
}

if normalizer, ok := v.(refs.ExternalNormalizer); ok {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is for those refs who implements ExternalNormalizer, we can have another one for the new Ref (which support FromIdentity). Will do in follow up PR.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Which is the ref? I think ExternalNormalizer is the legacy one, and I agree this code is relatively brittle

return nil, fmt.Errorf("error converting to %T: %w", obj, err)
}

if err := common.NormalizeReferences(ctx, reader, obj, nil); err != nil {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Yay 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants