Skip to content

Commit 7d4da92

Browse files
authored
bring back CLONE_WAL_BUCKET_SCOPE_PREFIX (#1902)
1 parent 7c878f8 commit 7d4da92

File tree

2 files changed

+9
-16
lines changed

2 files changed

+9
-16
lines changed

pkg/cluster/k8sres.go

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1867,22 +1867,15 @@ func (c *Cluster) generateCloneEnvironment(description *acidv1.CloneDescription)
18671867
} else {
18681868
c.logger.Debugf("use S3WalPath %s from the manifest", description.S3WalPath)
18691869

1870-
envs := []v1.EnvVar{
1871-
{
1872-
Name: "CLONE_WALE_S3_PREFIX",
1873-
Value: description.S3WalPath,
1874-
},
1875-
{
1876-
Name: "CLONE_WAL_BUCKET_SCOPE_SUFFIX",
1877-
Value: "",
1878-
},
1879-
}
1880-
1881-
result = append(result, envs...)
1870+
result = append(result, v1.EnvVar{
1871+
Name: "CLONE_WALE_S3_PREFIX",
1872+
Value: description.S3WalPath,
1873+
})
18821874
}
18831875

18841876
result = append(result, v1.EnvVar{Name: "CLONE_METHOD", Value: "CLONE_WITH_WALE"})
18851877
result = append(result, v1.EnvVar{Name: "CLONE_TARGET_TIME", Value: description.EndTimestamp})
1878+
result = append(result, v1.EnvVar{Name: "CLONE_WAL_BUCKET_SCOPE_PREFIX", Value: ""})
18861879

18871880
if description.S3Endpoint != "" {
18881881
result = append(result, v1.EnvVar{Name: "CLONE_AWS_ENDPOINT", Value: description.S3Endpoint})

pkg/cluster/k8sres_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -550,8 +550,8 @@ func TestGenerateSpiloPodEnvVars(t *testing.T) {
550550
envVarValue: "s3://another-bucket",
551551
},
552552
{
553-
envIndex: 17,
554-
envVarConstant: "CLONE_WAL_BUCKET_SCOPE_SUFFIX",
553+
envIndex: 19,
554+
envVarConstant: "CLONE_WAL_BUCKET_SCOPE_PREFIX",
555555
envVarValue: "",
556556
},
557557
{
@@ -572,14 +572,14 @@ func TestGenerateSpiloPodEnvVars(t *testing.T) {
572572
envVarValue: fmt.Sprintf("/%s", dummyUUID),
573573
},
574574
{
575-
envIndex: 20,
575+
envIndex: 21,
576576
envVarConstant: "clone_aws_endpoint",
577577
envVarValue: "s3.eu-west-1.amazonaws.com",
578578
},
579579
}
580580
expectedCloneEnvSecret := []ExpectedValue{
581581
{
582-
envIndex: 20,
582+
envIndex: 21,
583583
envVarConstant: "clone_aws_access_key_id",
584584
envVarValueRef: &v1.EnvVarSource{
585585
SecretKeyRef: &v1.SecretKeySelector{

0 commit comments

Comments
 (0)