Skip to content
Snippets Groups Projects
Unverified Commit 5856bcca authored by Christian Wolf's avatar Christian Wolf Committed by Tobias Gurtzick
Browse files

add rbac for leases, add namespace to cluster issuer

parent e4c0e6a1
No related branches found
No related tags found
No related merge requests found
......@@ -66,3 +66,12 @@ rules:
- create
- get
- update
- apiGroups:
- coordination.k8s.io
resources:
- leases
verbs:
- create
- get
- list
- update
......@@ -43,6 +43,7 @@ type StepClusterIssuerReconciler struct {
// +kubebuilder:rbac:groups=certmanager.step.sm,resources=stepclusterissuers/status,verbs=get;update;patch
// +kubebuilder:rbac:groups="",resources=secrets,verbs=get;list;watch
// +kubebuilder:rbac:groups="",resources=events,verbs=create;patch
// +kubebuilder:rbac:groups="coordination.k8s.io",resources=leases,verbs=create;get;list;update
// Reconcile will read and validate the StepClusterIssuer resources, it will set the
// status condition ready to true if everything is right.
......@@ -68,6 +69,7 @@ func (r *StepClusterIssuerReconciler) Reconcile(ctx context.Context, req ctrl.Re
Namespace: req.Namespace,
Name: iss.Spec.Provisioner.PasswordRef.Name,
}
log.Info("secretNamespaceName", secretNamespaceName)
if err := r.Client.Get(ctx, secretNamespaceName, &secret); err != nil {
log.Error(err, "failed to retrieve StepClusterIssuer provisioner secret", "namespace", secretNamespaceName.Namespace, "name", secretNamespaceName.Name)
if apierrors.IsNotFound(err) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment