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

Add cross namespace resource reference support in code generator #532

Conversation

michaelhtm
Copy link
Member

@michaelhtm michaelhtm commented Jul 18, 2024

Issue #1777

Description of changes:

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@ack-prow ack-prow bot requested review from a-hilaly and jlbutler July 18, 2024 23:49
@michaelhtm michaelhtm changed the title Add namespace support in code generator Add cross namespace resource reference support in code generator Jul 18, 2024
@michaelhtm
Copy link
Member Author

/retest

@michaelhtm michaelhtm force-pushed the resource_reference/namespace-support branch from 29a44dc to b75b3fa Compare July 19, 2024 16:56
@michaelhtm
Copy link
Member Author

/retest

1 similar comment
@michaelhtm
Copy link
Member Author

/retest

@michaelhtm michaelhtm force-pushed the resource_reference/namespace-support branch 5 times, most recently from f8f2534 to 4ba58ad Compare July 19, 2024 21:30
@a-hilaly
Copy link
Member

/hold

@ack-prow ack-prow bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jul 19, 2024
ack-prow bot pushed a commit to aws-controllers-k8s/iam-controller that referenced this pull request Jul 30, 2024
Issue [#1777](aws-controllers-k8s/community#1777)

Description of changes:
* Adding new e2e test suites to validate our recently introduced feature ["cross namespace resource references"](aws-controllers-k8s/code-generator#532). In order to test this feature, we added a new feature to allow new namespace creation, from which resources will be referenced (Policy in this case).

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
Copy link
Member

@a-hilaly a-hilaly left a comment

Choose a reason for hiding this comment

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

Great work on this Michael!! i'll wait for your rebase and a runtime release before we proceed on merging this.

@@ -117,7 +116,6 @@ func validateReferenceFields(ko *svcapitypes.{{ .CRD.Names.Camel }}) error {
func (rm *resourceManager) resolveReferenceFor{{ $field.FieldPathWithUnderscore }}(
ctx context.Context,
apiReader client.Reader,
namespace string,
Copy link
Member

Choose a reason for hiding this comment

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

I like that we're getting rid of unnecessary parameters!


require (
github.com/aws-controllers-k8s/pkg v0.0.12
github.com/aws-controllers-k8s/runtime v0.34.0
github.com/aws-controllers-k8s/runtime v0.35.1-0.20240719172343-a132c887e8d4
Copy link
Member

Choose a reason for hiding this comment

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

Time to make v0.36.0 release :)

.gitignore Outdated
Comment on lines 7 to 9
path/
.vscode/
Copy link
Member

Choose a reason for hiding this comment

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

Let's keep only the ones that are somewhat related to ACK

@ack-prow ack-prow bot added the approved label Aug 1, 2024
* Added ability to reference resources cross namespace
* Needs more testing
@michaelhtm michaelhtm force-pushed the resource_reference/namespace-support branch from 4ba58ad to 391d445 Compare August 5, 2024 21:04
@a-hilaly
Copy link
Member

a-hilaly commented Aug 5, 2024

/retest

Copy link
Member

@a-hilaly a-hilaly left a comment

Choose a reason for hiding this comment

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

Great work on this @michaelhtm
/lgtm
/unhold

@ack-prow ack-prow bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Aug 5, 2024
@ack-prow ack-prow bot added the lgtm Indicates that a PR is ready to be merged. label Aug 5, 2024
Copy link

ack-prow bot commented Aug 5, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: a-hilaly, michaelhtm

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

@ack-prow ack-prow bot merged commit 7c4e088 into aws-controllers-k8s:main Aug 5, 2024
17 of 18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants