bring back CLONE_WAL_BUCKET_SCOPE_PREFIX (#1902)
This commit is contained in:
parent
7c878f8aaa
commit
7d4da92872
|
|
@ -1867,22 +1867,15 @@ func (c *Cluster) generateCloneEnvironment(description *acidv1.CloneDescription)
|
||||||
} else {
|
} else {
|
||||||
c.logger.Debugf("use S3WalPath %s from the manifest", description.S3WalPath)
|
c.logger.Debugf("use S3WalPath %s from the manifest", description.S3WalPath)
|
||||||
|
|
||||||
envs := []v1.EnvVar{
|
result = append(result, v1.EnvVar{
|
||||||
{
|
Name: "CLONE_WALE_S3_PREFIX",
|
||||||
Name: "CLONE_WALE_S3_PREFIX",
|
Value: description.S3WalPath,
|
||||||
Value: description.S3WalPath,
|
})
|
||||||
},
|
|
||||||
{
|
|
||||||
Name: "CLONE_WAL_BUCKET_SCOPE_SUFFIX",
|
|
||||||
Value: "",
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
result = append(result, envs...)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
result = append(result, v1.EnvVar{Name: "CLONE_METHOD", Value: "CLONE_WITH_WALE"})
|
result = append(result, v1.EnvVar{Name: "CLONE_METHOD", Value: "CLONE_WITH_WALE"})
|
||||||
result = append(result, v1.EnvVar{Name: "CLONE_TARGET_TIME", Value: description.EndTimestamp})
|
result = append(result, v1.EnvVar{Name: "CLONE_TARGET_TIME", Value: description.EndTimestamp})
|
||||||
|
result = append(result, v1.EnvVar{Name: "CLONE_WAL_BUCKET_SCOPE_PREFIX", Value: ""})
|
||||||
|
|
||||||
if description.S3Endpoint != "" {
|
if description.S3Endpoint != "" {
|
||||||
result = append(result, v1.EnvVar{Name: "CLONE_AWS_ENDPOINT", Value: description.S3Endpoint})
|
result = append(result, v1.EnvVar{Name: "CLONE_AWS_ENDPOINT", Value: description.S3Endpoint})
|
||||||
|
|
|
||||||
|
|
@ -550,8 +550,8 @@ func TestGenerateSpiloPodEnvVars(t *testing.T) {
|
||||||
envVarValue: "s3://another-bucket",
|
envVarValue: "s3://another-bucket",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
envIndex: 17,
|
envIndex: 19,
|
||||||
envVarConstant: "CLONE_WAL_BUCKET_SCOPE_SUFFIX",
|
envVarConstant: "CLONE_WAL_BUCKET_SCOPE_PREFIX",
|
||||||
envVarValue: "",
|
envVarValue: "",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
@ -572,14 +572,14 @@ func TestGenerateSpiloPodEnvVars(t *testing.T) {
|
||||||
envVarValue: fmt.Sprintf("/%s", dummyUUID),
|
envVarValue: fmt.Sprintf("/%s", dummyUUID),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
envIndex: 20,
|
envIndex: 21,
|
||||||
envVarConstant: "clone_aws_endpoint",
|
envVarConstant: "clone_aws_endpoint",
|
||||||
envVarValue: "s3.eu-west-1.amazonaws.com",
|
envVarValue: "s3.eu-west-1.amazonaws.com",
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
expectedCloneEnvSecret := []ExpectedValue{
|
expectedCloneEnvSecret := []ExpectedValue{
|
||||||
{
|
{
|
||||||
envIndex: 20,
|
envIndex: 21,
|
||||||
envVarConstant: "clone_aws_access_key_id",
|
envVarConstant: "clone_aws_access_key_id",
|
||||||
envVarValueRef: &v1.EnvVarSource{
|
envVarValueRef: &v1.EnvVarSource{
|
||||||
SecretKeyRef: &v1.SecretKeySelector{
|
SecretKeyRef: &v1.SecretKeySelector{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue