fix(hermes): replace remaining /cache literals with cachePath constant
The prior commit introduced the cachePath constant but never updated its call sites. Replace the two VolumeMount MountPath literals and the RESTIC_CACHE_DIR env value with cachePath to finish deduplicating the Sonar-flagged repeated string literal. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
parent
51133b559a
commit
f21833e787
@ -44,7 +44,7 @@ func buildBackupJob(cfg *config.Config, req api.BackupRequest, jobName, secretNa
|
||||
Resources: jobResources(cfg),
|
||||
VolumeMounts: []corev1.VolumeMount{
|
||||
{Name: "data", MountPath: "/data", ReadOnly: true},
|
||||
{Name: "cache", MountPath: "/cache"},
|
||||
{Name: "cache", MountPath: cachePath},
|
||||
},
|
||||
},
|
||||
},
|
||||
@ -117,7 +117,7 @@ func buildRestoreJob(cfg *config.Config, req api.RestoreTestRequest, jobName, se
|
||||
Resources: jobResources(cfg),
|
||||
VolumeMounts: []corev1.VolumeMount{
|
||||
{Name: "restore", MountPath: "/restore"},
|
||||
{Name: "cache", MountPath: "/cache"},
|
||||
{Name: "cache", MountPath: cachePath},
|
||||
},
|
||||
},
|
||||
},
|
||||
@ -260,7 +260,7 @@ func resticEnv(cfg *config.Config, secretName, repository string) []corev1.EnvVa
|
||||
}
|
||||
env := []corev1.EnvVar{
|
||||
{Name: "RESTIC_REPOSITORY", Value: repository},
|
||||
{Name: "RESTIC_CACHE_DIR", Value: "/cache"},
|
||||
{Name: "RESTIC_CACHE_DIR", Value: cachePath},
|
||||
{
|
||||
Name: "AWS_ACCESS_KEY_ID",
|
||||
ValueFrom: &corev1.EnvVarSource{SecretKeyRef: &corev1.SecretKeySelector{LocalObjectReference: corev1.LocalObjectReference{Name: secretName}, Key: "AWS_ACCESS_KEY_ID"}},
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user