mirror of
https://github.com/jlengrand/engine.git
synced 2026-03-10 08:11:21 +00:00
Merge branch 'dev' into feat/ENG_1181_del_replaced_PENDING_pods
This commit is contained in:
5
.github/workflows/tests.yml
vendored
5
.github/workflows/tests.yml
vendored
@@ -17,7 +17,9 @@ jobs:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
toolchain: stable
|
||||
toolchain: 1.60.0
|
||||
components: rustfmt, clippy
|
||||
|
||||
- uses: hashicorp/setup-terraform@v1
|
||||
with:
|
||||
terraform_version: 0.14.10
|
||||
@@ -30,7 +32,6 @@ jobs:
|
||||
run: |
|
||||
echo "########## LINTER ##########"
|
||||
cargo fmt --all -- --check --color=always || (echo "Use cargo fmt to format your code"; exit 1)
|
||||
rustup component add clippy
|
||||
cargo clippy --locked --all --all-features --lib -- -D warnings || (echo "Solve your clippy warnings to continue"; exit 1)
|
||||
export PATH=$GITHUB_WORKSPACE/bin:$PATH
|
||||
export RUSTC_WRAPPER=$GITHUB_WORKSPACE/bin/sccache
|
||||
|
||||
@@ -436,10 +436,7 @@ where
|
||||
service.selector(),
|
||||
);
|
||||
|
||||
helm.upgrade(&chart, &[])
|
||||
.map_err(|e| helm::to_engine_error(&event_details, e))?;
|
||||
|
||||
delete_pending_service(
|
||||
let is_pending = is_pending_service(
|
||||
kubernetes_config_file_path.as_str(),
|
||||
environment.namespace(),
|
||||
service.selector().unwrap_or_default().as_str(),
|
||||
@@ -447,6 +444,19 @@ where
|
||||
event_details.clone(),
|
||||
)?;
|
||||
|
||||
helm.upgrade(&chart, &[])
|
||||
.map_err(|e| helm::to_engine_error(&event_details, e))?;
|
||||
|
||||
if is_pending {
|
||||
delete_pending_service(
|
||||
kubernetes_config_file_path.as_str(),
|
||||
environment.namespace(),
|
||||
service.selector().unwrap_or_default().as_str(),
|
||||
kubernetes.cloud_provider().credentials_environment_variables(),
|
||||
event_details.clone(),
|
||||
)?;
|
||||
}
|
||||
|
||||
crate::cmd::kubectl::kubectl_exec_is_pod_ready_with_retry(
|
||||
kubernetes_config_file_path.as_str(),
|
||||
environment.namespace(),
|
||||
@@ -1371,7 +1381,7 @@ fn delete_pending_service<P>(
|
||||
where
|
||||
P: AsRef<Path>,
|
||||
{
|
||||
match kubectl_exec_get_pods(kubernetes_config, Some(namespace), Some(selector), envs.clone()) {
|
||||
match kubectl_exec_get_pods(&kubernetes_config, Some(namespace), Some(selector), envs.clone()) {
|
||||
Ok(pods) => {
|
||||
for pod in pods.items {
|
||||
if pod.status.phase == KubernetesPodStatusPhase::Pending {
|
||||
@@ -1391,3 +1401,26 @@ where
|
||||
Err(e) => Err(EngineError::new_k8s_service_issue(event_details, e)),
|
||||
}
|
||||
}
|
||||
|
||||
fn is_pending_service<P>(
|
||||
kubernetes_config: P,
|
||||
namespace: &str,
|
||||
selector: &str,
|
||||
envs: Vec<(&str, &str)>,
|
||||
event_details: EventDetails,
|
||||
) -> Result<bool, EngineError>
|
||||
where
|
||||
P: AsRef<Path>,
|
||||
{
|
||||
match kubectl_exec_get_pods(&kubernetes_config, Some(namespace), Some(selector), envs.clone()) {
|
||||
Ok(pods) => {
|
||||
for pod in pods.items {
|
||||
if pod.status.phase == KubernetesPodStatusPhase::Pending {
|
||||
Ok(true)
|
||||
}
|
||||
}
|
||||
Ok(false)
|
||||
}
|
||||
Err(e) => Err(EngineError::new_k8s_service_issue(event_details, e)),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,8 +26,7 @@ pub const AWS_REGION_FOR_S3: AwsRegion = AwsRegion::EuWest3;
|
||||
pub const AWS_TEST_REGION: AwsRegion = AwsRegion::EuWest3;
|
||||
pub const AWS_KUBERNETES_MAJOR_VERSION: u8 = 1;
|
||||
pub const AWS_KUBERNETES_MINOR_VERSION: u8 = 19;
|
||||
pub const AWS_KUBERNETES_VERSION: &'static str =
|
||||
formatcp!("{}.{}", AWS_KUBERNETES_MAJOR_VERSION, AWS_KUBERNETES_MINOR_VERSION);
|
||||
pub const AWS_KUBERNETES_VERSION: &str = formatcp!("{}.{}", AWS_KUBERNETES_MAJOR_VERSION, AWS_KUBERNETES_MINOR_VERSION);
|
||||
pub const AWS_DATABASE_INSTANCE_TYPE: &str = "db.t3.micro";
|
||||
pub const AWS_DATABASE_DISK_TYPE: &str = "gp2";
|
||||
pub const AWS_RESOURCE_TTL_IN_SECONDS: u32 = 7200;
|
||||
@@ -59,7 +58,7 @@ pub fn container_registry_ecr(context: &Context, logger: Box<dyn Logger>) -> ECR
|
||||
|
||||
pub fn aws_default_engine_config(context: &Context, logger: Box<dyn Logger>) -> EngineConfig {
|
||||
AWS::docker_cr_engine(
|
||||
&context,
|
||||
context,
|
||||
logger,
|
||||
AWS_TEST_REGION.to_string().as_str(),
|
||||
KubernetesKind::Eks,
|
||||
@@ -216,19 +215,19 @@ impl Cluster<AWS, Options> for AWS {
|
||||
.EKS_ACCESS_CIDR_BLOCKS
|
||||
.as_ref()
|
||||
.unwrap()
|
||||
.replace("\"", "")
|
||||
.replace("[", "")
|
||||
.replace("]", "")
|
||||
.split(",")
|
||||
.replace('\"', "")
|
||||
.replace('[', "")
|
||||
.replace(']', "")
|
||||
.split(',')
|
||||
.map(|c| c.to_string())
|
||||
.collect(),
|
||||
ec2_access_cidr_blocks: secrets
|
||||
.EKS_ACCESS_CIDR_BLOCKS // FIXME ? use an EC2_ACCESS_CIDR_BLOCKS?
|
||||
.unwrap()
|
||||
.replace("\"", "")
|
||||
.replace("[", "")
|
||||
.replace("]", "")
|
||||
.split(",")
|
||||
.replace('\"', "")
|
||||
.replace('[', "")
|
||||
.replace(']', "")
|
||||
.split(',')
|
||||
.map(|c| c.to_string())
|
||||
.collect(),
|
||||
rds_cidr_subnet: "23".to_string(),
|
||||
|
||||
@@ -220,9 +220,9 @@ pub fn environment_3_apps_3_routers_3_databases(
|
||||
database_disk_type: &str,
|
||||
provider_kind: Kind,
|
||||
) -> EnvironmentRequest {
|
||||
let app_name_1 = format!("{}-{}", "simple-app-1".to_string(), generate_id());
|
||||
let app_name_2 = format!("{}-{}", "simple-app-2".to_string(), generate_id());
|
||||
let app_name_3 = format!("{}-{}", "simple-app-3".to_string(), generate_id());
|
||||
let app_name_1 = format!("{}-{}", "simple-app-1", generate_id());
|
||||
let app_name_2 = format!("{}-{}", "simple-app-2", generate_id());
|
||||
let app_name_3 = format!("{}-{}", "simple-app-3", generate_id());
|
||||
|
||||
// mongoDB management part
|
||||
let database_host_mongo = get_svc_name(DatabaseKind::Mongodb, provider_kind.clone()).to_string();
|
||||
@@ -248,7 +248,7 @@ pub fn environment_3_apps_3_routers_3_databases(
|
||||
let database_name = "postgres".to_string();
|
||||
|
||||
// pSQL 2 management part
|
||||
let fqdn_2 = format!("{}2", get_svc_name(DatabaseKind::Postgresql, provider_kind.clone()));
|
||||
let fqdn_2 = format!("{}2", get_svc_name(DatabaseKind::Postgresql, provider_kind));
|
||||
let database_username_2 = "superuser2".to_string();
|
||||
let database_name_2 = "postgres2".to_string();
|
||||
|
||||
@@ -380,9 +380,9 @@ pub fn environment_3_apps_3_routers_3_databases(
|
||||
environment_vars: btreemap! {
|
||||
"IS_DOCUMENTDB".to_string() => base64::encode("false"),
|
||||
"QOVERY_DATABASE_TESTING_DATABASE_FQDN".to_string() => base64::encode(database_host_mongo.clone()),
|
||||
"QOVERY_DATABASE_MY_DDB_CONNECTION_URI".to_string() => base64::encode(database_uri_mongo.clone()),
|
||||
"QOVERY_DATABASE_MY_DDB_CONNECTION_URI".to_string() => base64::encode(database_uri_mongo),
|
||||
"QOVERY_DATABASE_TESTING_DATABASE_PORT".to_string() => base64::encode(database_port_mongo.to_string()),
|
||||
"MONGODB_DBNAME".to_string() => base64::encode(&database_db_name_mongo.clone()),
|
||||
"MONGODB_DBNAME".to_string() => base64::encode(&database_db_name_mongo),
|
||||
"QOVERY_DATABASE_TESTING_DATABASE_USERNAME".to_string() => base64::encode(database_username_mongo.clone()),
|
||||
"QOVERY_DATABASE_TESTING_DATABASE_PASSWORD".to_string() => base64::encode(database_password_mongo.clone()),
|
||||
},
|
||||
@@ -409,12 +409,12 @@ pub fn environment_3_apps_3_routers_3_databases(
|
||||
long_id: Uuid::new_v4(),
|
||||
name: "main".to_string(),
|
||||
action: Action::Create,
|
||||
default_domain: format!("{}.{}.{}", generate_id(), context.cluster_id().to_string(), test_domain),
|
||||
default_domain: format!("{}.{}.{}", generate_id(), context.cluster_id(), test_domain),
|
||||
public_port: 443,
|
||||
custom_domains: vec![],
|
||||
routes: vec![Route {
|
||||
path: "/app1".to_string(),
|
||||
application_name: app_name_1.clone(),
|
||||
application_name: app_name_1,
|
||||
}],
|
||||
sticky_sessions_enabled: false,
|
||||
},
|
||||
@@ -422,12 +422,12 @@ pub fn environment_3_apps_3_routers_3_databases(
|
||||
long_id: Uuid::new_v4(),
|
||||
name: "second-router".to_string(),
|
||||
action: Action::Create,
|
||||
default_domain: format!("{}.{}.{}", generate_id(), context.cluster_id().to_string(), test_domain),
|
||||
default_domain: format!("{}.{}.{}", generate_id(), context.cluster_id(), test_domain),
|
||||
public_port: 443,
|
||||
custom_domains: vec![],
|
||||
routes: vec![Route {
|
||||
path: "/app2".to_string(),
|
||||
application_name: app_name_2.clone(),
|
||||
application_name: app_name_2,
|
||||
}],
|
||||
sticky_sessions_enabled: false,
|
||||
},
|
||||
@@ -435,12 +435,12 @@ pub fn environment_3_apps_3_routers_3_databases(
|
||||
long_id: Uuid::new_v4(),
|
||||
name: "third-router".to_string(),
|
||||
action: Action::Create,
|
||||
default_domain: format!("{}.{}.{}", generate_id(), context.cluster_id().to_string(), test_domain),
|
||||
default_domain: format!("{}.{}.{}", generate_id(), context.cluster_id(), test_domain),
|
||||
public_port: 443,
|
||||
custom_domains: vec![],
|
||||
routes: vec![Route {
|
||||
path: "/app3".to_string(),
|
||||
application_name: app_name_3.clone(),
|
||||
application_name: app_name_3,
|
||||
}],
|
||||
sticky_sessions_enabled: false,
|
||||
},
|
||||
@@ -450,12 +450,12 @@ pub fn environment_3_apps_3_routers_3_databases(
|
||||
kind: DatabaseKind::Postgresql,
|
||||
action: Action::Create,
|
||||
long_id: Uuid::new_v4(),
|
||||
name: database_name.clone(),
|
||||
name: database_name,
|
||||
version: "11.8.0".to_string(),
|
||||
fqdn_id: fqdn.clone(),
|
||||
fqdn: fqdn.clone(),
|
||||
port: database_port.clone(),
|
||||
username: database_username.clone(),
|
||||
fqdn,
|
||||
port: database_port,
|
||||
username: database_username,
|
||||
password: database_password.clone(),
|
||||
total_cpus: "100m".to_string(),
|
||||
total_ram_in_mib: 512,
|
||||
@@ -472,13 +472,13 @@ pub fn environment_3_apps_3_routers_3_databases(
|
||||
kind: DatabaseKind::Postgresql,
|
||||
action: Action::Create,
|
||||
long_id: Uuid::new_v4(),
|
||||
name: database_name_2.clone(),
|
||||
name: database_name_2,
|
||||
version: "11.8.0".to_string(),
|
||||
fqdn_id: fqdn_2.clone(),
|
||||
fqdn: fqdn_2.clone(),
|
||||
port: database_port.clone(),
|
||||
username: database_username_2.clone(),
|
||||
password: database_password.clone(),
|
||||
fqdn: fqdn_2,
|
||||
port: database_port,
|
||||
username: database_username_2,
|
||||
password: database_password,
|
||||
total_cpus: "100m".to_string(),
|
||||
total_ram_in_mib: 512,
|
||||
disk_size_in_gib: 10,
|
||||
@@ -494,13 +494,13 @@ pub fn environment_3_apps_3_routers_3_databases(
|
||||
kind: DatabaseKind::Mongodb,
|
||||
action: Action::Create,
|
||||
long_id: Uuid::new_v4(),
|
||||
name: database_db_name_mongo.clone(),
|
||||
name: database_db_name_mongo,
|
||||
version: version_mongo.to_string(),
|
||||
fqdn_id: database_host_mongo.clone(),
|
||||
fqdn: database_host_mongo.clone(),
|
||||
port: database_port_mongo.clone(),
|
||||
username: database_username_mongo.clone(),
|
||||
password: database_password_mongo.clone(),
|
||||
fqdn: database_host_mongo,
|
||||
port: database_port_mongo,
|
||||
username: database_username_mongo,
|
||||
password: database_password_mongo,
|
||||
total_cpus: "100m".to_string(),
|
||||
total_ram_in_mib: 512,
|
||||
disk_size_in_gib: 10,
|
||||
@@ -520,9 +520,9 @@ pub fn environment_3_apps_3_routers_3_databases(
|
||||
pub fn working_minimal_environment(context: &Context, test_domain: &str) -> EnvironmentRequest {
|
||||
let suffix = generate_id();
|
||||
let application_id = generate_id();
|
||||
let application_name = format!("{}-{}", "simple-app".to_string(), &suffix);
|
||||
let application_name = format!("{}-{}", "simple-app", &suffix);
|
||||
let router_name = "main".to_string();
|
||||
let application_domain = format!("{}.{}.{}", application_id, context.cluster_id().to_string(), test_domain);
|
||||
let application_domain = format!("{}.{}.{}", application_id, context.cluster_id(), test_domain);
|
||||
EnvironmentRequest {
|
||||
execution_id: context.execution_id().to_string(),
|
||||
id: generate_id(),
|
||||
@@ -572,7 +572,7 @@ pub fn working_minimal_environment(context: &Context, test_domain: &str) -> Envi
|
||||
custom_domains: vec![],
|
||||
routes: vec![Route {
|
||||
path: "/".to_string(),
|
||||
application_name: format!("{}-{}", "simple-app".to_string(), &suffix),
|
||||
application_name: format!("{}-{}", "simple-app", &suffix),
|
||||
}],
|
||||
sticky_sessions_enabled: false,
|
||||
}],
|
||||
@@ -583,7 +583,7 @@ pub fn working_minimal_environment(context: &Context, test_domain: &str) -> Envi
|
||||
|
||||
pub fn database_test_environment(context: &Context) -> EnvironmentRequest {
|
||||
let suffix = generate_id();
|
||||
let application_name = format!("{}-{}", "simple-app".to_string(), &suffix);
|
||||
let application_name = format!("{}-{}", "simple-app", &suffix);
|
||||
|
||||
EnvironmentRequest {
|
||||
execution_id: context.execution_id().to_string(),
|
||||
@@ -625,7 +625,7 @@ pub fn database_test_environment(context: &Context) -> EnvironmentRequest {
|
||||
|
||||
pub fn database_test_environment_on_upgrade(context: &Context) -> EnvironmentRequest {
|
||||
let suffix = "c3dn5so3dltod3s";
|
||||
let application_name = format!("{}-{}", "simple-app".to_string(), &suffix);
|
||||
let application_name = format!("{}-{}", "simple-app", &suffix);
|
||||
|
||||
EnvironmentRequest {
|
||||
execution_id: context.execution_id().to_string(),
|
||||
@@ -669,7 +669,7 @@ pub fn environment_only_http_server_router_with_sticky_session(
|
||||
context: &Context,
|
||||
test_domain: &str,
|
||||
) -> EnvironmentRequest {
|
||||
let mut env = environment_only_http_server_router(context, test_domain.clone());
|
||||
let mut env = environment_only_http_server_router(context, test_domain);
|
||||
|
||||
for mut router in &mut env.routers {
|
||||
router.sticky_sessions_enabled = true;
|
||||
@@ -689,7 +689,7 @@ pub fn environnement_2_app_2_routers_1_psql(
|
||||
|
||||
let database_port = 5432;
|
||||
let database_username = "superuser".to_string();
|
||||
let database_password = generate_password(provider_kind.clone(), DatabaseMode::CONTAINER);
|
||||
let database_password = generate_password(provider_kind, DatabaseMode::CONTAINER);
|
||||
let database_name = "postgres".to_string();
|
||||
|
||||
let suffix = generate_id();
|
||||
@@ -711,7 +711,7 @@ pub fn environnement_2_app_2_routers_1_psql(
|
||||
version: "11.8.0".to_string(),
|
||||
fqdn_id: fqdn.clone(),
|
||||
fqdn: fqdn.clone(),
|
||||
port: database_port.clone(),
|
||||
port: database_port,
|
||||
username: database_username.clone(),
|
||||
password: database_password.clone(),
|
||||
total_cpus: "100m".to_string(),
|
||||
@@ -797,11 +797,11 @@ pub fn environnement_2_app_2_routers_1_psql(
|
||||
snapshot_retention_in_days: 0,
|
||||
}],
|
||||
environment_vars: btreemap! {
|
||||
"PG_DBNAME".to_string() => base64::encode(database_name.clone()),
|
||||
"PG_HOST".to_string() => base64::encode(fqdn.clone()),
|
||||
"PG_DBNAME".to_string() => base64::encode(database_name),
|
||||
"PG_HOST".to_string() => base64::encode(fqdn),
|
||||
"PG_PORT".to_string() => base64::encode(database_port.to_string()),
|
||||
"PG_USERNAME".to_string() => base64::encode(database_username.clone()),
|
||||
"PG_PASSWORD".to_string() => base64::encode(database_password.clone()),
|
||||
"PG_USERNAME".to_string() => base64::encode(database_username),
|
||||
"PG_PASSWORD".to_string() => base64::encode(database_password),
|
||||
},
|
||||
branch: "master".to_string(),
|
||||
ports: vec![Port {
|
||||
@@ -826,12 +826,12 @@ pub fn environnement_2_app_2_routers_1_psql(
|
||||
long_id: Uuid::new_v4(),
|
||||
name: "main".to_string(),
|
||||
action: Action::Create,
|
||||
default_domain: format!("{}.{}.{}", generate_id(), context.cluster_id().to_string(), test_domain),
|
||||
default_domain: format!("{}.{}.{}", generate_id(), context.cluster_id(), test_domain),
|
||||
public_port: 443,
|
||||
custom_domains: vec![],
|
||||
routes: vec![Route {
|
||||
path: "/".to_string(),
|
||||
application_name: application_name1.to_string(),
|
||||
application_name: application_name1,
|
||||
}],
|
||||
sticky_sessions_enabled: false,
|
||||
},
|
||||
@@ -839,12 +839,12 @@ pub fn environnement_2_app_2_routers_1_psql(
|
||||
long_id: Uuid::new_v4(),
|
||||
name: "second-router".to_string(),
|
||||
action: Action::Create,
|
||||
default_domain: format!("{}.{}.{}", generate_id(), context.cluster_id().to_string(), test_domain),
|
||||
default_domain: format!("{}.{}.{}", generate_id(), context.cluster_id(), test_domain),
|
||||
public_port: 443,
|
||||
custom_domains: vec![],
|
||||
routes: vec![Route {
|
||||
path: "/coco".to_string(),
|
||||
application_name: application_name2.to_string(),
|
||||
application_name: application_name2,
|
||||
}],
|
||||
sticky_sessions_enabled: false,
|
||||
},
|
||||
@@ -883,7 +883,7 @@ pub fn echo_app_environment(context: &Context, test_domain: &str) -> Environment
|
||||
action: Action::Create,
|
||||
applications: vec![Application {
|
||||
long_id: Uuid::new_v4(),
|
||||
name: format!("{}-{}", "echo-app".to_string(), &suffix),
|
||||
name: format!("{}-{}", "echo-app", &suffix),
|
||||
/*name: "simple-app".to_string(),*/
|
||||
git_url: "https://github.com/Qovery/engine-testing.git".to_string(),
|
||||
commit_id: "2205adea1db295547b99f7b17229afd7e879b6ff".to_string(),
|
||||
@@ -921,12 +921,12 @@ pub fn echo_app_environment(context: &Context, test_domain: &str) -> Environment
|
||||
long_id: Uuid::new_v4(),
|
||||
name: "main".to_string(),
|
||||
action: Action::Create,
|
||||
default_domain: format!("{}.{}.{}", generate_id(), context.cluster_id().to_string(), test_domain),
|
||||
default_domain: format!("{}.{}.{}", generate_id(), context.cluster_id(), test_domain),
|
||||
public_port: 443,
|
||||
custom_domains: vec![],
|
||||
routes: vec![Route {
|
||||
path: "/".to_string(),
|
||||
application_name: format!("{}-{}", "echo-app".to_string(), &suffix),
|
||||
application_name: format!("{}-{}", "echo-app", &suffix),
|
||||
}],
|
||||
sticky_sessions_enabled: false,
|
||||
}],
|
||||
@@ -946,7 +946,7 @@ pub fn environment_only_http_server(context: &Context) -> EnvironmentRequest {
|
||||
action: Action::Create,
|
||||
applications: vec![Application {
|
||||
long_id: Uuid::new_v4(),
|
||||
name: format!("{}-{}", "mini-http".to_string(), &suffix),
|
||||
name: format!("{}-{}", "mini-http", &suffix),
|
||||
/*name: "simple-app".to_string(),*/
|
||||
git_url: "https://github.com/Qovery/engine-testing.git".to_string(),
|
||||
commit_id: "a873edd459c97beb51453db056c40bca85f36ef9".to_string(),
|
||||
@@ -996,7 +996,7 @@ pub fn environment_only_http_server_router(context: &Context, test_domain: &str)
|
||||
action: Action::Create,
|
||||
applications: vec![Application {
|
||||
long_id: id,
|
||||
name: format!("{}-{}", "mini-http".to_string(), &suffix),
|
||||
name: format!("{}-{}", "mini-http", &suffix),
|
||||
/*name: "simple-app".to_string(),*/
|
||||
git_url: "https://github.com/Qovery/engine-testing.git".to_string(),
|
||||
commit_id: "a873edd459c97beb51453db056c40bca85f36ef9".to_string(),
|
||||
@@ -1037,7 +1037,7 @@ pub fn environment_only_http_server_router(context: &Context, test_domain: &str)
|
||||
custom_domains: vec![],
|
||||
routes: vec![Route {
|
||||
path: "/".to_string(),
|
||||
application_name: format!("{}-{}", "mini-http".to_string(), &suffix),
|
||||
application_name: format!("{}-{}", "mini-http", &suffix),
|
||||
}],
|
||||
sticky_sessions_enabled: false,
|
||||
}],
|
||||
@@ -1102,7 +1102,7 @@ pub fn test_db(
|
||||
let database_password = generate_password(provider_kind.clone(), database_mode.clone());
|
||||
let db_kind_str = db_kind.name().to_string();
|
||||
let db_id = generate_id();
|
||||
let database_host = format!("{}-{}", db_id, db_kind_str.clone());
|
||||
let database_host = format!("{}-{}", db_id, db_kind_str);
|
||||
let database_fqdn = format!(
|
||||
"{}.{}.{}",
|
||||
database_host,
|
||||
@@ -1125,41 +1125,41 @@ pub fn test_db(
|
||||
database_host.clone()
|
||||
},
|
||||
);
|
||||
let database_port = db_infos.db_port.clone();
|
||||
let database_port = db_infos.db_port;
|
||||
let storage_size = 10;
|
||||
let db_disk_type = db_disk_type(provider_kind.clone(), database_mode.clone());
|
||||
let db_instance_type = db_instance_type(provider_kind.clone(), db_kind.clone(), database_mode.clone());
|
||||
let db = Database {
|
||||
kind: db_kind.clone(),
|
||||
kind: db_kind,
|
||||
action: Action::Create,
|
||||
long_id: Uuid::new_v4(),
|
||||
name: db_id.clone(),
|
||||
name: db_id,
|
||||
version: version.to_string(),
|
||||
fqdn_id: database_host.clone(),
|
||||
fqdn: database_fqdn.clone(),
|
||||
port: database_port.clone(),
|
||||
username: database_username.clone(),
|
||||
password: database_password.clone(),
|
||||
port: database_port,
|
||||
username: database_username,
|
||||
password: database_password,
|
||||
total_cpus: "50m".to_string(),
|
||||
total_ram_in_mib: 256,
|
||||
disk_size_in_gib: storage_size.clone(),
|
||||
database_instance_type: db_instance_type.to_string(),
|
||||
database_disk_type: db_disk_type.to_string(),
|
||||
disk_size_in_gib: storage_size,
|
||||
database_instance_type: db_instance_type,
|
||||
database_disk_type: db_disk_type,
|
||||
encrypt_disk: true,
|
||||
activate_high_availability: false,
|
||||
activate_backups: false,
|
||||
publicly_accessible: is_public.clone(),
|
||||
publicly_accessible: is_public,
|
||||
mode: database_mode.clone(),
|
||||
};
|
||||
|
||||
environment.databases = vec![db.clone()];
|
||||
environment.databases = vec![db];
|
||||
|
||||
let app_name = format!("{}-app-{}", db_kind_str.clone(), generate_id());
|
||||
let app_name = format!("{}-app-{}", db_kind_str, generate_id());
|
||||
environment.applications = environment
|
||||
.applications
|
||||
.into_iter()
|
||||
.map(|mut app| {
|
||||
app.long_id = app_id.clone();
|
||||
app.long_id = app_id;
|
||||
app.name = to_short_id(&app_id);
|
||||
app.branch = app_name.clone();
|
||||
app.commit_id = db_infos.app_commit.clone();
|
||||
@@ -1228,34 +1228,33 @@ pub fn test_db(
|
||||
let ret = environment.deploy_environment(&ea, logger.clone(), &engine_config);
|
||||
assert!(matches!(ret, TransactionResult::Ok));
|
||||
|
||||
match database_mode.clone() {
|
||||
match database_mode {
|
||||
DatabaseMode::CONTAINER => {
|
||||
match get_pvc(context.clone(), provider_kind.clone(), environment.clone(), secrets.clone()) {
|
||||
Ok(pvc) => assert_eq!(
|
||||
pvc.items.expect("No items in pvc")[0].spec.resources.requests.storage,
|
||||
format!("{}Gi", storage_size)
|
||||
),
|
||||
Err(_) => assert!(false),
|
||||
Err(_) => panic!(),
|
||||
};
|
||||
|
||||
match get_svc(context.clone(), provider_kind.clone(), environment.clone(), secrets.clone()) {
|
||||
match get_svc(context.clone(), provider_kind.clone(), environment, secrets) {
|
||||
Ok(svc) => assert_eq!(
|
||||
svc.items
|
||||
.expect("No items in svc")
|
||||
.into_iter()
|
||||
.filter(|svc| svc.metadata.name == database_host && &svc.spec.svc_type == "LoadBalancer")
|
||||
.collect::<Vec<SVCItem>>()
|
||||
.len(),
|
||||
.count(),
|
||||
match is_public {
|
||||
true => 1,
|
||||
false => 0,
|
||||
}
|
||||
),
|
||||
Err(_) => assert!(false),
|
||||
Err(_) => panic!(),
|
||||
};
|
||||
}
|
||||
DatabaseMode::MANAGED => {
|
||||
match get_svc(context.clone(), provider_kind.clone(), environment.clone(), secrets.clone()) {
|
||||
match get_svc(context.clone(), provider_kind.clone(), environment, secrets) {
|
||||
Ok(svc) => {
|
||||
let service = svc
|
||||
.items
|
||||
@@ -1273,7 +1272,7 @@ pub fn test_db(
|
||||
false => assert!(!annotations.contains_key("external-dns.alpha.kubernetes.io/hostname")),
|
||||
}
|
||||
}
|
||||
Err(_) => assert!(false),
|
||||
Err(_) => panic!(),
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -1287,9 +1286,7 @@ pub fn test_db(
|
||||
localisation.as_str(),
|
||||
KubernetesKind::Eks,
|
||||
kubernetes_version,
|
||||
&ClusterDomain::Default {
|
||||
cluster_id: cluster_id.to_string(),
|
||||
},
|
||||
&ClusterDomain::Default { cluster_id },
|
||||
None,
|
||||
),
|
||||
Kind::Do => DO::docker_cr_engine(
|
||||
@@ -1298,9 +1295,7 @@ pub fn test_db(
|
||||
localisation.as_str(),
|
||||
KubernetesKind::Doks,
|
||||
kubernetes_version,
|
||||
&ClusterDomain::Default {
|
||||
cluster_id: cluster_id.to_string(),
|
||||
},
|
||||
&ClusterDomain::Default { cluster_id },
|
||||
None,
|
||||
),
|
||||
Kind::Scw => Scaleway::docker_cr_engine(
|
||||
@@ -1309,9 +1304,7 @@ pub fn test_db(
|
||||
localisation.as_str(),
|
||||
KubernetesKind::ScwKapsule,
|
||||
kubernetes_version,
|
||||
&ClusterDomain::Default {
|
||||
cluster_id: cluster_id.to_string(),
|
||||
},
|
||||
&ClusterDomain::Default { cluster_id },
|
||||
None,
|
||||
),
|
||||
};
|
||||
@@ -1319,10 +1312,10 @@ pub fn test_db(
|
||||
let ret = environment_delete.delete_environment(&ea_delete, logger, &engine_config_for_delete);
|
||||
assert!(matches!(ret, TransactionResult::Ok));
|
||||
|
||||
return test_name.to_string();
|
||||
test_name.to_string()
|
||||
}
|
||||
|
||||
pub fn get_environment_test_kubernetes<'a>(
|
||||
pub fn get_environment_test_kubernetes(
|
||||
context: &Context,
|
||||
cloud_provider: Arc<Box<dyn CloudProvider>>,
|
||||
kubernetes_kind: KubernetesKind,
|
||||
@@ -1338,8 +1331,8 @@ pub fn get_environment_test_kubernetes<'a>(
|
||||
KubernetesKind::Eks => {
|
||||
let region = AwsRegion::from_str(localisation).expect("AWS region not supported");
|
||||
let mut options = AWS::kubernetes_cluster_options(secrets, None);
|
||||
if vpc_network_mode.is_some() {
|
||||
options.vpc_qovery_network_mode = vpc_network_mode.expect("No vpc network mode");
|
||||
if let Some(vpc_network_mode) = vpc_network_mode {
|
||||
options.vpc_qovery_network_mode = vpc_network_mode;
|
||||
}
|
||||
|
||||
Box::new(
|
||||
@@ -1363,8 +1356,8 @@ pub fn get_environment_test_kubernetes<'a>(
|
||||
KubernetesKind::Ec2 => {
|
||||
let region = AwsRegion::from_str(localisation).expect("AWS region not supported");
|
||||
let mut options = AWS::kubernetes_cluster_options(secrets, None);
|
||||
if vpc_network_mode.is_some() {
|
||||
options.vpc_qovery_network_mode = vpc_network_mode.expect("No vpc network mode");
|
||||
if let Some(vpc_network_mode) = vpc_network_mode {
|
||||
options.vpc_qovery_network_mode = vpc_network_mode;
|
||||
}
|
||||
|
||||
Box::new(
|
||||
@@ -1397,7 +1390,7 @@ pub fn get_environment_test_kubernetes<'a>(
|
||||
cloud_provider,
|
||||
dns_provider,
|
||||
DO::kubernetes_nodes(),
|
||||
DO::kubernetes_cluster_options(secrets.clone(), Option::from(context.cluster_id().to_string())),
|
||||
DO::kubernetes_cluster_options(secrets, Option::from(context.cluster_id().to_string())),
|
||||
logger,
|
||||
)
|
||||
.unwrap(),
|
||||
@@ -1424,7 +1417,7 @@ pub fn get_environment_test_kubernetes<'a>(
|
||||
}
|
||||
};
|
||||
|
||||
return kubernetes;
|
||||
kubernetes
|
||||
}
|
||||
|
||||
pub fn get_cluster_test_kubernetes<'a>(
|
||||
@@ -1445,8 +1438,8 @@ pub fn get_cluster_test_kubernetes<'a>(
|
||||
KubernetesKind::Eks => {
|
||||
let mut options = AWS::kubernetes_cluster_options(secrets, None);
|
||||
let aws_region = AwsRegion::from_str(localisation).expect("expected correct AWS region");
|
||||
if vpc_network_mode.is_some() {
|
||||
options.vpc_qovery_network_mode = vpc_network_mode.expect("No vpc network mode");
|
||||
if let Some(vpc_network_mode) = vpc_network_mode {
|
||||
options.vpc_qovery_network_mode = vpc_network_mode;
|
||||
}
|
||||
let aws_zones = aws_zones.unwrap().into_iter().map(|zone| zone.to_string()).collect();
|
||||
|
||||
@@ -1457,7 +1450,7 @@ pub fn get_cluster_test_kubernetes<'a>(
|
||||
uuid::Uuid::new_v4(),
|
||||
cluster_name.as_str(),
|
||||
boot_version.as_str(),
|
||||
aws_region.clone(),
|
||||
aws_region,
|
||||
aws_zones,
|
||||
cloud_provider,
|
||||
dns_provider,
|
||||
@@ -1471,8 +1464,8 @@ pub fn get_cluster_test_kubernetes<'a>(
|
||||
KubernetesKind::Ec2 => {
|
||||
let mut options = AWS::kubernetes_cluster_options(secrets, None);
|
||||
let aws_region = AwsRegion::from_str(localisation).expect("expected correct AWS region");
|
||||
if vpc_network_mode.is_some() {
|
||||
options.vpc_qovery_network_mode = vpc_network_mode.expect("No vpc network mode");
|
||||
if let Some(vpc_network_mode) = vpc_network_mode {
|
||||
options.vpc_qovery_network_mode = vpc_network_mode;
|
||||
}
|
||||
let aws_zones = aws_zones.unwrap().into_iter().map(|zone| zone.to_string()).collect();
|
||||
|
||||
@@ -1483,7 +1476,7 @@ pub fn get_cluster_test_kubernetes<'a>(
|
||||
uuid::Uuid::new_v4(),
|
||||
cluster_name.as_str(),
|
||||
boot_version.as_str(),
|
||||
aws_region.clone(),
|
||||
aws_region,
|
||||
aws_zones,
|
||||
cloud_provider,
|
||||
dns_provider,
|
||||
@@ -1496,11 +1489,11 @@ pub fn get_cluster_test_kubernetes<'a>(
|
||||
KubernetesKind::Doks => Box::new(
|
||||
DOKS::new(
|
||||
context.clone(),
|
||||
cluster_id.clone(),
|
||||
cluster_id,
|
||||
uuid::Uuid::new_v4(),
|
||||
cluster_name.clone(),
|
||||
boot_version,
|
||||
DoRegion::from_str(localisation.clone()).expect("Unknown region set for DOKS"),
|
||||
DoRegion::from_str(localisation).expect("Unknown region set for DOKS"),
|
||||
cloud_provider,
|
||||
dns_provider,
|
||||
DO::kubernetes_nodes(),
|
||||
@@ -1512,11 +1505,11 @@ pub fn get_cluster_test_kubernetes<'a>(
|
||||
KubernetesKind::ScwKapsule => Box::new(
|
||||
Kapsule::new(
|
||||
context.clone(),
|
||||
cluster_id.clone(),
|
||||
cluster_id,
|
||||
uuid::Uuid::new_v4(),
|
||||
cluster_name.clone(),
|
||||
cluster_name,
|
||||
boot_version,
|
||||
ScwZone::from_str(localisation.clone()).expect("Unknown zone set for Kapsule"),
|
||||
ScwZone::from_str(localisation).expect("Unknown zone set for Kapsule"),
|
||||
cloud_provider,
|
||||
dns_provider,
|
||||
Scaleway::kubernetes_nodes(),
|
||||
@@ -1527,7 +1520,7 @@ pub fn get_cluster_test_kubernetes<'a>(
|
||||
),
|
||||
};
|
||||
|
||||
return kubernetes;
|
||||
kubernetes
|
||||
}
|
||||
|
||||
pub fn cluster_test(
|
||||
@@ -1584,8 +1577,8 @@ pub fn cluster_test(
|
||||
let mut delete_tx = Transaction::new(&engine, logger.clone(), Box::new(|| false), Box::new(|_| {})).unwrap();
|
||||
|
||||
let mut aws_zones_string: Vec<String> = Vec::with_capacity(3);
|
||||
if aws_zones.is_some() {
|
||||
for zone in aws_zones.clone().unwrap() {
|
||||
if let Some(aws_zones) = aws_zones {
|
||||
for zone in aws_zones {
|
||||
aws_zones_string.push(zone.to_string())
|
||||
}
|
||||
};
|
||||
@@ -1659,7 +1652,7 @@ pub fn cluster_test(
|
||||
}
|
||||
}
|
||||
ClusterTestType::WithUpgrade => {
|
||||
let upgrade_to_version = format!("{}.{}", major_boot_version, minor_boot_version.clone() + 1);
|
||||
let upgrade_to_version = format!("{}.{}", major_boot_version, minor_boot_version + 1);
|
||||
let engine = match provider_kind {
|
||||
Kind::Aws => AWS::docker_cr_engine(
|
||||
&context,
|
||||
@@ -1668,7 +1661,7 @@ pub fn cluster_test(
|
||||
KubernetesKind::Eks,
|
||||
upgrade_to_version,
|
||||
cluster_domain,
|
||||
vpc_network_mode.clone(),
|
||||
vpc_network_mode,
|
||||
),
|
||||
Kind::Do => DO::docker_cr_engine(
|
||||
&context,
|
||||
@@ -1677,7 +1670,7 @@ pub fn cluster_test(
|
||||
KubernetesKind::Doks,
|
||||
upgrade_to_version,
|
||||
cluster_domain,
|
||||
vpc_network_mode.clone(),
|
||||
vpc_network_mode,
|
||||
),
|
||||
Kind::Scw => Scaleway::docker_cr_engine(
|
||||
&context,
|
||||
@@ -1686,7 +1679,7 @@ pub fn cluster_test(
|
||||
KubernetesKind::ScwKapsule,
|
||||
upgrade_to_version,
|
||||
cluster_domain,
|
||||
vpc_network_mode.clone(),
|
||||
vpc_network_mode,
|
||||
),
|
||||
};
|
||||
let mut upgrade_tx =
|
||||
@@ -1799,7 +1792,7 @@ pub fn test_db_on_upgrade(
|
||||
let database_password = "uxoyf358jojkemj".to_string();
|
||||
let db_kind_str = db_kind.name().to_string();
|
||||
let db_id = "c2dn5so3dltod3s".to_string();
|
||||
let database_host = format!("{}-{}", db_id, db_kind_str.clone());
|
||||
let database_host = format!("{}-{}", db_id, db_kind_str);
|
||||
let database_fqdn = format!(
|
||||
"{}.{}.{}",
|
||||
database_host,
|
||||
@@ -1822,41 +1815,41 @@ pub fn test_db_on_upgrade(
|
||||
database_host.clone()
|
||||
},
|
||||
);
|
||||
let database_port = db_infos.db_port.clone();
|
||||
let database_port = db_infos.db_port;
|
||||
let storage_size = 10;
|
||||
let db_disk_type = db_disk_type(provider_kind.clone(), database_mode.clone());
|
||||
let db_instance_type = db_instance_type(provider_kind.clone(), db_kind.clone(), database_mode.clone());
|
||||
let db = Database {
|
||||
kind: db_kind.clone(),
|
||||
kind: db_kind,
|
||||
action: Action::Create,
|
||||
long_id: Uuid::from_str("7d0158db-b783-4bc2-a23b-c7d9228cbe90").unwrap(),
|
||||
name: db_id.clone(),
|
||||
name: db_id,
|
||||
version: version.to_string(),
|
||||
fqdn_id: database_host.clone(),
|
||||
fqdn: database_fqdn.clone(),
|
||||
port: database_port.clone(),
|
||||
username: database_username.clone(),
|
||||
password: database_password.clone(),
|
||||
port: database_port,
|
||||
username: database_username,
|
||||
password: database_password,
|
||||
total_cpus: "50m".to_string(),
|
||||
total_ram_in_mib: 256,
|
||||
disk_size_in_gib: storage_size.clone(),
|
||||
database_instance_type: db_instance_type.to_string(),
|
||||
database_disk_type: db_disk_type.to_string(),
|
||||
disk_size_in_gib: storage_size,
|
||||
database_instance_type: db_instance_type,
|
||||
database_disk_type: db_disk_type,
|
||||
encrypt_disk: true,
|
||||
activate_high_availability: false,
|
||||
activate_backups: false,
|
||||
publicly_accessible: is_public.clone(),
|
||||
publicly_accessible: is_public,
|
||||
mode: database_mode.clone(),
|
||||
};
|
||||
|
||||
environment.databases = vec![db.clone()];
|
||||
environment.databases = vec![db];
|
||||
|
||||
let app_name = format!("{}-app-{}", db_kind_str.clone(), generate_id());
|
||||
let app_name = format!("{}-app-{}", db_kind_str, generate_id());
|
||||
environment.applications = environment
|
||||
.applications
|
||||
.into_iter()
|
||||
.map(|mut app| {
|
||||
app.long_id = app_id.clone();
|
||||
app.long_id = app_id;
|
||||
app.name = to_short_id(&app_id);
|
||||
app.branch = app_name.clone();
|
||||
app.commit_id = db_infos.app_commit.clone();
|
||||
@@ -1925,34 +1918,33 @@ pub fn test_db_on_upgrade(
|
||||
let ret = environment.deploy_environment(&ea, logger.clone(), &engine_config);
|
||||
assert!(matches!(ret, TransactionResult::Ok));
|
||||
|
||||
match database_mode.clone() {
|
||||
match database_mode {
|
||||
DatabaseMode::CONTAINER => {
|
||||
match get_pvc(context.clone(), provider_kind.clone(), environment.clone(), secrets.clone()) {
|
||||
Ok(pvc) => assert_eq!(
|
||||
pvc.items.expect("No items in pvc")[0].spec.resources.requests.storage,
|
||||
format!("{}Gi", storage_size)
|
||||
),
|
||||
Err(_) => assert!(false),
|
||||
Err(_) => panic!(),
|
||||
};
|
||||
|
||||
match get_svc(context.clone(), provider_kind.clone(), environment.clone(), secrets.clone()) {
|
||||
match get_svc(context, provider_kind.clone(), environment, secrets) {
|
||||
Ok(svc) => assert_eq!(
|
||||
svc.items
|
||||
.expect("No items in svc")
|
||||
.into_iter()
|
||||
.filter(|svc| svc.metadata.name == database_host && &svc.spec.svc_type == "LoadBalancer")
|
||||
.collect::<Vec<SVCItem>>()
|
||||
.len(),
|
||||
.count(),
|
||||
match is_public {
|
||||
true => 1,
|
||||
false => 0,
|
||||
}
|
||||
),
|
||||
Err(_) => assert!(false),
|
||||
Err(_) => panic!(),
|
||||
};
|
||||
}
|
||||
DatabaseMode::MANAGED => {
|
||||
match get_svc(context, provider_kind.clone(), environment.clone(), secrets.clone()) {
|
||||
match get_svc(context, provider_kind.clone(), environment, secrets) {
|
||||
Ok(svc) => {
|
||||
let service = svc
|
||||
.items
|
||||
@@ -1970,7 +1962,7 @@ pub fn test_db_on_upgrade(
|
||||
false => assert!(!annotations.contains_key("external-dns.alpha.kubernetes.io/hostname")),
|
||||
}
|
||||
}
|
||||
Err(_) => assert!(false),
|
||||
Err(_) => panic!(),
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -2014,5 +2006,5 @@ pub fn test_db_on_upgrade(
|
||||
let ret = environment_delete.delete_environment(&ea_delete, logger, &engine_config_for_delete);
|
||||
assert!(matches!(ret, TransactionResult::Ok));
|
||||
|
||||
return test_name.to_string();
|
||||
test_name.to_string()
|
||||
}
|
||||
|
||||
@@ -22,8 +22,7 @@ use qovery_engine::models::digital_ocean::DoRegion;
|
||||
|
||||
pub const DO_KUBERNETES_MAJOR_VERSION: u8 = 1;
|
||||
pub const DO_KUBERNETES_MINOR_VERSION: u8 = 20;
|
||||
pub const DO_KUBERNETES_VERSION: &'static str =
|
||||
formatcp!("{}.{}", DO_KUBERNETES_MAJOR_VERSION, DO_KUBERNETES_MINOR_VERSION);
|
||||
pub const DO_KUBERNETES_VERSION: &str = formatcp!("{}.{}", DO_KUBERNETES_MAJOR_VERSION, DO_KUBERNETES_MINOR_VERSION);
|
||||
pub const DOCR_ID: &str = "registry-the-one-and-unique";
|
||||
pub const DO_TEST_REGION: DoRegion = DoRegion::Amsterdam3;
|
||||
pub const DO_MANAGED_DATABASE_INSTANCE_TYPE: &str = "";
|
||||
@@ -45,7 +44,7 @@ pub fn container_registry_digital_ocean(context: &Context) -> DOCR {
|
||||
|
||||
pub fn do_default_engine_config(context: &Context, logger: Box<dyn Logger>) -> EngineConfig {
|
||||
DO::docker_cr_engine(
|
||||
&context,
|
||||
context,
|
||||
logger,
|
||||
DO_TEST_REGION.to_string().as_str(),
|
||||
KubernetesKind::Doks,
|
||||
@@ -104,7 +103,7 @@ impl Cluster<DO, DoksOptions> for DO {
|
||||
.expect("DIGITAL_OCEAN_TEST_CLUSTER_ID is not set");
|
||||
Box::new(DO::new(
|
||||
context.clone(),
|
||||
cluster_id.clone().as_str(),
|
||||
cluster_id.as_str(),
|
||||
secrets
|
||||
.DIGITAL_OCEAN_TEST_ORGANIZATION_ID
|
||||
.expect("DIGITAL_OCEAN_KUBE_TEST_ORGANIZATION_ID is not set")
|
||||
|
||||
@@ -28,8 +28,7 @@ use crate::utilities::{build_platform_local_docker, generate_id, FuncTestsSecret
|
||||
pub const SCW_TEST_ZONE: ScwZone = ScwZone::Paris2;
|
||||
pub const SCW_KUBERNETES_MAJOR_VERSION: u8 = 1;
|
||||
pub const SCW_KUBERNETES_MINOR_VERSION: u8 = 19;
|
||||
pub const SCW_KUBERNETES_VERSION: &'static str =
|
||||
formatcp!("{}.{}", SCW_KUBERNETES_MAJOR_VERSION, SCW_KUBERNETES_MINOR_VERSION);
|
||||
pub const SCW_KUBERNETES_VERSION: &str = formatcp!("{}.{}", SCW_KUBERNETES_MAJOR_VERSION, SCW_KUBERNETES_MINOR_VERSION);
|
||||
pub const SCW_MANAGED_DATABASE_INSTANCE_TYPE: &str = "db-dev-s";
|
||||
pub const SCW_MANAGED_DATABASE_DISK_TYPE: &str = "bssd";
|
||||
pub const SCW_SELF_HOSTED_DATABASE_INSTANCE_TYPE: &str = "";
|
||||
@@ -55,8 +54,8 @@ pub fn container_registry_scw(context: &Context) -> ScalewayCR {
|
||||
|
||||
ScalewayCR::new(
|
||||
context.clone(),
|
||||
format!("default-registry-qovery-test-{}", random_id.clone()).as_str(),
|
||||
format!("default-registry-qovery-test-{}", random_id.clone()).as_str(),
|
||||
format!("default-registry-qovery-test-{}", random_id).as_str(),
|
||||
format!("default-registry-qovery-test-{}", random_id).as_str(),
|
||||
scw_secret_key.as_str(),
|
||||
scw_default_project_id.as_str(),
|
||||
SCW_TEST_ZONE,
|
||||
@@ -67,7 +66,7 @@ pub fn container_registry_scw(context: &Context) -> ScalewayCR {
|
||||
|
||||
pub fn scw_default_engine_config(context: &Context, logger: Box<dyn Logger>) -> EngineConfig {
|
||||
Scaleway::docker_cr_engine(
|
||||
&context,
|
||||
context,
|
||||
logger,
|
||||
SCW_TEST_ZONE.to_string().as_str(),
|
||||
KubernetesKind::ScwKapsule,
|
||||
@@ -102,7 +101,7 @@ impl Cluster<Scaleway, KapsuleOptions> for Scaleway {
|
||||
let cluster = get_environment_test_kubernetes(
|
||||
context,
|
||||
cloud_provider.clone(),
|
||||
kubernetes_kind.clone(),
|
||||
kubernetes_kind,
|
||||
kubernetes_version.as_str(),
|
||||
dns_provider.clone(),
|
||||
logger.clone(),
|
||||
@@ -211,7 +210,7 @@ pub fn scw_object_storage(context: Context, region: ScwZone) -> ScalewayOS {
|
||||
|
||||
ScalewayOS::new(
|
||||
context,
|
||||
format!("qovery-test-object-storage-{}", random_id.clone()),
|
||||
format!("qovery-test-object-storage-{}", random_id),
|
||||
format!("Qovery Test Object-Storage {}", random_id),
|
||||
secrets
|
||||
.SCALEWAY_ACCESS_KEY
|
||||
@@ -251,7 +250,7 @@ pub fn clean_environments(
|
||||
for build in env
|
||||
.applications
|
||||
.iter()
|
||||
.map(|a| a.to_build(®istry_url))
|
||||
.map(|a| a.to_build(registry_url))
|
||||
.collect::<Vec<Build>>()
|
||||
{
|
||||
let _ = container_registry_client.delete_image(&build.image);
|
||||
|
||||
@@ -61,18 +61,14 @@ pub fn context(organization_id: &str, cluster_id: &str) -> Context {
|
||||
let organization_id = organization_id.to_string();
|
||||
let cluster_id = cluster_id.to_string();
|
||||
let execution_id = execution_id();
|
||||
let home_dir = std::env::var("WORKSPACE_ROOT_DIR").unwrap_or(home_dir().unwrap().to_str().unwrap().to_string());
|
||||
let home_dir =
|
||||
std::env::var("WORKSPACE_ROOT_DIR").unwrap_or_else(|_| home_dir().unwrap().to_str().unwrap().to_string());
|
||||
let lib_root_dir = std::env::var("LIB_ROOT_DIR").expect("LIB_ROOT_DIR is mandatory");
|
||||
let docker_host = std::env::var("DOCKER_HOST").map(|x| Url::parse(&x).unwrap()).ok();
|
||||
let docker = Docker::new(docker_host.clone()).expect("Can't init docker");
|
||||
|
||||
let metadata = Metadata {
|
||||
dry_run_deploy: Option::from({
|
||||
match env::var_os("dry_run_deploy") {
|
||||
Some(_) => true,
|
||||
None => false,
|
||||
}
|
||||
}),
|
||||
dry_run_deploy: Option::from(env::var_os("dry_run_deploy").is_some()),
|
||||
resource_expiration_in_seconds: {
|
||||
// set a custom ttl as environment variable for manual tests
|
||||
match env::var_os("ttl") {
|
||||
@@ -83,12 +79,7 @@ pub fn context(organization_id: &str, cluster_id: &str) -> Context {
|
||||
None => Some(7200),
|
||||
}
|
||||
},
|
||||
forced_upgrade: Option::from({
|
||||
match env::var_os("forced_upgrade") {
|
||||
Some(_) => true,
|
||||
None => false,
|
||||
}
|
||||
}),
|
||||
forced_upgrade: Option::from(env::var_os("forced_upgrade").is_some()),
|
||||
disable_pleco: Some(true),
|
||||
};
|
||||
|
||||
@@ -108,7 +99,7 @@ pub fn context(organization_id: &str, cluster_id: &str) -> Context {
|
||||
)
|
||||
}
|
||||
|
||||
pub fn logger<'a>() -> Box<dyn Logger> {
|
||||
pub fn logger() -> Box<dyn Logger> {
|
||||
Box::new(StdIoLogger::new())
|
||||
}
|
||||
|
||||
@@ -164,6 +155,12 @@ struct VaultConfig {
|
||||
token: String,
|
||||
}
|
||||
|
||||
impl Default for FuncTestsSecrets {
|
||||
fn default() -> Self {
|
||||
Self::new()
|
||||
}
|
||||
}
|
||||
|
||||
impl FuncTestsSecrets {
|
||||
pub fn new() -> Self {
|
||||
Self::get_all_secrets()
|
||||
@@ -175,7 +172,7 @@ impl FuncTestsSecrets {
|
||||
None => {
|
||||
return Err(Error::new(
|
||||
ErrorKind::NotFound,
|
||||
format!("VAULT_ADDR environment variable is missing"),
|
||||
"VAULT_ADDR environment variable is missing".to_string(),
|
||||
))
|
||||
}
|
||||
};
|
||||
@@ -185,7 +182,7 @@ impl FuncTestsSecrets {
|
||||
None => {
|
||||
return Err(Error::new(
|
||||
ErrorKind::NotFound,
|
||||
format!("VAULT_TOKEN environment variable is missing"),
|
||||
"VAULT_TOKEN environment variable is missing".to_string(),
|
||||
))
|
||||
}
|
||||
};
|
||||
@@ -395,7 +392,7 @@ pub fn teardown(start_time: Instant, test_name: String) {
|
||||
info!("{} seconds for test {}", elapsed.as_seconds_f64(), test_name);
|
||||
}
|
||||
|
||||
pub fn engine_run_test<T>(test: T) -> ()
|
||||
pub fn engine_run_test<T>(test: T)
|
||||
where
|
||||
T: FnOnce() -> String,
|
||||
{
|
||||
@@ -442,10 +439,7 @@ pub fn generate_password(provider_kind: Kind, db_mode: DatabaseMode) -> String {
|
||||
.exclude_similar_characters(true)
|
||||
.strict(true);
|
||||
|
||||
let mut password = pg
|
||||
.generate_one()
|
||||
.expect("error while trying to generate a password")
|
||||
.to_string();
|
||||
let mut password = pg.generate_one().expect("error while trying to generate a password");
|
||||
|
||||
if allow_using_symbols {
|
||||
for forbidden_char in forbidden_chars {
|
||||
@@ -464,7 +458,7 @@ pub fn check_all_connections(env: &EnvironmentRequest) -> Vec<bool> {
|
||||
|
||||
checking.push(curl_path(path_to_test.as_str()));
|
||||
}
|
||||
return checking;
|
||||
checking
|
||||
}
|
||||
|
||||
fn curl_path(path: &str) -> bool {
|
||||
@@ -472,11 +466,11 @@ fn curl_path(path: &str) -> bool {
|
||||
easy.url(path).unwrap();
|
||||
let res = easy.perform();
|
||||
match res {
|
||||
Ok(_) => return true,
|
||||
Ok(_) => true,
|
||||
|
||||
Err(e) => {
|
||||
println!("TEST Error : while trying to call {}", e);
|
||||
return false;
|
||||
false
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -497,7 +491,7 @@ pub fn kubernetes_config_path(
|
||||
kubernetes_config_bucket_name,
|
||||
kubernetes_config_object_key,
|
||||
kubernetes_config_file_path.clone(),
|
||||
secrets.clone(),
|
||||
secrets,
|
||||
)?;
|
||||
|
||||
Ok(kubernetes_config_file_path)
|
||||
@@ -515,9 +509,8 @@ where
|
||||
P: AsRef<Path>,
|
||||
{
|
||||
// return the file if it already exists and should use cache
|
||||
let _ = match fs::File::open(file_path.as_ref()) {
|
||||
Ok(f) => return Ok(f),
|
||||
Err(_) => {}
|
||||
let _ = if let Ok(f) = fs::File::open(file_path.as_ref()) {
|
||||
return Ok(f);
|
||||
};
|
||||
|
||||
let file_content_result = retry::retry(Fibonacci::from_millis(3000).take(5), || {
|
||||
@@ -537,7 +530,7 @@ where
|
||||
let cluster_name = format!("qovery-{}", context.cluster_id());
|
||||
let kubeconfig = match get_do_kubeconfig_by_cluster_name(
|
||||
secrets.clone().DIGITAL_OCEAN_TOKEN.unwrap().as_str(),
|
||||
cluster_name.clone().as_str(),
|
||||
cluster_name.as_str(),
|
||||
) {
|
||||
Ok(kubeconfig) => kubeconfig,
|
||||
Err(e) => return OperationResult::Retry(e),
|
||||
@@ -559,7 +552,7 @@ where
|
||||
|
||||
let configuration = scaleway_api_rs::apis::configuration::Configuration {
|
||||
api_key: Some(scaleway_api_rs::apis::configuration::ApiKey {
|
||||
key: secret_access_key.to_string(),
|
||||
key: secret_access_key,
|
||||
prefix: None,
|
||||
}),
|
||||
..scaleway_api_rs::apis::configuration::Configuration::default()
|
||||
@@ -729,8 +722,8 @@ fn aws_s3_get_object(
|
||||
|
||||
let mut cmd = QoveryCommand::new(
|
||||
"aws",
|
||||
&vec!["s3", "cp", &s3_url, &local_path],
|
||||
&vec![
|
||||
&["s3", "cp", &s3_url, &local_path],
|
||||
&[
|
||||
(AWS_ACCESS_KEY_ID, access_key_id),
|
||||
(AWS_SECRET_ACCESS_KEY, secret_access_key),
|
||||
],
|
||||
@@ -751,7 +744,7 @@ pub fn is_pod_restarted_env(
|
||||
pod_to_check: &str,
|
||||
secrets: FuncTestsSecrets,
|
||||
) -> (bool, String) {
|
||||
let namespace_name = format!("{}-{}", &environment_check.project_id.clone(), &environment_check.id.clone(),);
|
||||
let namespace_name = format!("{}-{}", &environment_check.project_id, &environment_check.id,);
|
||||
|
||||
let kubernetes_config = kubernetes_config_path(context, provider_kind.clone(), "/tmp", secrets.clone());
|
||||
|
||||
@@ -759,19 +752,19 @@ pub fn is_pod_restarted_env(
|
||||
Ok(path) => {
|
||||
let restarted_database = cmd::kubectl::kubectl_exec_get_number_of_restart(
|
||||
path.as_str(),
|
||||
namespace_name.clone().as_str(),
|
||||
namespace_name.as_str(),
|
||||
pod_to_check,
|
||||
get_cloud_provider_credentials(provider_kind.clone(), &secrets.clone()),
|
||||
get_cloud_provider_credentials(provider_kind, &secrets),
|
||||
);
|
||||
match restarted_database {
|
||||
Ok(count) => match count.trim().eq("0") {
|
||||
true => return (true, "0".to_string()),
|
||||
false => return (true, count.to_string()),
|
||||
true => (true, "0".to_string()),
|
||||
false => (true, count.to_string()),
|
||||
},
|
||||
_ => return (false, "".to_string()),
|
||||
_ => (false, "".to_string()),
|
||||
}
|
||||
}
|
||||
Err(_e) => return (false, "".to_string()),
|
||||
Err(_e) => (false, "".to_string()),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -782,24 +775,24 @@ pub fn get_pods(
|
||||
pod_to_check: &str,
|
||||
secrets: FuncTestsSecrets,
|
||||
) -> Result<KubernetesList<KubernetesPod>, CommandError> {
|
||||
let namespace_name = format!("{}-{}", &environment_check.project_id.clone(), &environment_check.id.clone(),);
|
||||
let namespace_name = format!("{}-{}", &environment_check.project_id, &environment_check.id,);
|
||||
|
||||
let kubernetes_config = kubernetes_config_path(context, provider_kind.clone(), "/tmp", secrets.clone());
|
||||
|
||||
cmd::kubectl::kubectl_exec_get_pods(
|
||||
kubernetes_config.unwrap().as_str(),
|
||||
Some(namespace_name.clone().as_str()),
|
||||
Some(namespace_name.as_str()),
|
||||
Some(pod_to_check),
|
||||
get_cloud_provider_credentials(provider_kind.clone(), &secrets.clone()),
|
||||
get_cloud_provider_credentials(provider_kind, &secrets),
|
||||
)
|
||||
}
|
||||
|
||||
pub fn execution_id() -> String {
|
||||
Utc::now()
|
||||
.to_rfc3339()
|
||||
.replace(":", "-")
|
||||
.replace(".", "-")
|
||||
.replace("+", "-")
|
||||
.replace(':', "-")
|
||||
.replace('.', "-")
|
||||
.replace('+', "-")
|
||||
}
|
||||
|
||||
// avoid test collisions
|
||||
@@ -831,11 +824,11 @@ pub fn generate_cluster_id(region: &str) -> String {
|
||||
shrink_size = current_name.chars().count()
|
||||
}
|
||||
|
||||
let mut final_name = format!("{}", ¤t_name[..shrink_size]);
|
||||
let mut final_name = (¤t_name[..shrink_size]).to_string();
|
||||
// do not end with a non alphanumeric char
|
||||
while !final_name.chars().last().unwrap().is_alphanumeric() {
|
||||
shrink_size -= 1;
|
||||
final_name = format!("{}", ¤t_name[..shrink_size]);
|
||||
final_name = (¤t_name[..shrink_size]).to_string();
|
||||
}
|
||||
// note ensure you use only lowercase (uppercase are not allowed in lot of AWS resources)
|
||||
format!("{}-{}", final_name.to_lowercase(), region.to_lowercase())
|
||||
@@ -850,7 +843,7 @@ pub fn get_pvc(
|
||||
environment_check: EnvironmentRequest,
|
||||
secrets: FuncTestsSecrets,
|
||||
) -> Result<PVC, CommandError> {
|
||||
let namespace_name = format!("{}-{}", &environment_check.project_id.clone(), &environment_check.id.clone(),);
|
||||
let namespace_name = format!("{}-{}", &environment_check.project_id, &environment_check.id,);
|
||||
|
||||
let kubernetes_config = kubernetes_config_path(context, provider_kind.clone(), "/tmp", secrets.clone());
|
||||
|
||||
@@ -858,8 +851,8 @@ pub fn get_pvc(
|
||||
Ok(path) => {
|
||||
match kubectl_get_pvc(
|
||||
path.as_str(),
|
||||
namespace_name.clone().as_str(),
|
||||
get_cloud_provider_credentials(provider_kind.clone(), &secrets.clone()),
|
||||
namespace_name.as_str(),
|
||||
get_cloud_provider_credentials(provider_kind, &secrets),
|
||||
) {
|
||||
Ok(pvc) => Ok(pvc),
|
||||
Err(e) => Err(e),
|
||||
@@ -875,7 +868,7 @@ pub fn get_svc(
|
||||
environment_check: EnvironmentRequest,
|
||||
secrets: FuncTestsSecrets,
|
||||
) -> Result<SVC, CommandError> {
|
||||
let namespace_name = format!("{}-{}", &environment_check.project_id.clone(), &environment_check.id.clone(),);
|
||||
let namespace_name = format!("{}-{}", &environment_check.project_id, &environment_check.id,);
|
||||
|
||||
let kubernetes_config = kubernetes_config_path(context, provider_kind.clone(), "/tmp", secrets.clone());
|
||||
|
||||
@@ -883,8 +876,8 @@ pub fn get_svc(
|
||||
Ok(path) => {
|
||||
match kubectl_get_svc(
|
||||
path.as_str(),
|
||||
namespace_name.clone().as_str(),
|
||||
get_cloud_provider_credentials(provider_kind.clone(), &secrets.clone()),
|
||||
namespace_name.as_str(),
|
||||
get_cloud_provider_credentials(provider_kind, &secrets),
|
||||
) {
|
||||
Ok(pvc) => Ok(pvc),
|
||||
Err(e) => Err(e),
|
||||
@@ -931,24 +924,20 @@ pub fn db_infos(
|
||||
let database_db_name = db_id;
|
||||
let database_uri = format!(
|
||||
"mongodb://{}:{}@{}:{}/{}",
|
||||
database_username,
|
||||
database_password,
|
||||
db_fqdn.clone(),
|
||||
database_port,
|
||||
database_db_name.clone()
|
||||
database_username, database_password, db_fqdn, database_port, database_db_name
|
||||
);
|
||||
DBInfos {
|
||||
db_port: database_port.clone(),
|
||||
db_port: database_port,
|
||||
db_name: database_db_name.to_string(),
|
||||
app_commit: "da5dd2b58b78576921373fcb4d4bddc796a804a8".to_string(),
|
||||
app_env_vars: btreemap! {
|
||||
"IS_DOCUMENTDB".to_string() => base64::encode((database_mode == MANAGED).to_string()),
|
||||
"QOVERY_DATABASE_TESTING_DATABASE_FQDN".to_string() => base64::encode(db_fqdn.clone()),
|
||||
"QOVERY_DATABASE_MY_DDB_CONNECTION_URI".to_string() => base64::encode(database_uri.clone()),
|
||||
"QOVERY_DATABASE_TESTING_DATABASE_FQDN".to_string() => base64::encode(db_fqdn),
|
||||
"QOVERY_DATABASE_MY_DDB_CONNECTION_URI".to_string() => base64::encode(database_uri),
|
||||
"QOVERY_DATABASE_TESTING_DATABASE_PORT".to_string() => base64::encode(database_port.to_string()),
|
||||
"MONGODB_DBNAME".to_string() => base64::encode(database_db_name.clone()),
|
||||
"QOVERY_DATABASE_TESTING_DATABASE_USERNAME".to_string() => base64::encode(database_username.clone()),
|
||||
"QOVERY_DATABASE_TESTING_DATABASE_PASSWORD".to_string() => base64::encode(database_password.clone()),
|
||||
"MONGODB_DBNAME".to_string() => base64::encode(database_db_name),
|
||||
"QOVERY_DATABASE_TESTING_DATABASE_USERNAME".to_string() => base64::encode(database_username),
|
||||
"QOVERY_DATABASE_TESTING_DATABASE_PASSWORD".to_string() => base64::encode(database_password),
|
||||
},
|
||||
}
|
||||
}
|
||||
@@ -956,15 +945,15 @@ pub fn db_infos(
|
||||
let database_port = 3306;
|
||||
let database_db_name = db_id;
|
||||
DBInfos {
|
||||
db_port: database_port.clone(),
|
||||
db_port: database_port,
|
||||
db_name: database_db_name.to_string(),
|
||||
app_commit: "42f6553b6be617f954f903e01236e225bbb9f468".to_string(),
|
||||
app_env_vars: btreemap! {
|
||||
"MYSQL_HOST".to_string() => base64::encode(db_fqdn.clone()),
|
||||
"MYSQL_HOST".to_string() => base64::encode(db_fqdn),
|
||||
"MYSQL_PORT".to_string() => base64::encode(database_port.to_string()),
|
||||
"MYSQL_DBNAME".to_string() => base64::encode(database_db_name.clone()),
|
||||
"MYSQL_USERNAME".to_string() => base64::encode(database_username.clone()),
|
||||
"MYSQL_PASSWORD".to_string() => base64::encode(database_password.clone()),
|
||||
"MYSQL_DBNAME".to_string() => base64::encode(database_db_name),
|
||||
"MYSQL_USERNAME".to_string() => base64::encode(database_username),
|
||||
"MYSQL_PASSWORD".to_string() => base64::encode(database_password),
|
||||
},
|
||||
}
|
||||
}
|
||||
@@ -976,15 +965,15 @@ pub fn db_infos(
|
||||
db_id
|
||||
};
|
||||
DBInfos {
|
||||
db_port: database_port.clone(),
|
||||
db_port: database_port,
|
||||
db_name: database_db_name.to_string(),
|
||||
app_commit: "61c7a9b55a085229583b6a394dd168a4159dfd09".to_string(),
|
||||
app_env_vars: btreemap! {
|
||||
"PG_DBNAME".to_string() => base64::encode(database_db_name.clone()),
|
||||
"PG_HOST".to_string() => base64::encode(db_fqdn.clone()),
|
||||
"PG_DBNAME".to_string() => base64::encode(database_db_name),
|
||||
"PG_HOST".to_string() => base64::encode(db_fqdn),
|
||||
"PG_PORT".to_string() => base64::encode(database_port.to_string()),
|
||||
"PG_USERNAME".to_string() => base64::encode(database_username.clone()),
|
||||
"PG_PASSWORD".to_string() => base64::encode(database_password.clone()),
|
||||
"PG_USERNAME".to_string() => base64::encode(database_username),
|
||||
"PG_PASSWORD".to_string() => base64::encode(database_password),
|
||||
},
|
||||
}
|
||||
}
|
||||
@@ -992,15 +981,15 @@ pub fn db_infos(
|
||||
let database_port = 6379;
|
||||
let database_db_name = db_id;
|
||||
DBInfos {
|
||||
db_port: database_port.clone(),
|
||||
db_name: database_db_name.to_string(),
|
||||
db_port: database_port,
|
||||
db_name: database_db_name,
|
||||
app_commit: "e4b1162741ce162b834b68498e43bf60f0f58cbe".to_string(),
|
||||
app_env_vars: btreemap! {
|
||||
"IS_ELASTICCACHE".to_string() => base64::encode((database_mode == MANAGED).to_string()),
|
||||
"REDIS_HOST".to_string() => base64::encode(db_fqdn.clone()),
|
||||
"REDIS_HOST".to_string() => base64::encode(db_fqdn),
|
||||
"REDIS_PORT".to_string() => base64::encode(database_port.to_string()),
|
||||
"REDIS_USERNAME".to_string() => base64::encode(database_username.clone()),
|
||||
"REDIS_PASSWORD".to_string() => base64::encode(database_password.clone()),
|
||||
"REDIS_USERNAME".to_string() => base64::encode(database_username),
|
||||
"REDIS_PASSWORD".to_string() => base64::encode(database_password),
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,21 +1,11 @@
|
||||
use base64::decode;
|
||||
use qovery_engine::cloud_provider::helm::{
|
||||
deploy_charts_levels, ChartInfo, ChartSetValue, CommonChart, HelmChart, HelmChartNamespaces,
|
||||
};
|
||||
use qovery_engine::cloud_provider::helm::{ChartInfo, ChartSetValue, CommonChart, HelmChart, HelmChartNamespaces};
|
||||
use qovery_engine::cmd::helm::Helm;
|
||||
use qovery_engine::cmd::kubectl::{kubectl_exec_delete_namespace, kubectl_exec_get_secrets, kubectl_get_resource_yaml};
|
||||
use qovery_engine::cmd::structs::SecretItem;
|
||||
use qovery_engine::fs::list_yaml_backup_files;
|
||||
|
||||
use serde_derive::Deserialize;
|
||||
use serde_derive::Serialize;
|
||||
use std::fs;
|
||||
use std::fs::OpenOptions;
|
||||
use std::io::{BufRead, BufReader};
|
||||
use std::path::{Path, PathBuf};
|
||||
use std::str::from_utf8;
|
||||
use std::thread::sleep;
|
||||
use std::time::Duration;
|
||||
use tempdir::TempDir;
|
||||
|
||||
use std::path::PathBuf;
|
||||
|
||||
use test_utilities::utilities::FuncTestsSecrets;
|
||||
|
||||
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
|
||||
@@ -143,7 +133,7 @@ fn cert_manager_conf() -> (Helm, PathBuf, CommonChart, CommonChart) {
|
||||
},
|
||||
ChartSetValue {
|
||||
key: "provider.cloudflare.apiToken".to_string(),
|
||||
value: vault_secrets.CLOUDFLARE_TOKEN.unwrap().to_string(),
|
||||
value: vault_secrets.CLOUDFLARE_TOKEN.unwrap(),
|
||||
},
|
||||
ChartSetValue {
|
||||
key: "provider.cloudflare.email".to_string(),
|
||||
@@ -151,7 +141,7 @@ fn cert_manager_conf() -> (Helm, PathBuf, CommonChart, CommonChart) {
|
||||
},
|
||||
ChartSetValue {
|
||||
key: "acme.letsEncrypt.emailReport".to_string(),
|
||||
value: vault_secrets.CLOUDFLARE_ID.unwrap().to_string(),
|
||||
value: vault_secrets.CLOUDFLARE_ID.unwrap(),
|
||||
},
|
||||
ChartSetValue {
|
||||
key: "acme.letsEncrypt.acmeUrl".to_string(),
|
||||
|
||||
Reference in New Issue
Block a user