Skip to content

Commit

Permalink
update: review comments
Browse files Browse the repository at this point in the history
Signed-off-by: Wen Zhou <[email protected]>
  • Loading branch information
zdtsw committed Oct 14, 2024
1 parent 277cc87 commit 2d7737b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
6 changes: 2 additions & 4 deletions controllers/dscinitialization/dscinitialization_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -215,10 +215,8 @@ func (r *DSCInitializationReconciler) Reconcile(ctx context.Context, req ctrl.Re
return ctrl.Result{}, nil
default:
createUsergroup, err := cluster.IsDefaultAuthMethod(ctx, r.Client)
if err != nil {
if !k8serr.IsNotFound(err) { // only keep reconcile if real error but not missing CRD or missing CR
return ctrl.Result{}, err
}
if err != nil && !k8serr.IsNotFound(err) { // only keep reconcile if real error but not missing CRD or missing CR
return ctrl.Result{}, err
}

switch platform {
Expand Down
2 changes: 1 addition & 1 deletion pkg/cluster/cluster_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -241,5 +241,5 @@ func IsDefaultAuthMethod(ctx context.Context, cli client.Client) (bool, error) {
// for now, HPC support "" "None" "IntegratedOAuth"(default) "OIDC"
// other offering support "" "None" "IntegratedOAuth"(default)
// we only create userGroups for "IntegratedOAuth" or "" and leave other or new supported type value in the future
return (authenticationobj.Spec.Type == configv1.AuthenticationTypeIntegratedOAuth || authenticationobj.Spec.Type == ""), nil
return authenticationobj.Spec.Type == configv1.AuthenticationTypeIntegratedOAuth || authenticationobj.Spec.Type == "", nil
}

0 comments on commit 2d7737b

Please sign in to comment.