-
Notifications
You must be signed in to change notification settings - Fork 0
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
11 separate reconciler to consume zalando status and update into our postgres type #18
11 separate reconciler to consume zalando status and update into our postgres type #18
Conversation
…consume_zalando_status_and_update_into_our_postgres_type
…nto 11_separate_reconciler_to_consume_zalando_status_and_update_into_our_postgres_type
…date_into_our_postgres_type' of https://github.com/fi-ts/postgres-controller into 11_separate_reconciler_to_consume_zalando_status_and_update_into_our_postgres_type
Add UID in zalando postgresql name
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.
Matter of taste
log.Info("fetching postgresql") | ||
instance := &zalando.Postgresql{} | ||
if err := r.Client.Get(ctx, req.NamespacedName, instance); err != nil { | ||
if !errors.IsNotFound(err) { |
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.
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 just doube checked, and I will keep it the way it is so we can log a message that the object was deleted. If we just return, we can't do that.
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 thought the returned err
would contain the info of the object we wanted to fetch. If that's not the case, agreed.
break | ||
} | ||
|
||
if !ownerFound { |
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.
Consider var owner *pg.Postgres
. Then we can evaluate if owner == nil
and don't need an extra variable.
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.
Consider
owner := &ps.Postgres{}
*owner = o
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.
Now that we have a separate owner
and o
variable, we could indeed remove that bool
. It doesn't hurt however, so I will keep it for now.
Implements #11