JobSink: Delete secrets associated with jobs when jobs are deleted #6903
Annotations
3 errors and 1 warning
cmd/jobsink/main.go#L1
Please run goimports.
diff --git a/cmd/jobsink/main.go b/cmd/jobsink/main.go
index 99f6b1f..d430744 100644
--- a/cmd/jobsink/main.go
+++ b/cmd/jobsink/main.go
@@ -19,6 +19,7 @@ package main
import (
"context"
"crypto/md5"
+
//nolint:gosec
"crypto/tls"
"encoding/hex"
@@ -450,6 +451,6 @@ func jobLabelSelector(ref types.NamespacedName, id string) string {
}
func toJobName(js string, source, id string) string {
- h := md5.Sum([]byte(source+id))
- return kmeta.ChildName(js, "-" + utils.ToDNS1123Subdomain(hex.EncodeToString(h[:])))
+ h := md5.Sum([]byte(source + id))
+ return kmeta.ChildName(js, "-"+utils.ToDNS1123Subdomain(hex.EncodeToString(h[:])))
}
|
cmd/jobsink/main_test.go#L1
Please run goimports.
diff --git a/cmd/jobsink/main_test.go b/cmd/jobsink/main_test.go
index 0862d40..0bf31b5 100644
--- a/cmd/jobsink/main_test.go
+++ b/cmd/jobsink/main_test.go
@@ -29,7 +29,7 @@ func TestToJobName(t *testing.T) {
}
for _, tc := range testcases {
- t.Run(tc.JobSinkName + "_" + tc.Source + "_" + tc.Id, func(t *testing.T) {
+ t.Run(tc.JobSinkName+"_"+tc.Source+"_"+tc.Id, func(t *testing.T) {
if errs := validation.NameIsDNS1035Label(tc.JobSinkName, false); len(errs) != 0 {
t.Errorf("Invalid JobSinkName: %v", errs)
}
|
|
|
The logs for this run have expired and are no longer available.
Loading