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

fix(resolver): Fix client name detection for updates #45

Merged
merged 1 commit into from
Feb 5, 2020

Conversation

paulbdavis
Copy link
Contributor

When the maester creates a client, it adds the namespace to the owner. This fix takes that into account when checking for updates.

Without this patch, the maester fails to update the client with hydra when the k8s admin makes changes to the oauth2client resource in a namespace.

Testing image is available at dangersalad/hydra-maester:v0.0.12-alpha2

@@ -160,7 +160,7 @@ func (r *OAuth2ClientReconciler) Reconcile(req ctrl.Request) (ctrl.Result, error
}

if found {
if fetched.Owner != oauth2client.Name {
if fetched.Owner != fmt.Sprintf("%s/%s", oauth2client.Name, oauth2client.Namespace) {
Copy link
Member

Choose a reason for hiding this comment

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

Shouldn't this be namespace/name?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

when I list the clients with the hydra REST API it's orderd name/namespace. Using hydra 1.2.2

Copy link
Member

Choose a reason for hiding this comment

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

Right, appears to come from here:

Owner: fmt.Sprintf("%s/%s", c.Name, c.Namespace),

@paulbdavis paulbdavis changed the title Fix for update checking fix(resolver): Fix client name detection for updates Feb 5, 2020
@aeneasr aeneasr merged commit f8f51ea into ory:master Feb 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants