-
Notifications
You must be signed in to change notification settings - Fork 14
feat(Allow usage of apply command for App CR) : Rebind without the need to delete and create again #103
Conversation
b782a8b
to
4b28a8a
Compare
9c54892
to
12fcfa7
Compare
d126672
to
40bd36d
Compare
a00c4e5
to
dca48fc
Compare
@@ -6,6 +6,7 @@ vendor/ | |||
build/_output | |||
build/_test | |||
cmd/manager/debug | |||
cmd/manager/main |
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.
combine both with cmd/manager/*
?
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.
Hi @damienomurchu,
Tks for your time. Unfortunately, it is not possible. The main.go is in this dir.
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.
Changes look good, needs a rebase which you know.
Haven't verified changes, or run tests yet
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.
Good work @camilamacedo86 . Just reviewed the code, will verify once items are addressed.
// If the Service instance was not found and/or is marked to be deleted | ||
// OR | ||
// if the APP CR was marked to be deleted | ||
if (isAppMarkedToBeDeleted && len(instance.GetFinalizers()) > 0) || mssInstance == nil || mssInstance.GetDeletionTimestamp() != nil { |
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.
@camilamacedo86 Since the mssInstance is initalised as &mobilesecurityservicev1alpha1.MobileSecurityService{}
https://github.com/aerogear/mobile-security-service-operator/pull/103/files#diff-f0c3b61d21a85c4c894842a29ca22af2R151 . Is there a possibility that the mssInstance will ever be nil? And if there is, in what scenario will it be nil?
The way I read this logic is that if the mssInstance is nil and the app CR is not marked for deletion, it will still be deleted. This could be very dangerous if the mssInstance is returned as nil in a case where we do not want to delete the app CR.
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.
The MSS will just be nill when the Service CR/CRD was deleted from the cluster, so if the mss instance is nil each means that we should allow deleting the APP CR.
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.
This is the only scenario where it can be nil?
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.
Yes. I cannot see any other scenario for the MSS be nil. Are you able to see any other scenario?
a640751
to
1b93125
Compare
7807034
to
fcec1d5
Compare
…ed to delete and create again
fcec1d5
to
f439d15
Compare
@camilamacedo86 I've completed the verification steps and the changes are working as expected based on the second last commit. I see there are some feedback items and the build is failing on a new commit now so I haven't added an approve yet. I added a verified label. Feel free to ping me when you want a recheck. |
05070d6
to
3ba3cf9
Compare
846f237
to
72c3054
Compare
7f3e541
to
dbe921c
Compare
…ccross the project
…at need to be changed when the new release of the framework be available
…atest version available 0.8.1
dbe921c
to
13c5a23
Compare
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.
Reviewed code & re-verified functionality. Approving as seems you clarified all PR comments and don't see a reason not to approve now
Motivation
https://issues.jboss.org/browse/AEROGEAR-9268
What
Verification Steps
Use the image: docker.io/cmacedo/mobile-security-service-operator:AEROGEAR-9268
make create-app
againChecklist:
Progress
Additional Notes