From 8d4edcb8bea7426bb811e573e942c15167927e88 Mon Sep 17 00:00:00 2001 From: Ashley Davis Date: Fri, 26 Apr 2024 15:06:21 +0100 Subject: [PATCH 1/2] fix typo in variable name Signed-off-by: Ashley Davis --- internal/approver/evaluator/evaluator.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/approver/evaluator/evaluator.go b/internal/approver/evaluator/evaluator.go index e2fc759f..b83ad4bb 100644 --- a/internal/approver/evaluator/evaluator.go +++ b/internal/approver/evaluator/evaluator.go @@ -26,7 +26,7 @@ import ( ) var ( - requiedUsages = []cmapi.KeyUsage{ + requiredUsages = []cmapi.KeyUsage{ cmapi.UsageKeyEncipherment, cmapi.UsageDigitalSignature, cmapi.UsageClientAuth, @@ -104,8 +104,8 @@ func (i *internal) Evaluate(req *cmapi.CertificateRequest) error { return fmt.Errorf("request contains spec.isCA=true") } - if !util.EqualKeyUsagesUnsorted(req.Spec.Usages, requiedUsages) { - return fmt.Errorf("request contains wrong usages, exp=%v got=%v", requiedUsages, req.Spec.Usages) + if !util.EqualKeyUsagesUnsorted(req.Spec.Usages, requiredUsages) { + return fmt.Errorf("request contains wrong usages, exp=%v got=%v", requiredUsages, req.Spec.Usages) } if err := i.validateIdentity(csr, req.Spec.Username); err != nil { From 7cecc29ff5a7fcd8280698d6b34ada2c07c9142c Mon Sep 17 00:00:00 2001 From: Ashley Davis Date: Fri, 26 Apr 2024 15:06:35 +0100 Subject: [PATCH 2/2] add default container annotation for easier log querying Signed-off-by: Ashley Davis --- deploy/charts/csi-driver-spiffe/templates/daemonset.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/deploy/charts/csi-driver-spiffe/templates/daemonset.yaml b/deploy/charts/csi-driver-spiffe/templates/daemonset.yaml index efee836e..864782ea 100644 --- a/deploy/charts/csi-driver-spiffe/templates/daemonset.yaml +++ b/deploy/charts/csi-driver-spiffe/templates/daemonset.yaml @@ -14,6 +14,8 @@ spec: labels: app: {{ include "cert-manager-csi-driver-spiffe.name" . }} {{- include "cert-manager-csi-driver-spiffe.labels" . | nindent 8 }} + annotations: + kubectl.kubernetes.io/default-container: cert-manager-csi-driver-spiffe spec: {{- with .Values.imagePullSecrets }} imagePullSecrets: