Skip to content
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

chore: generate CRD for KMSCryptoKey #2195

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

justinsb
Copy link
Collaborator

@justinsb justinsb commented Jun 29, 2024

chore: generate CRD for KMSCryptoKey

@justinsb justinsb force-pushed the crd_for_kmscryptokey branch 2 times, most recently from 22665c3 to 0533416 Compare July 16, 2024 14:51
@justinsb justinsb changed the title WIP: CRD for KMSCryptoKey chore: generate CRD for KMSCryptoKey Jul 16, 2024
@justinsb
Copy link
Collaborator Author

justinsb commented Jul 16, 2024

/wip

Need to add skipInitialVersionCreation

Added!

@justinsb justinsb force-pushed the crd_for_kmscryptokey branch 2 times, most recently from 7f4745a to fad45f6 Compare July 16, 2024 18:32
/* The `name` field of a `KMSKeyRing` resource. */
Name string `json:"name,omitempty"`
/* The `namespace` field of a `KMSKeyRing` resource. */
Namespace string `json:"namespace,omitempty"`
Copy link
Collaborator

@yuwenma yuwenma Aug 5, 2024

Choose a reason for hiding this comment

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

(I shall ask this earlier) What's the (current) plan if this references to a different namespace?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Not sure ... we will attempt to read it. The customer can use RBAC to prevent this access (in Namespace mode). But in general, it should just work.


if ref.External != "" {
tokens := strings.Split(ref.External, "/")
if len(tokens) == 6 && tokens[0] == "project" && tokens[2] == "locations" && tokens[4] == "keyRings" {
Copy link
Collaborator

Choose a reason for hiding this comment

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

"projects": missing "s" in tokens[0] == "project"

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Great spot - thank you!

@justinsb
Copy link
Collaborator Author

justinsb commented Aug 7, 2024

Thanks for the review @yuwenma - and for spotting project vs projects :-)

Given our new 3 or 4 step process (1a CRD 1b Mappers & Round-Trip Tests 2 Controller and realgcp test 3 mockgcp and tests work there also), I think I will try to get this to 1b ... mappers & a round-trip test!

@justinsb justinsb force-pushed the crd_for_kmscryptokey branch 4 times, most recently from 4c03f2b to 37a6e64 Compare August 7, 2024 21:45
@yuwenma
Copy link
Collaborator

yuwenma commented Aug 14, 2024

/lgtm
/approve

Not sure about the presubmit failure. (could be just a rebase thing)

Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: 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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

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.

None yet

2 participants