mirror of
https://github.com/lukaszraczylo/kubernetes-images-sync-operator.git
synced 2026-10-18 01:17:52 +00:00
fix(lint): resolve all golangci-lint findings
Migrate the lint config to the v2 format. Replace the deprecated scheme.Builder with runtime.NewSchemeBuilder. Handle Close errors in the worker and replace repeated strings with constants. Remove unused parameters and use switch statements where the linter asks.
This commit is contained in:
@@ -59,7 +59,7 @@ func CreateJob[T any](params JobParams, setupFunc func(T) []string) *batchv1.Job
|
||||
Namespace: params.Namespace,
|
||||
OwnerReferences: params.OwnerReferences,
|
||||
Labels: map[string]string{
|
||||
"app": "image-export",
|
||||
LABEL_APP: "image-export",
|
||||
},
|
||||
Annotations: params.Annotations,
|
||||
},
|
||||
@@ -69,7 +69,7 @@ func CreateJob[T any](params JobParams, setupFunc func(T) []string) *batchv1.Job
|
||||
Template: corev1.PodTemplateSpec{
|
||||
ObjectMeta: metav1.ObjectMeta{
|
||||
Labels: map[string]string{
|
||||
"app": "image-export",
|
||||
LABEL_APP: "image-export",
|
||||
},
|
||||
Annotations: params.Annotations,
|
||||
},
|
||||
@@ -80,7 +80,7 @@ func CreateJob[T any](params JobParams, setupFunc func(T) []string) *batchv1.Job
|
||||
Volumes: volumes,
|
||||
Containers: []corev1.Container{
|
||||
{
|
||||
Name: "exporter",
|
||||
Name: EXPORTER_CONTAINER,
|
||||
Image: params.Image,
|
||||
TTY: true,
|
||||
Command: []string{},
|
||||
|
||||
Reference in New Issue
Block a user