Skip to content

Commit

Permalink
Merge pull request cert-manager#123 from SgtCoDFish/tweaks
Browse files Browse the repository at this point in the history
Two minor tweaks
  • Loading branch information
cert-manager-prow[bot] authored Apr 26, 2024
2 parents 48b757d + 7cecc29 commit 6937a86
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions deploy/charts/csi-driver-spiffe/templates/daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
6 changes: 3 additions & 3 deletions internal/approver/evaluator/evaluator.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import (
)

var (
requiedUsages = []cmapi.KeyUsage{
requiredUsages = []cmapi.KeyUsage{
cmapi.UsageKeyEncipherment,
cmapi.UsageDigitalSignature,
cmapi.UsageClientAuth,
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit 6937a86

Please sign in to comment.