mirror of
https://github.com/neondatabase/neon.git
synced 2025-12-26 23:59:58 +00:00
fix: endpoint_storage_addr as String (#12359)
It's not a SocketAddr as we use k8s DNS https://github.com/neondatabase/cloud/issues/19011
This commit is contained in:
@@ -20,7 +20,6 @@ use postgres::NoTls;
|
|||||||
use postgres::error::SqlState;
|
use postgres::error::SqlState;
|
||||||
use remote_storage::{DownloadError, RemotePath};
|
use remote_storage::{DownloadError, RemotePath};
|
||||||
use std::collections::{HashMap, HashSet};
|
use std::collections::{HashMap, HashSet};
|
||||||
use std::net::SocketAddr;
|
|
||||||
use std::os::unix::fs::{PermissionsExt, symlink};
|
use std::os::unix::fs::{PermissionsExt, symlink};
|
||||||
use std::path::Path;
|
use std::path::Path;
|
||||||
use std::process::{Command, Stdio};
|
use std::process::{Command, Stdio};
|
||||||
@@ -218,7 +217,8 @@ pub struct ParsedSpec {
|
|||||||
pub pageserver_connstr: String,
|
pub pageserver_connstr: String,
|
||||||
pub safekeeper_connstrings: Vec<String>,
|
pub safekeeper_connstrings: Vec<String>,
|
||||||
pub storage_auth_token: Option<String>,
|
pub storage_auth_token: Option<String>,
|
||||||
pub endpoint_storage_addr: Option<SocketAddr>,
|
/// k8s dns name and port
|
||||||
|
pub endpoint_storage_addr: Option<String>,
|
||||||
pub endpoint_storage_token: Option<String>,
|
pub endpoint_storage_token: Option<String>,
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -313,13 +313,10 @@ impl TryFrom<ComputeSpec> for ParsedSpec {
|
|||||||
.or(Err("invalid timeline id"))?
|
.or(Err("invalid timeline id"))?
|
||||||
};
|
};
|
||||||
|
|
||||||
let endpoint_storage_addr: Option<SocketAddr> = spec
|
let endpoint_storage_addr: Option<String> = spec
|
||||||
.endpoint_storage_addr
|
.endpoint_storage_addr
|
||||||
.clone()
|
.clone()
|
||||||
.or_else(|| spec.cluster.settings.find("neon.endpoint_storage_addr"))
|
.or_else(|| spec.cluster.settings.find("neon.endpoint_storage_addr"));
|
||||||
.unwrap_or_default()
|
|
||||||
.parse()
|
|
||||||
.ok();
|
|
||||||
let endpoint_storage_token = spec
|
let endpoint_storage_token = spec
|
||||||
.endpoint_storage_token
|
.endpoint_storage_token
|
||||||
.clone()
|
.clone()
|
||||||
|
|||||||
Reference in New Issue
Block a user