Skip to content

Commit

Permalink
Merge pull request #2149 from ConnorJC3/paperuct-bandaid
Browse files Browse the repository at this point in the history
Fix four small papercuts
  • Loading branch information
k8s-ci-robot authored Sep 20, 2024
2 parents deb9544 + 6386a2c commit 502677c
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 22 deletions.
4 changes: 0 additions & 4 deletions charts/aws-ebs-csi-driver/templates/controller.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,7 @@ spec:
image: {{ printf "%s%s:%s" (default "" .Values.image.containerRegistry) .Values.image.repository (default (printf "v%s" .Chart.AppVersion) (.Values.image.tag | toString)) }}
imagePullPolicy: {{ .Values.image.pullPolicy }}
args:
{{- if ne .Release.Name "kustomize" }}
- controller
{{- else }}
# - {all,controller,node} # specify the driver mode
{{- end }}
- --endpoint=$(CSI_ENDPOINT)
{{- if .Values.controller.extraVolumeTags }}
{{- include "aws-ebs-csi-driver.extra-volume-tags" . | nindent 12 }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,6 @@ metadata:
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
{{- if eq .Release.Name "kustomize" }}
#Enable if EKS IAM roles for service accounts (IRSA) is used. See https://docs.aws.amazon.com/eks/latest/userguide/iam-roles-for-service-accounts.html for details.
#annotations:
# eks.amazonaws.com/role-arn: arn:<partition>:iam::<account>:role/ebs-csi-role
{{- end }}
{{- if .Values.controller.serviceAccount.automountServiceAccountToken }}
automountServiceAccountToken: {{ .Values.controller.serviceAccount.automountServiceAccountToken }}
{{- end }}
Expand Down
2 changes: 1 addition & 1 deletion deploy/kubernetes/base/controller.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ spec:
image: public.ecr.aws/ebs-csi-driver/aws-ebs-csi-driver:v1.35.0
imagePullPolicy: IfNotPresent
args:
# - {all,controller,node} # specify the driver mode
- controller
- --endpoint=$(CSI_ENDPOINT)
- --batching=true
- --logging-format=text
Expand Down
3 changes: 0 additions & 3 deletions deploy/kubernetes/base/serviceaccount-csi-controller.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,4 @@ metadata:
name: ebs-csi-controller-sa
labels:
app.kubernetes.io/name: aws-ebs-csi-driver
#Enable if EKS IAM roles for service accounts (IRSA) is used. See https://docs.aws.amazon.com/eks/latest/userguide/iam-roles-for-service-accounts.html for details.
#annotations:
# eks.amazonaws.com/role-arn: arn:<partition>:iam::<account>:role/ebs-csi-role
automountServiceAccountToken: true
3 changes: 2 additions & 1 deletion hack/e2e/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,8 @@ else

set -x
set +e
"${BIN}/kubetest2" noop \
# kubetest2 looks for deployers/testers in $PATH
PATH="${BIN}:${PATH}" "${BIN}/kubetest2" noop \
--run-id="e2e-kubernetes" \
--test=ginkgo \
-- \
Expand Down
17 changes: 11 additions & 6 deletions pkg/cloud/devicemanager/allocator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,17 +68,22 @@ func TestNameAllocatorLikelyBadName(t *testing.T) {
})
}

// Test likely bad name fallback when it is the only device name available
// We should receive the likely bad device name because it is the only option left
lastName, _ := allocator.GetNext(existingNames, likelyBadNames)
if lastName != skippedNameNew {
t.Errorf("test %q: expected %q, got %q (likelyBadNames fallback)", skippedNameNew, skippedNameNew, lastName)
}
existingNames[skippedNameNew] = ""

// Test likely bad name fallback when the likely bad device name already exists
// Because the device name already exists, this should return an error
onlyExisting := new(sync.Map)
onlyExisting.Store(skippedNameExisting, struct{}{})
_, err := allocator.GetNext(existingNames, onlyExisting)
if err != nil {
if err == nil {
t.Errorf("got nil when error expected (likelyBadNames with only existing names)")
}

lastName, _ := allocator.GetNext(existingNames, likelyBadNames)
if lastName != skippedNameNew {
t.Errorf("test %q: expected %q, got %q (likelyBadNames fallback)", skippedNameNew, skippedNameNew, lastName)
}
}

func TestNameAllocatorError(t *testing.T) {
Expand Down
4 changes: 2 additions & 2 deletions pkg/expiringcache/expiring_cache_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ import (
)

const (
testExpiration = time.Millisecond * 50
testSleep = time.Millisecond * 35
testExpiration = time.Millisecond * 100
testSleep = time.Millisecond * 80
testKey = "key"
)

Expand Down

0 comments on commit 502677c

Please sign in to comment.