Skip to content

[DNM]consume ldap bindpwd and external edb certs SPCs #1051

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

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

Tirumalavasa
Copy link
Member

@ibm-ci-bot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Tirumalavasa

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ibm-ci-bot ibm-ci-bot requested review from rashmi43 and rwhundley June 9, 2025 06:11
@Tirumalavasa Tirumalavasa changed the title consume ldap bindpwd and external edb certs SPCs [DNM]consume ldap bindpwd and external edb certs SPCs Jun 9, 2025
@@ -382,7 +383,8 @@ func (r *AuthenticationReconciler) SetupWithManager(mgr ctrl.Manager) error {
Watches(&corev1.Service{}, handler.EnqueueRequestForOwner(mgr.GetScheme(), mgr.GetRESTMapper(), &operatorv1alpha1.Authentication{}, handler.OnlyControllerOwner())).
Watches(&netv1.Ingress{}, handler.EnqueueRequestForOwner(mgr.GetScheme(), mgr.GetRESTMapper(), &operatorv1alpha1.Authentication{}, handler.OnlyControllerOwner())).
Watches(&appsv1.Deployment{}, handler.EnqueueRequestForOwner(mgr.GetScheme(), mgr.GetRESTMapper(), &operatorv1alpha1.Authentication{}, handler.OnlyControllerOwner())).
Watches(&autoscalingv2.HorizontalPodAutoscaler{}, handler.EnqueueRequestForOwner(mgr.GetScheme(), mgr.GetRESTMapper(), &operatorv1alpha1.Authentication{}, handler.OnlyControllerOwner()))
Watches(&autoscalingv2.HorizontalPodAutoscaler{}, handler.EnqueueRequestForOwner(mgr.GetScheme(), mgr.GetRESTMapper(), &operatorv1alpha1.Authentication{}, handler.OnlyControllerOwner())).
Watches(&sscsidriverv1.SecretProviderClass{}, handler.EnqueueRequestForOwner(mgr.GetScheme(), mgr.GetRESTMapper(), &operatorv1alpha1.Authentication{}, handler.OnlyControllerOwner()))

Choose a reason for hiding this comment

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

shouldn't this be conditional, only if SSCSI driver installed?

spc := &sscsidriverv1.SecretProviderClass{}
if ctrlcommon.ClusterHasCSIGroupVersion(&r.DiscoveryClient) {
reqLogger.Info("TML:: SPC object found")
err := r.Client.Get(ctx, types.NamespacedName{Name: spcName, Namespace: namespace}, spc)

Choose a reason for hiding this comment

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

In the spec, it was defined that the lookup of SPC CR is by the label-based lookup, not based on the name. I like though lookup by name - it's more prescriptive and less error prone (e.g. multiple SPC CRs with the same labels in the same namespace)

err := r.Client.Get(ctx, types.NamespacedName{Name: spcName, Namespace: namespace}, spc)
return err == nil
}
reqLogger.Info("TML:: SPC object not-found")

Choose a reason for hiding this comment

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

pls cleanup logging before submitting the PR

Copy link
Member Author

Choose a reason for hiding this comment

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

Done.

@Tirumalavasa Tirumalavasa changed the title [DNM]consume ldap bindpwd and external edb certs SPCs consume ldap bindpwd and external edb certs SPCs Jun 11, 2025
@Tirumalavasa Tirumalavasa changed the title consume ldap bindpwd and external edb certs SPCs [DNM]consume ldap bindpwd and external edb certs SPCs Jun 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants