-
Notifications
You must be signed in to change notification settings - Fork 238
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
feat: Add Apigee Envgroup direct controller #3332
base: master
Are you sure you want to change the base?
Conversation
apis/apigee/v1alpha1/googlecloudapigeev1environmentgroup_types.go
Outdated
Show resolved
Hide resolved
Seems to be a failure in presubmit validations, looks like some of the generated files need to be regenerated:
|
Also, looks like you fixed one of the issues in |
f1e817b
to
849e051
Compare
f4b7885
to
8e734cb
Compare
dev/tools/controllerbuilder/pkg/commands/generatetypes/generatetypescommand.go
Outdated
Show resolved
Hide resolved
/lgtm |
e471f42
to
4988777
Compare
/lgtm |
/approve |
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.
/hold
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.
/hold
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 have a few questions related to the LRO and returned value format. Can we upload the real GCP log to show the git-diff?
// New builds a GoogleCloudApigeeV1EnvironmentGroupIdentity from the Config Connector GoogleCloudApigeeV1EnvironmentGroup object. | ||
func NewGoogleCloudApigeeV1EnvironmentGroupIdentity(ctx context.Context, reader client.Reader, obj *ApigeeEnvgroup) (*GoogleCloudApigeeV1EnvironmentGroupIdentity, error) { | ||
// Get Parent | ||
orgRef, err := refs.ResolveOrganization(ctx, reader, obj, obj.Spec.Parent.OrganizationRef) |
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.
We should not do the resolve reference here, because it will block this resource deletion.
Here's the scenario:
Users want to delete both env and org. Org is deleted first and this always returns error. Adapter cannot be initialized and therefore cannot be deleted forever. cc @jasonvigil
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 am not sure that it will be possible to avoid resolving the reference here, because the organization is the parent for this resource. Even in NormalizeExternal
we resolve the resource, if it is not specified in external format.
return nil | ||
} | ||
} | ||
time.Sleep(2 * time.Second) |
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.
How long does this update normally takes?
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.
From testing, it seems to be close to instantaneous (< 1 second)
...resourcefixture/testdata/basic/apigee/v1alpha1/apigeeenvgroup/apigeeenvgroup-basic/_http.log
Show resolved
Hide resolved
...lpha1/apigeeenvgroup/apigeeenvgroup-basic/_generated_object_apigeeenvgroup-basic.golden.yaml
Outdated
Show resolved
Hide resolved
@@ -19,7 +19,6 @@ | |||
[acronyms] crd=apigeeaddonsconfigs.apigee.cnrm.cloud.google.com version=v1alpha1: field ".spec.addonsConfig.advancedApiOpsConfig.enabled" should be ".spec.addonsConfig.advancedAPIOpsConfig.enabled" | |||
[acronyms] crd=apigeeendpointattachments.apigee.cnrm.cloud.google.com version=v1alpha1: field ".spec.orgId" should be ".spec.orgID" | |||
[acronyms] crd=apigeeenvgroupattachments.apigee.cnrm.cloud.google.com version=v1alpha1: field ".spec.envgroupId" should be ".spec.envgroupID" | |||
[acronyms] crd=apigeeenvgroups.apigee.cnrm.cloud.google.com version=v1alpha1: field ".spec.orgId" should be ".spec.orgID" |
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.
Nice!
/remove-approve |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: 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 |
bd24dff
to
9637802
Compare
03caf93
to
282f9fb
Compare
1a0a85c
to
bad6c64
Compare
bad6c64
to
dba7bfd
Compare
/lgtm |
@yuwenma could we merge this in so I can build on top of it too 😆 ? |
Change description
Defines the Apigee Envgroup API
Tests you have done
make ready-pr
to ensure this PR is ready for review.