mirror of
https://github.com/jlengrand/engine.git
synced 2026-03-10 08:11:21 +00:00
feat: adding helm diff
This commit is contained in:
committed by
Pierre Mavro
parent
b3118a7a68
commit
56bf8417af
1240
Cargo.lock
generated
1240
Cargo.lock
generated
File diff suppressed because it is too large
Load Diff
22
Cargo.toml
22
Cargo.toml
@@ -16,11 +16,11 @@ base64 = "0.13.0"
|
||||
dirs = "3.0.2"
|
||||
rust-crypto = "0.2.36"
|
||||
retry = "1.2.1"
|
||||
trust-dns-resolver = "0.19.6"
|
||||
rand = "0.7.3"
|
||||
trust-dns-resolver = "0.20.3"
|
||||
rand = "0.8.3"
|
||||
gethostname = "0.2.1"
|
||||
reqwest = { version = "0.10.8", features = ["blocking"] }
|
||||
futures = "0.3"
|
||||
reqwest = { version = "0.11.3", features = ["blocking", "json"] }
|
||||
futures = "0.3.15"
|
||||
timeout-readwrite = "0.3.1"
|
||||
lazy_static = "1.4.0"
|
||||
|
||||
@@ -31,23 +31,23 @@ flate2 = "1.0.20" # tar gz
|
||||
tar = "0.4.35"
|
||||
|
||||
# logger
|
||||
tracing = "0.1"
|
||||
tracing-subscriber = "0.2"
|
||||
tracing = "0.1.26"
|
||||
tracing-subscriber = "0.2.18"
|
||||
|
||||
# Docker deps
|
||||
# shiplift = "0.6.0"
|
||||
|
||||
# Filesystem
|
||||
sysinfo = "0.16.4"
|
||||
sysinfo = "0.18.2"
|
||||
|
||||
# Jinja2
|
||||
tera = "1.10.0"
|
||||
# Json
|
||||
serde = "1.0.114"
|
||||
serde_json = "1.0.57"
|
||||
serde_derive = "1.0"
|
||||
serde = "1.0.126"
|
||||
serde_json = "1.0.64"
|
||||
serde_derive = "1.0.126"
|
||||
# AWS deps
|
||||
tokio = { version = "1.5.0", features = ["full"] }
|
||||
tokio = { version = "1.6.1", features = ["full"] }
|
||||
rusoto_core = "0.46.0"
|
||||
rusoto_sts = "0.46.0"
|
||||
rusoto_credential = "0.46.0"
|
||||
|
||||
@@ -438,7 +438,7 @@ slave:
|
||||
##
|
||||
resources:
|
||||
requests:
|
||||
memory: "{{ database_ram_size_in_mib }}Mi" # TODO customizable?
|
||||
memory: "{{ database_ram_size_in_mib }}Mi"
|
||||
cpu: "{{ database_total_cpus }}"
|
||||
|
||||
## Add annotations to all the deployed resources
|
||||
|
||||
@@ -173,7 +173,6 @@ variable "skip_final_snapshot" {
|
||||
}
|
||||
|
||||
# Snapshots
|
||||
# TODO later
|
||||
#variable "snapshot_identifier" {
|
||||
# description = "Snapshot ID to restore"
|
||||
# default = "{ service_info['snapshot']['snapshot_id'] }"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
use crate::cloud_provider::aws::kubernetes::InfraOptions;
|
||||
use crate::cloud_provider::helm::{
|
||||
get_chart_namespace, ChartInfo, ChartSetValue, ChartValuesGenerated, CommonChart, CoreDNSConfigChart, HelmChart,
|
||||
HelmChartNamespaces,
|
||||
get_chart_namespace, ChartInfo, ChartPayload, ChartSetValue, ChartValuesGenerated, CommonChart, CoreDNSConfigChart,
|
||||
HelmChart, HelmChartNamespaces,
|
||||
};
|
||||
use crate::cloud_provider::qovery::{get_qovery_app_version, QoveryAgent, QoveryAppName, QoveryEngine};
|
||||
use crate::cmd::kubectl::{kubectl_exec_get_daemonset, kubectl_exec_with_output};
|
||||
@@ -55,10 +55,7 @@ pub fn aws_helm_charts(
|
||||
kubernetes_config: &Path,
|
||||
envs: &[(String, String)],
|
||||
) -> Result<Vec<Vec<Box<dyn HelmChart>>>, SimpleError> {
|
||||
let chart_prefix = match chart_prefix_path {
|
||||
None => "./",
|
||||
Some(x) => x,
|
||||
};
|
||||
let chart_prefix = chart_prefix_path.unwrap_or("./");
|
||||
let chart_path = |x: &str| -> String { format!("{}/{}", &chart_prefix, x) };
|
||||
let content_file = File::open(&qovery_terraform_config_file)?;
|
||||
let reader = BufReader::new(content_file);
|
||||
@@ -157,7 +154,7 @@ pub fn aws_helm_charts(
|
||||
value: qovery_terraform_config.aws_iam_eks_user_mapper_secret,
|
||||
},
|
||||
ChartSetValue {
|
||||
key: "image.region".to_string(),
|
||||
key: "aws.region".to_string(),
|
||||
value: chart_config_prerequisites.region.clone(),
|
||||
},
|
||||
ChartSetValue {
|
||||
@@ -671,7 +668,7 @@ datasources:
|
||||
get_chart_namespace(loki_namespace),
|
||||
&loki.chart_info.name,
|
||||
get_chart_namespace(loki_namespace),
|
||||
chart_config_prerequisites.region,
|
||||
chart_config_prerequisites.region.clone(),
|
||||
qovery_terraform_config.aws_iam_cloudwatch_key,
|
||||
qovery_terraform_config.aws_iam_cloudwatch_secret,
|
||||
);
|
||||
@@ -874,6 +871,10 @@ datasources:
|
||||
key: "environmentVariables.AWS_SECRET_ACCESS_KEY".to_string(),
|
||||
value: chart_config_prerequisites.aws_secret_access_key.clone(),
|
||||
},
|
||||
ChartSetValue {
|
||||
key: "environmentVariables.PLECO_IDENTIFIER".to_string(),
|
||||
value: chart_config_prerequisites.cluster_id.clone(),
|
||||
},
|
||||
ChartSetValue {
|
||||
key: "environmentVariables.LOG_LEVEL".to_string(),
|
||||
value: "debug".to_string(),
|
||||
@@ -1133,7 +1134,12 @@ impl HelmChart for AwsVpcCniChart {
|
||||
&self.chart_info
|
||||
}
|
||||
|
||||
fn pre_exec(&self, kubernetes_config: &Path, envs: &[(String, String)]) -> Result<(), SimpleError> {
|
||||
fn pre_exec(
|
||||
&self,
|
||||
kubernetes_config: &Path,
|
||||
envs: &[(String, String)],
|
||||
_payload: Option<ChartPayload>,
|
||||
) -> Result<Option<ChartPayload>, SimpleError> {
|
||||
let kinds = vec!["daemonSet", "clusterRole", "clusterRoleBinding", "serviceAccount"];
|
||||
let mut environment_variables: Vec<(&str, &str)> = envs.iter().map(|x| (x.0.as_str(), x.1.as_str())).collect();
|
||||
environment_variables.push(("KUBECONFIG", kubernetes_config.to_str().unwrap()));
|
||||
@@ -1208,7 +1214,7 @@ impl HelmChart for AwsVpcCniChart {
|
||||
false => info!("AWS CNI is already supported by Helm, nothing to do"),
|
||||
};
|
||||
|
||||
Ok(())
|
||||
Ok(None)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1268,13 +1274,7 @@ impl AwsVpcCniChart {
|
||||
Some("k8s-app=aws-node,app.kubernetes.io/managed-by=Helm"),
|
||||
environment_variables,
|
||||
) {
|
||||
Ok(x) => {
|
||||
if x.items.is_some() && x.items.unwrap().is_empty() {
|
||||
true
|
||||
} else {
|
||||
false
|
||||
}
|
||||
}
|
||||
Ok(x) => x.items.is_some() && x.items.unwrap().is_empty(),
|
||||
Err(e) => {
|
||||
error!(
|
||||
"error while getting daemonset info for chart {}, won't deploy CNI chart. {:?}",
|
||||
|
||||
@@ -769,6 +769,44 @@ impl<'a> Kubernetes for EKS<'a> {
|
||||
|
||||
send_to_customer(format!("Deploying EKS {} cluster deployment with id {}", self.name(), self.id()).as_str());
|
||||
|
||||
// temporary: remove helm/kube management from terraform
|
||||
match terraform_init_validate_state_list(temp_dir.as_str()) {
|
||||
Ok(x) => {
|
||||
let items_type = vec!["helm_release", "kubernetes_namespace"];
|
||||
for item in items_type {
|
||||
for entry in x.clone() {
|
||||
if entry.starts_with(item) {
|
||||
match terraform_exec(temp_dir.as_str(), vec!["state", "rm", &entry]) {
|
||||
Ok(_) => info!("successfully removed {}", &entry),
|
||||
Err(e) => {
|
||||
return Err(EngineError {
|
||||
cause: EngineErrorCause::Internal,
|
||||
scope: EngineErrorScope::Engine,
|
||||
execution_id: self.context.execution_id().to_string(),
|
||||
message: Some(format!(
|
||||
"error while trying to remove {} out of terraform state file. {:?}",
|
||||
entry, e.message
|
||||
)),
|
||||
})
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
Err(e) => {
|
||||
return Err(EngineError {
|
||||
cause: EngineErrorCause::Internal,
|
||||
scope: EngineErrorScope::Engine,
|
||||
execution_id: self.context.execution_id().to_string(),
|
||||
message: Some(format!(
|
||||
"error while getting the list of deployed elements by terraform. {:?}",
|
||||
e
|
||||
)),
|
||||
})
|
||||
}
|
||||
};
|
||||
|
||||
// terraform deployment dedicated to cloud resources
|
||||
match cast_simple_error_to_engine_error(
|
||||
self.engine_error_scope(),
|
||||
@@ -830,7 +868,12 @@ impl<'a> Kubernetes for EKS<'a> {
|
||||
cast_simple_error_to_engine_error(
|
||||
self.engine_error_scope(),
|
||||
self.context.execution_id(),
|
||||
deploy_charts_levels(&kubeconfig, &credentials_environment_variables, helm_charts_to_deploy),
|
||||
deploy_charts_levels(
|
||||
&kubeconfig,
|
||||
&credentials_environment_variables,
|
||||
helm_charts_to_deploy,
|
||||
self.context.is_dry_run_deploy(),
|
||||
),
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -1,8 +1,15 @@
|
||||
use crate::cloud_provider::helm::HelmAction::Deploy;
|
||||
use crate::cloud_provider::helm::HelmChartNamespaces::KubeSystem;
|
||||
use crate::cmd::helm::{helm_exec_uninstall_with_chart_info, helm_exec_upgrade_with_chart_info};
|
||||
use crate::cmd::kubectl::{kubectl_exec_rollout_restart_deployment, kubectl_exec_with_output};
|
||||
use crate::cmd::helm::{
|
||||
helm_exec_uninstall_with_chart_info, helm_exec_upgrade_with_chart_info, helm_upgrade_diff_with_chart_info,
|
||||
};
|
||||
use crate::cmd::kubectl::{
|
||||
kubectl_exec_get_configmap, kubectl_exec_rollout_restart_deployment, kubectl_exec_with_output,
|
||||
};
|
||||
use crate::cmd::structs::HelmHistoryRow;
|
||||
use crate::error::{SimpleError, SimpleErrorKind};
|
||||
use crate::utilities::calculate_hash;
|
||||
use std::collections::HashMap;
|
||||
use std::path::Path;
|
||||
use std::{fs, thread};
|
||||
use thread::spawn;
|
||||
@@ -84,7 +91,7 @@ pub fn get_chart_namespace(namespace: HelmChartNamespaces) -> String {
|
||||
}
|
||||
|
||||
pub trait HelmChart: Send {
|
||||
fn check_prerequisites(&self) -> Result<(), SimpleError> {
|
||||
fn check_prerequisites(&self) -> Result<Option<ChartPayload>, SimpleError> {
|
||||
let chart = self.get_chart_info();
|
||||
for file in chart.values_files.iter() {
|
||||
match fs::metadata(file) {
|
||||
@@ -100,7 +107,7 @@ pub trait HelmChart: Send {
|
||||
}
|
||||
}
|
||||
}
|
||||
Ok(())
|
||||
Ok(None)
|
||||
}
|
||||
|
||||
fn get_chart_info(&self) -> &ChartInfo;
|
||||
@@ -109,46 +116,64 @@ pub trait HelmChart: Send {
|
||||
get_chart_namespace(self.get_chart_info().namespace)
|
||||
}
|
||||
|
||||
fn pre_exec(&self, _kubernetes_config: &Path, _envs: &[(String, String)]) -> Result<(), SimpleError> {
|
||||
Ok(())
|
||||
fn pre_exec(
|
||||
&self,
|
||||
_kubernetes_config: &Path,
|
||||
_envs: &[(String, String)],
|
||||
_payload: Option<ChartPayload>,
|
||||
) -> Result<Option<ChartPayload>, SimpleError> {
|
||||
Ok(None)
|
||||
}
|
||||
|
||||
fn run(&self, kubernetes_config: &Path, envs: &[(String, String)]) -> Result<(), SimpleError> {
|
||||
fn run(&self, kubernetes_config: &Path, envs: &[(String, String)]) -> Result<Option<ChartPayload>, SimpleError> {
|
||||
self.check_prerequisites()?;
|
||||
self.pre_exec(&kubernetes_config, &envs)?;
|
||||
match self.exec(&kubernetes_config, &envs) {
|
||||
Ok(_) => {}
|
||||
Err(e) => {
|
||||
error!(
|
||||
"Error while deploying chart: {:?}",
|
||||
e.message.clone().expect("no message provided")
|
||||
);
|
||||
self.on_deploy_failure(&kubernetes_config, &envs)?;
|
||||
return Err(e);
|
||||
}
|
||||
self.pre_exec(&kubernetes_config, &envs, None)?;
|
||||
if let Err(e) = self.exec(&kubernetes_config, &envs, None) {
|
||||
error!(
|
||||
"Error while deploying chart: {:?}",
|
||||
e.message.clone().expect("no message provided")
|
||||
);
|
||||
self.on_deploy_failure(&kubernetes_config, &envs, None)?;
|
||||
return Err(e);
|
||||
};
|
||||
self.post_exec(&kubernetes_config, &envs)?;
|
||||
Ok(())
|
||||
self.post_exec(&kubernetes_config, &envs, None)?;
|
||||
Ok(None)
|
||||
}
|
||||
|
||||
fn exec(&self, kubernetes_config: &Path, envs: &[(String, String)]) -> Result<(), SimpleError> {
|
||||
fn exec(
|
||||
&self,
|
||||
kubernetes_config: &Path,
|
||||
envs: &[(String, String)],
|
||||
_payload: Option<ChartPayload>,
|
||||
) -> Result<Option<ChartPayload>, SimpleError> {
|
||||
let environment_variables = envs.iter().map(|x| (x.0.as_str(), x.1.as_str())).collect();
|
||||
match self.get_chart_info().action {
|
||||
HelmAction::Deploy => {
|
||||
helm_exec_upgrade_with_chart_info(kubernetes_config, &environment_variables, self.get_chart_info())
|
||||
helm_exec_upgrade_with_chart_info(kubernetes_config, &environment_variables, self.get_chart_info())?
|
||||
}
|
||||
HelmAction::Destroy => {
|
||||
helm_exec_uninstall_with_chart_info(kubernetes_config, &environment_variables, self.get_chart_info())
|
||||
helm_exec_uninstall_with_chart_info(kubernetes_config, &environment_variables, self.get_chart_info())?
|
||||
}
|
||||
HelmAction::Skip => Ok(()),
|
||||
HelmAction::Skip => {}
|
||||
}
|
||||
Ok(None)
|
||||
}
|
||||
|
||||
fn post_exec(&self, _kubernetes_config: &Path, _envs: &[(String, String)]) -> Result<(), SimpleError> {
|
||||
Ok(())
|
||||
fn post_exec(
|
||||
&self,
|
||||
_kubernetes_config: &Path,
|
||||
_envs: &[(String, String)],
|
||||
_payload: Option<ChartPayload>,
|
||||
) -> Result<Option<ChartPayload>, SimpleError> {
|
||||
Ok(None)
|
||||
}
|
||||
fn on_deploy_failure(&self, _kubernetes_config: &Path, _envs: &[(String, String)]) -> Result<(), SimpleError> {
|
||||
Ok(())
|
||||
fn on_deploy_failure(
|
||||
&self,
|
||||
_kubernetes_config: &Path,
|
||||
_envs: &[(String, String)],
|
||||
_payload: Option<ChartPayload>,
|
||||
) -> Result<Option<ChartPayload>, SimpleError> {
|
||||
Ok(None)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -162,6 +187,7 @@ fn deploy_parallel_charts(
|
||||
for chart in charts.into_iter() {
|
||||
let environment_variables = envs.to_owned();
|
||||
let path = kubernetes_config.to_path_buf();
|
||||
|
||||
let handle = spawn(move || chart.run(path.as_path(), &environment_variables));
|
||||
handles.push(handle);
|
||||
}
|
||||
@@ -187,9 +213,21 @@ fn deploy_parallel_charts(
|
||||
|
||||
pub fn deploy_charts_levels(
|
||||
kubernetes_config: &Path,
|
||||
envs: &[(String, String)],
|
||||
envs: &Vec<(String, String)>,
|
||||
charts: Vec<Vec<Box<dyn HelmChart>>>,
|
||||
dry_run: bool,
|
||||
) -> Result<(), SimpleError> {
|
||||
// first show diff
|
||||
for level in &charts {
|
||||
for chart in level {
|
||||
let _ = helm_upgrade_diff_with_chart_info(&kubernetes_config, envs, chart.get_chart_info());
|
||||
}
|
||||
}
|
||||
|
||||
// then apply
|
||||
if dry_run {
|
||||
return Ok(());
|
||||
}
|
||||
for level in charts.into_iter() {
|
||||
match deploy_parallel_charts(&kubernetes_config, &envs, level) {
|
||||
Ok(_) => {}
|
||||
@@ -209,6 +247,11 @@ pub struct CommonChart {
|
||||
pub chart_info: ChartInfo,
|
||||
}
|
||||
|
||||
/// using ChartPayload to pass random kind of data between each deployment steps against a chart deployment
|
||||
pub struct ChartPayload {
|
||||
data: HashMap<String, String>,
|
||||
}
|
||||
|
||||
impl CommonChart {}
|
||||
|
||||
impl HelmChart for CommonChart {
|
||||
@@ -229,11 +272,39 @@ impl HelmChart for CoreDNSConfigChart {
|
||||
&self.chart_info
|
||||
}
|
||||
|
||||
fn pre_exec(&self, kubernetes_config: &Path, envs: &[(String, String)]) -> Result<(), SimpleError> {
|
||||
fn pre_exec(
|
||||
&self,
|
||||
kubernetes_config: &Path,
|
||||
envs: &[(String, String)],
|
||||
_payload: Option<ChartPayload>,
|
||||
) -> Result<Option<ChartPayload>, SimpleError> {
|
||||
let kind = "configmap";
|
||||
let mut environment_variables: Vec<(&str, &str)> = envs.iter().map(|x| (x.0.as_str(), x.1.as_str())).collect();
|
||||
environment_variables.push(("KUBECONFIG", kubernetes_config.to_str().unwrap()));
|
||||
|
||||
// calculate current configmap checksum
|
||||
let current_configmap_hash = match kubectl_exec_get_configmap(
|
||||
&kubernetes_config,
|
||||
&get_chart_namespace(self.chart_info.namespace),
|
||||
&self.chart_info.name,
|
||||
environment_variables.clone(),
|
||||
) {
|
||||
Ok(cm) => {
|
||||
if cm.data.corefile.is_none() {
|
||||
return Err(SimpleError {
|
||||
kind: SimpleErrorKind::Other,
|
||||
message: Some("Corefile data structure is not found in CoreDNS configmap".to_string()),
|
||||
});
|
||||
};
|
||||
calculate_hash(&cm.data.corefile.unwrap())
|
||||
}
|
||||
Err(e) => return Err(e),
|
||||
};
|
||||
let mut configmap_hash = HashMap::new();
|
||||
configmap_hash.insert("checksum".to_string(), current_configmap_hash.to_string());
|
||||
let payload = ChartPayload { data: configmap_hash };
|
||||
|
||||
// set labels and annotations to give helm ownership
|
||||
info!("setting annotations and labels on {}/{}", &kind, &self.chart_info.name);
|
||||
let steps = || -> Result<(), SimpleError> {
|
||||
kubectl_exec_with_output(
|
||||
@@ -284,18 +355,157 @@ impl HelmChart for CoreDNSConfigChart {
|
||||
return Err(e);
|
||||
};
|
||||
|
||||
Ok(())
|
||||
Ok(Some(payload))
|
||||
}
|
||||
|
||||
// todo: it would be better to avoid rebooting coredns on every run
|
||||
fn post_exec(&self, kubernetes_config: &Path, envs: &[(String, String)]) -> Result<(), SimpleError> {
|
||||
let environment_variables = envs.iter().map(|x| (x.0.as_str(), x.1.as_str())).collect();
|
||||
fn run(&self, kubernetes_config: &Path, envs: &[(String, String)]) -> Result<Option<ChartPayload>, SimpleError> {
|
||||
self.check_prerequisites()?;
|
||||
let payload = match self.pre_exec(&kubernetes_config, &envs, None) {
|
||||
Ok(p) => match p {
|
||||
None => {
|
||||
return Err(SimpleError {
|
||||
kind: SimpleErrorKind::Other,
|
||||
message: Some(
|
||||
"CoreDNS configmap checksum couldn't be get, can't deploy CoreDNS chart".to_string(),
|
||||
),
|
||||
})
|
||||
}
|
||||
Some(p) => p,
|
||||
},
|
||||
Err(e) => return Err(e),
|
||||
};
|
||||
if let Err(e) = self.exec(&kubernetes_config, &envs, None) {
|
||||
error!(
|
||||
"Error while deploying chart: {:?}",
|
||||
e.message.clone().expect("no message provided")
|
||||
);
|
||||
self.on_deploy_failure(&kubernetes_config, &envs, None)?;
|
||||
return Err(e);
|
||||
};
|
||||
self.post_exec(&kubernetes_config, &envs, Some(payload))?;
|
||||
Ok(None)
|
||||
}
|
||||
|
||||
fn post_exec(
|
||||
&self,
|
||||
kubernetes_config: &Path,
|
||||
envs: &[(String, String)],
|
||||
payload: Option<ChartPayload>,
|
||||
) -> Result<Option<ChartPayload>, SimpleError> {
|
||||
let mut environment_variables = Vec::new();
|
||||
for env in envs {
|
||||
environment_variables.push((env.0.as_str(), env.1.as_str()));
|
||||
}
|
||||
|
||||
// detect configmap data change
|
||||
let previous_configmap_checksum = match &payload {
|
||||
None => {
|
||||
return Err(SimpleError {
|
||||
kind: SimpleErrorKind::Other,
|
||||
message: Some("missing payload, can't check coredns update".to_string()),
|
||||
})
|
||||
}
|
||||
Some(x) => match x.data.get("checksum") {
|
||||
None => {
|
||||
return Err(SimpleError {
|
||||
kind: SimpleErrorKind::Other,
|
||||
message: Some("missing configmap checksum, can't check coredns diff".to_string()),
|
||||
})
|
||||
}
|
||||
Some(c) => c.clone(),
|
||||
},
|
||||
};
|
||||
let current_configmap_checksum = match kubectl_exec_get_configmap(
|
||||
&kubernetes_config,
|
||||
&get_chart_namespace(self.chart_info.namespace),
|
||||
&self.chart_info.name,
|
||||
environment_variables.clone(),
|
||||
) {
|
||||
Ok(cm) => {
|
||||
if cm.data.corefile.is_none() {
|
||||
return Err(SimpleError {
|
||||
kind: SimpleErrorKind::Other,
|
||||
message: Some("Corefile data structure is not found in CoreDNS configmap".to_string()),
|
||||
});
|
||||
};
|
||||
calculate_hash(&cm.data.corefile.unwrap()).to_string()
|
||||
}
|
||||
Err(e) => return Err(e),
|
||||
};
|
||||
if previous_configmap_checksum == current_configmap_checksum {
|
||||
info!("no coredns config change detected, nothing to restart");
|
||||
return Ok(None);
|
||||
}
|
||||
|
||||
// avoid rebooting coredns on every run
|
||||
info!("coredns config change detected, proceed to config reload");
|
||||
kubectl_exec_rollout_restart_deployment(
|
||||
kubernetes_config,
|
||||
&self.chart_info.name,
|
||||
self.namespace().as_str(),
|
||||
environment_variables,
|
||||
)
|
||||
&environment_variables,
|
||||
)?;
|
||||
Ok(None)
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_latest_successful_deployment(helm_history_list: &[HelmHistoryRow]) -> Result<HelmHistoryRow, SimpleError> {
|
||||
let mut helm_history_reversed = helm_history_list.to_owned();
|
||||
helm_history_reversed.reverse();
|
||||
|
||||
for revision in helm_history_reversed.clone() {
|
||||
if revision.status == "deployed" {
|
||||
return Ok(revision);
|
||||
}
|
||||
}
|
||||
|
||||
Err(SimpleError {
|
||||
kind: SimpleErrorKind::Other,
|
||||
message: Some(format!(
|
||||
"no succeed revision found for chart {}",
|
||||
helm_history_reversed[0].chart
|
||||
)),
|
||||
})
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use crate::cloud_provider::helm::get_latest_successful_deployment;
|
||||
use crate::cmd::structs::HelmHistoryRow;
|
||||
|
||||
#[test]
|
||||
fn test_last_succeeded_deployment() {
|
||||
let payload = r#"
|
||||
[
|
||||
{
|
||||
"revision": 1,
|
||||
"updated": "2021-06-17T08:37:37.687890192+02:00",
|
||||
"status": "superseded",
|
||||
"chart": "coredns-config-0.1.0",
|
||||
"app_version": "0.1",
|
||||
"description": "Install complete"
|
||||
},
|
||||
{
|
||||
"revision": 2,
|
||||
"updated": "2021-06-17T12:34:08.958006444+02:00",
|
||||
"status": "deployed",
|
||||
"chart": "coredns-config-0.1.0",
|
||||
"app_version": "0.1",
|
||||
"description": "Upgrade complete"
|
||||
},
|
||||
{
|
||||
"revision": 3,
|
||||
"updated": "2021-06-17T12:36:08.958006444+02:00",
|
||||
"status": "failed",
|
||||
"chart": "coredns-config-0.1.0",
|
||||
"app_version": "0.1",
|
||||
"description": "Failed complete"
|
||||
}
|
||||
]
|
||||
"#;
|
||||
|
||||
let results = serde_json::from_str::<Vec<HelmHistoryRow>>(payload).unwrap();
|
||||
let final_succeed = get_latest_successful_deployment(&results).unwrap();
|
||||
assert_eq!(results[1].updated, final_succeed.updated);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -449,7 +449,7 @@ where
|
||||
kubernetes_config_file_path.as_str(),
|
||||
environment.namespace(),
|
||||
helm_release_name.as_str(),
|
||||
kubernetes.cloud_provider().credentials_environment_variables(),
|
||||
&kubernetes.cloud_provider().credentials_environment_variables(),
|
||||
),
|
||||
)?;
|
||||
|
||||
@@ -1086,7 +1086,7 @@ pub fn do_stateless_service_cleanup(
|
||||
kubernetes_config_file_path.as_str(),
|
||||
environment.namespace(),
|
||||
helm_release_name,
|
||||
kubernetes.cloud_provider().credentials_environment_variables(),
|
||||
&kubernetes.cloud_provider().credentials_environment_variables(),
|
||||
),
|
||||
)?;
|
||||
|
||||
|
||||
@@ -54,7 +54,7 @@ where
|
||||
chart_root_dir.as_ref().to_str().unwrap()
|
||||
);
|
||||
|
||||
let helm_history_rows = helm_exec_history(kubernetes_config.as_ref(), namespace, release_name, envs)?;
|
||||
let helm_history_rows = helm_exec_history(kubernetes_config.as_ref(), namespace, release_name, &envs)?;
|
||||
|
||||
// take the last deployment from helm history - or return none if there is no history
|
||||
Ok(helm_history_rows
|
||||
@@ -317,7 +317,7 @@ pub fn helm_exec_history<P>(
|
||||
kubernetes_config: P,
|
||||
namespace: &str,
|
||||
release_name: &str,
|
||||
envs: Vec<(&str, &str)>,
|
||||
envs: &Vec<(&str, &str)>,
|
||||
) -> Result<Vec<HelmHistoryRow>, SimpleError>
|
||||
where
|
||||
P: AsRef<Path>,
|
||||
@@ -335,7 +335,7 @@ where
|
||||
"json",
|
||||
release_name,
|
||||
],
|
||||
envs,
|
||||
envs.clone(),
|
||||
|out| match out {
|
||||
Ok(line) => output_string = line,
|
||||
Err(err) => error!("{:?}", err),
|
||||
@@ -489,7 +489,7 @@ where
|
||||
chart_root_dir.as_ref().to_str().unwrap()
|
||||
);
|
||||
|
||||
let helm_history_rows = helm_exec_history(kubernetes_config.as_ref(), namespace, release_name, envs)?;
|
||||
let helm_history_rows = helm_exec_history(kubernetes_config.as_ref(), namespace, release_name, &envs)?;
|
||||
|
||||
// take the last deployment from helm history - or return none if there is no history
|
||||
Ok(helm_history_rows
|
||||
@@ -558,6 +558,80 @@ where
|
||||
Ok(helms_charts)
|
||||
}
|
||||
|
||||
pub fn helm_upgrade_diff_with_chart_info<P>(
|
||||
kubernetes_config: P,
|
||||
envs: &Vec<(String, String)>,
|
||||
chart: &ChartInfo,
|
||||
) -> Result<(), SimpleError>
|
||||
where
|
||||
P: AsRef<Path>,
|
||||
{
|
||||
let mut environment_variables = envs.clone();
|
||||
environment_variables.push(("HELM_NAMESPACE".to_string(), get_chart_namespace(chart.namespace)));
|
||||
|
||||
let mut args_string: Vec<String> = vec![
|
||||
"diff",
|
||||
"upgrade",
|
||||
"--allow-unreleased",
|
||||
"--kubeconfig",
|
||||
kubernetes_config.as_ref().to_str().unwrap(),
|
||||
]
|
||||
.into_iter()
|
||||
.map(|x| x.to_string())
|
||||
.collect();
|
||||
|
||||
// overrides and files overrides
|
||||
for value in &chart.values {
|
||||
args_string.push("--set".to_string());
|
||||
args_string.push(format!("{}={}", value.key, value.value));
|
||||
}
|
||||
for value_file in &chart.values_files {
|
||||
args_string.push("-f".to_string());
|
||||
args_string.push(value_file.clone());
|
||||
}
|
||||
for value_file in &chart.yaml_files_content {
|
||||
let file_path = format!("{}/{}", chart.path, &value_file.filename);
|
||||
let file_create = || -> Result<(), Error> {
|
||||
let mut file = File::create(&file_path)?;
|
||||
file.write_all(value_file.yaml_content.as_bytes())?;
|
||||
Ok(())
|
||||
};
|
||||
// no need to validate yaml as it will be done by helm
|
||||
if let Err(e) = file_create() {
|
||||
return Err(SimpleError {
|
||||
kind: SimpleErrorKind::Other,
|
||||
message: Some(format!(
|
||||
"error while writing yaml content to file {}\n{}\n{}",
|
||||
&file_path, value_file.yaml_content, e
|
||||
)),
|
||||
});
|
||||
};
|
||||
|
||||
args_string.push("-f".to_string());
|
||||
args_string.push(file_path.clone());
|
||||
}
|
||||
|
||||
// add last elements
|
||||
args_string.push(chart.name.to_string());
|
||||
args_string.push(chart.path.to_string());
|
||||
|
||||
helm_exec_with_output(
|
||||
args_string.iter().map(|x| x.as_str()).collect(),
|
||||
environment_variables
|
||||
.iter()
|
||||
.map(|x| (x.0.as_str(), x.1.as_str()))
|
||||
.collect(),
|
||||
|out| match out {
|
||||
Ok(line) => info!("{}", line),
|
||||
Err(err) => error!("{}", &err),
|
||||
},
|
||||
|out| match out {
|
||||
Ok(line) => error!("{}", line),
|
||||
Err(err) => error!("{}", err),
|
||||
},
|
||||
)
|
||||
}
|
||||
|
||||
pub fn helm_exec(args: Vec<&str>, envs: Vec<(&str, &str)>) -> Result<(), SimpleError> {
|
||||
helm_exec_with_output(
|
||||
args,
|
||||
|
||||
@@ -9,8 +9,8 @@ use serde::de::DeserializeOwned;
|
||||
use crate::cloud_provider::digitalocean::models::svc::DOKubernetesList;
|
||||
use crate::cloud_provider::metrics::KubernetesApiMetrics;
|
||||
use crate::cmd::structs::{
|
||||
Daemonset, Item, KubernetesEvent, KubernetesJob, KubernetesKind, KubernetesList, KubernetesNode, KubernetesPod,
|
||||
KubernetesPodStatusPhase, KubernetesService, KubernetesVersion, LabelsContent,
|
||||
Configmap, Daemonset, Item, KubernetesEvent, KubernetesJob, KubernetesKind, KubernetesList, KubernetesNode,
|
||||
KubernetesPod, KubernetesPodStatusPhase, KubernetesService, KubernetesVersion, LabelsContent,
|
||||
};
|
||||
use crate::cmd::utilities::exec_with_envs_and_output;
|
||||
use crate::constants::KUBECONFIG;
|
||||
@@ -217,7 +217,6 @@ where
|
||||
return Ok(None);
|
||||
}
|
||||
|
||||
// FIXME unsafe unwrap here?
|
||||
Ok(Some(
|
||||
result
|
||||
.items
|
||||
@@ -242,7 +241,6 @@ pub fn kubectl_exec_is_pod_ready_with_retry<P>(
|
||||
where
|
||||
P: AsRef<Path>,
|
||||
{
|
||||
// TODO check this
|
||||
let result = retry::retry(Fibonacci::from_millis(3000).take(10), || {
|
||||
let r = crate::cmd::kubectl::kubectl_exec_is_pod_ready(
|
||||
kubernetes_config.as_ref(),
|
||||
@@ -311,7 +309,6 @@ pub fn kubectl_exec_is_job_ready_with_retry<P>(
|
||||
where
|
||||
P: AsRef<Path>,
|
||||
{
|
||||
// TODO check this
|
||||
let result = retry::retry(Fibonacci::from_millis(3000).take(10), || {
|
||||
let r = crate::cmd::kubectl::kubectl_exec_is_job_ready(
|
||||
kubernetes_config.as_ref(),
|
||||
@@ -730,12 +727,12 @@ pub fn kubectl_exec_rollout_restart_deployment<P>(
|
||||
kubernetes_config: P,
|
||||
name: &str,
|
||||
namespace: &str,
|
||||
envs: Vec<(&str, &str)>,
|
||||
envs: &Vec<(&str, &str)>,
|
||||
) -> Result<(), SimpleError>
|
||||
where
|
||||
P: AsRef<Path>,
|
||||
{
|
||||
let mut environment_variables: Vec<(&str, &str)> = envs;
|
||||
let mut environment_variables: Vec<(&str, &str)> = envs.clone();
|
||||
environment_variables.push(("KUBECONFIG", kubernetes_config.as_ref().to_str().unwrap()));
|
||||
let args = vec!["-n", namespace, "rollout", "restart", "deployment", name];
|
||||
|
||||
@@ -797,6 +794,22 @@ where
|
||||
)
|
||||
}
|
||||
|
||||
pub fn kubectl_exec_get_configmap<P>(
|
||||
kubernetes_config: P,
|
||||
namespace: &str,
|
||||
name: &str,
|
||||
envs: Vec<(&str, &str)>,
|
||||
) -> Result<Configmap, SimpleError>
|
||||
where
|
||||
P: AsRef<Path>,
|
||||
{
|
||||
kubectl_exec::<P, Configmap>(
|
||||
vec!["get", "configmap", "-o", "json", "-n", namespace, &name],
|
||||
kubernetes_config,
|
||||
envs,
|
||||
)
|
||||
}
|
||||
|
||||
pub fn kubectl_exec_get_event<P>(
|
||||
kubernetes_config: P,
|
||||
namespace: &str,
|
||||
|
||||
@@ -42,6 +42,17 @@ pub struct Metadata {
|
||||
pub uid: String,
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize)]
|
||||
pub struct Configmap {
|
||||
pub data: ConfigmapData,
|
||||
}
|
||||
|
||||
#[derive(Hash, Serialize, Deserialize)]
|
||||
pub struct ConfigmapData {
|
||||
#[serde(rename = "Corefile")]
|
||||
pub corefile: Option<String>,
|
||||
}
|
||||
|
||||
#[derive(Default, Serialize, Deserialize)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub struct Daemonset {
|
||||
@@ -261,6 +272,7 @@ impl HelmChart {
|
||||
#[derive(Serialize, Deserialize, Clone, Eq, PartialEq, Hash)]
|
||||
pub struct HelmHistoryRow {
|
||||
pub revision: u16,
|
||||
pub updated: String,
|
||||
pub status: String,
|
||||
pub chart: String,
|
||||
pub app_version: String,
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
use reqwest::header;
|
||||
use reqwest::header::{HeaderMap, HeaderValue};
|
||||
use std::collections::hash_map::DefaultHasher;
|
||||
use std::hash::{Hash, Hasher};
|
||||
|
||||
// generate the right header for digital ocean with token
|
||||
pub fn get_header_with_bearer(token: &str) -> HeaderMap<HeaderValue> {
|
||||
@@ -8,3 +10,9 @@ pub fn get_header_with_bearer(token: &str) -> HeaderMap<HeaderValue> {
|
||||
headers.insert("Authorization", format!("Bearer {}", token).parse().unwrap());
|
||||
headers
|
||||
}
|
||||
|
||||
pub fn calculate_hash<T: Hash>(t: &T) -> u64 {
|
||||
let mut s = DefaultHasher::new();
|
||||
t.hash(&mut s);
|
||||
s.finish()
|
||||
}
|
||||
|
||||
351
test_utilities/Cargo.lock
generated
351
test_utilities/Cargo.lock
generated
@@ -39,9 +39,9 @@ version = "0.1.42"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "8d3a45e77e34375a7923b1e8febb049bb011f064714a8e17a1a616fef01da13d"
|
||||
dependencies = [
|
||||
"proc-macro2 1.0.24",
|
||||
"proc-macro2 1.0.27",
|
||||
"quote 1.0.8",
|
||||
"syn 1.0.56",
|
||||
"syn 1.0.73",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -257,9 +257,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "356fd654e9a433e730a826d4e01ea2414ab122ca8a5374eadf6c43a6090f8dd3"
|
||||
dependencies = [
|
||||
"proc-macro-error",
|
||||
<<<<<<< HEAD
|
||||
"proc-macro2 1.0.24",
|
||||
"quote 1.0.8",
|
||||
"syn 1.0.56",
|
||||
=======
|
||||
"proc-macro2 1.0.27",
|
||||
"quote 1.0.8",
|
||||
"syn 1.0.73",
|
||||
>>>>>>> 8ae8953 (fix: do not restart coredns if not necessary)
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -460,6 +466,12 @@ dependencies = [
|
||||
"winapi 0.3.9",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "data-encoding"
|
||||
version = "2.3.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "3ee2393c4a91429dffb4bedf19f4d6abf27d8a732c8ce4980305d782e5426d57"
|
||||
|
||||
[[package]]
|
||||
name = "deunicode"
|
||||
version = "0.4.3"
|
||||
@@ -584,9 +596,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7c5f0096a91d210159eceb2ff5e1c4da18388a170e1e3ce948aac9c8fdbbf595"
|
||||
dependencies = [
|
||||
"heck",
|
||||
"proc-macro2 1.0.24",
|
||||
"proc-macro2 1.0.27",
|
||||
"quote 1.0.8",
|
||||
"syn 1.0.56",
|
||||
"syn 1.0.73",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -625,9 +637,9 @@ version = "0.1.8"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "aa4da3c766cd7a0db8242e326e9e4e081edd567072893ed320008189715366a4"
|
||||
dependencies = [
|
||||
"proc-macro2 1.0.24",
|
||||
"proc-macro2 1.0.27",
|
||||
"quote 1.0.8",
|
||||
"syn 1.0.56",
|
||||
"syn 1.0.73",
|
||||
"synstructure",
|
||||
]
|
||||
|
||||
@@ -722,9 +734,9 @@ checksum = "4c7e4c2612746b0df8fed4ce0c69156021b704c9aefa360311c04e6e9e002eed"
|
||||
|
||||
[[package]]
|
||||
name = "futures"
|
||||
version = "0.3.8"
|
||||
version = "0.3.15"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9b3b0c040a1fe6529d30b3c5944b280c7f0dcb2930d2c3062bca967b602583d0"
|
||||
checksum = "0e7e43a803dae2fa37c1f6a8fe121e1f7bf9548b4dfc0522a42f34145dadfc27"
|
||||
dependencies = [
|
||||
"futures-channel",
|
||||
"futures-core",
|
||||
@@ -737,9 +749,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "futures-channel"
|
||||
version = "0.3.8"
|
||||
version = "0.3.15"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "4b7109687aa4e177ef6fe84553af6280ef2778bdb7783ba44c9dc3399110fe64"
|
||||
checksum = "e682a68b29a882df0545c143dc3646daefe80ba479bcdede94d5a703de2871e2"
|
||||
dependencies = [
|
||||
"futures-core",
|
||||
"futures-sink",
|
||||
@@ -747,9 +759,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "futures-core"
|
||||
version = "0.3.8"
|
||||
version = "0.3.15"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "847ce131b72ffb13b6109a221da9ad97a64cbe48feb1028356b836b47b8f1748"
|
||||
checksum = "0402f765d8a89a26043b889b26ce3c4679d268fa6bb22cd7c6aad98340e179d1"
|
||||
|
||||
[[package]]
|
||||
name = "futures-cpupool"
|
||||
@@ -763,9 +775,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "futures-executor"
|
||||
version = "0.3.8"
|
||||
version = "0.3.15"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "4caa2b2b68b880003057c1dd49f1ed937e38f22fcf6c212188a121f08cf40a65"
|
||||
checksum = "badaa6a909fac9e7236d0620a2f57f7664640c56575b71a7552fbd68deafab79"
|
||||
dependencies = [
|
||||
"futures-core",
|
||||
"futures-task",
|
||||
@@ -774,43 +786,42 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "futures-io"
|
||||
version = "0.3.8"
|
||||
version = "0.3.15"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "611834ce18aaa1bd13c4b374f5d653e1027cf99b6b502584ff8c9a64413b30bb"
|
||||
checksum = "acc499defb3b348f8d8f3f66415835a9131856ff7714bf10dadfc4ec4bdb29a1"
|
||||
|
||||
[[package]]
|
||||
name = "futures-macro"
|
||||
version = "0.3.8"
|
||||
version = "0.3.15"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "77408a692f1f97bcc61dc001d752e00643408fbc922e4d634c655df50d595556"
|
||||
checksum = "a4c40298486cdf52cc00cd6d6987892ba502c7656a16a4192a9992b1ccedd121"
|
||||
dependencies = [
|
||||
"autocfg 1.0.1",
|
||||
"proc-macro-hack",
|
||||
"proc-macro2 1.0.24",
|
||||
"proc-macro2 1.0.27",
|
||||
"quote 1.0.8",
|
||||
"syn 1.0.56",
|
||||
"syn 1.0.73",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "futures-sink"
|
||||
version = "0.3.8"
|
||||
version = "0.3.15"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f878195a49cee50e006b02b93cf7e0a95a38ac7b776b4c4d9cc1207cd20fcb3d"
|
||||
checksum = "a57bead0ceff0d6dde8f465ecd96c9338121bb7717d3e7b108059531870c4282"
|
||||
|
||||
[[package]]
|
||||
name = "futures-task"
|
||||
version = "0.3.8"
|
||||
version = "0.3.15"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7c554eb5bf48b2426c4771ab68c6b14468b6e76cc90996f528c3338d761a4d0d"
|
||||
dependencies = [
|
||||
"once_cell",
|
||||
]
|
||||
checksum = "8a16bef9fc1a4dddb5bee51c989e3fbba26569cbb0e31f5b303c184e3dd33dae"
|
||||
|
||||
[[package]]
|
||||
name = "futures-util"
|
||||
version = "0.3.8"
|
||||
version = "0.3.15"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d304cff4a7b99cfb7986f7d43fbe93d175e72e704a8860787cc95e9ffd85cbd2"
|
||||
checksum = "feb5c238d27e2bf94ffdfd27b2c29e3df4a68c4193bb6427384259e2bf191967"
|
||||
dependencies = [
|
||||
"autocfg 1.0.1",
|
||||
"futures-channel",
|
||||
"futures-core",
|
||||
"futures-io",
|
||||
@@ -818,7 +829,7 @@ dependencies = [
|
||||
"futures-sink",
|
||||
"futures-task",
|
||||
"memchr",
|
||||
"pin-project 1.0.2",
|
||||
"pin-project-lite 0.2.6",
|
||||
"pin-utils",
|
||||
"proc-macro-hack",
|
||||
"proc-macro-nested",
|
||||
@@ -984,11 +995,30 @@ dependencies = [
|
||||
"indexmap",
|
||||
"slab",
|
||||
"tokio 0.2.24",
|
||||
"tokio-util",
|
||||
"tokio-util 0.3.1",
|
||||
"tracing",
|
||||
"tracing-futures",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "h2"
|
||||
version = "0.3.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "825343c4eef0b63f541f8903f395dc5beb362a979b5799a84062527ef1e37726"
|
||||
dependencies = [
|
||||
"bytes 1.0.1",
|
||||
"fnv",
|
||||
"futures-core",
|
||||
"futures-sink",
|
||||
"futures-util",
|
||||
"http 0.2.1",
|
||||
"indexmap",
|
||||
"slab",
|
||||
"tokio 1.7.0",
|
||||
"tokio-util 0.6.7",
|
||||
"tracing",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "hashbrown"
|
||||
version = "0.9.1"
|
||||
@@ -1109,7 +1139,7 @@ checksum = "5dfb77c123b4e2f72a2069aeae0b4b4949cc7e966df277813fc16347e7549737"
|
||||
dependencies = [
|
||||
"bytes 1.0.1",
|
||||
"http 0.2.1",
|
||||
"pin-project-lite 0.2.0",
|
||||
"pin-project-lite 0.2.6",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -1200,6 +1230,7 @@ dependencies = [
|
||||
"futures-channel",
|
||||
"futures-core",
|
||||
"futures-util",
|
||||
"h2 0.3.3",
|
||||
"http 0.2.1",
|
||||
"http-body 0.4.1",
|
||||
"httparse",
|
||||
@@ -1207,7 +1238,7 @@ dependencies = [
|
||||
"itoa",
|
||||
"pin-project 1.0.2",
|
||||
"socket2 0.4.0",
|
||||
"tokio 1.5.0",
|
||||
"tokio 1.7.0",
|
||||
"tower-service",
|
||||
"tracing",
|
||||
"want 0.3.0",
|
||||
@@ -1248,7 +1279,7 @@ dependencies = [
|
||||
"bytes 1.0.1",
|
||||
"hyper 0.14.7",
|
||||
"native-tls",
|
||||
"tokio 1.5.0",
|
||||
"tokio 1.7.0",
|
||||
"tokio-native-tls",
|
||||
]
|
||||
|
||||
@@ -1877,9 +1908,9 @@ checksum = "99b8db626e31e5b81787b9783425769681b347011cc59471e33ea46d2ea0cf55"
|
||||
dependencies = [
|
||||
"pest",
|
||||
"pest_meta",
|
||||
"proc-macro2 1.0.24",
|
||||
"proc-macro2 1.0.27",
|
||||
"quote 1.0.8",
|
||||
"syn 1.0.56",
|
||||
"syn 1.0.73",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -1917,9 +1948,9 @@ version = "0.4.27"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "65ad2ae56b6abe3a1ee25f15ee605bacadb9a764edaba9c2bf4103800d4a1895"
|
||||
dependencies = [
|
||||
"proc-macro2 1.0.24",
|
||||
"proc-macro2 1.0.27",
|
||||
"quote 1.0.8",
|
||||
"syn 1.0.56",
|
||||
"syn 1.0.73",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -1928,9 +1959,9 @@ version = "1.0.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f8e8d2bf0b23038a4424865103a4df472855692821aab4e4f5c3312d461d9e5f"
|
||||
dependencies = [
|
||||
"proc-macro2 1.0.24",
|
||||
"proc-macro2 1.0.27",
|
||||
"quote 1.0.8",
|
||||
"syn 1.0.56",
|
||||
"syn 1.0.73",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -1941,9 +1972,9 @@ checksum = "c917123afa01924fc84bb20c4c03f004d9c38e5127e3c039bbf7f4b9c76a2f6b"
|
||||
|
||||
[[package]]
|
||||
name = "pin-project-lite"
|
||||
version = "0.2.0"
|
||||
version = "0.2.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "6b063f57ec186e6140e2b8b6921e5f1bd89c7356dda5b33acc5401203ca6131c"
|
||||
checksum = "dc0e1f259c92177c30a4c9d177246edd0a3568b25756a977d0632cf8fa37e905"
|
||||
|
||||
[[package]]
|
||||
name = "pin-utils"
|
||||
@@ -1970,9 +2001,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c"
|
||||
dependencies = [
|
||||
"proc-macro-error-attr",
|
||||
<<<<<<< HEAD
|
||||
"proc-macro2 1.0.24",
|
||||
"quote 1.0.8",
|
||||
"syn 1.0.56",
|
||||
=======
|
||||
"proc-macro2 1.0.27",
|
||||
"quote 1.0.8",
|
||||
"syn 1.0.73",
|
||||
>>>>>>> 8ae8953 (fix: do not restart coredns if not necessary)
|
||||
"version_check",
|
||||
]
|
||||
|
||||
@@ -1982,7 +2019,11 @@ version = "1.0.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869"
|
||||
dependencies = [
|
||||
<<<<<<< HEAD
|
||||
"proc-macro2 1.0.24",
|
||||
=======
|
||||
"proc-macro2 1.0.27",
|
||||
>>>>>>> 8ae8953 (fix: do not restart coredns if not necessary)
|
||||
"quote 1.0.8",
|
||||
"version_check",
|
||||
]
|
||||
@@ -2010,9 +2051,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "proc-macro2"
|
||||
version = "1.0.24"
|
||||
version = "1.0.27"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1e0704ee1a7e00d7bb417d0770ea303c1bccbabf0ef1667dae92b5967f5f8a71"
|
||||
checksum = "f0d8caf72986c1a598726adc988bb5984792ef84f5ee5aa50209145ee8077038"
|
||||
dependencies = [
|
||||
"unicode-xid 0.2.1",
|
||||
]
|
||||
@@ -2040,13 +2081,13 @@ dependencies = [
|
||||
"digitalocean",
|
||||
"dirs",
|
||||
"flate2",
|
||||
"futures 0.3.8",
|
||||
"futures 0.3.15",
|
||||
"gethostname",
|
||||
"git2",
|
||||
"itertools",
|
||||
"lazy_static",
|
||||
"rand 0.7.3",
|
||||
"reqwest 0.10.8",
|
||||
"rand 0.8.3",
|
||||
"reqwest 0.11.3",
|
||||
"retry",
|
||||
"rusoto_core",
|
||||
"rusoto_credential",
|
||||
@@ -2064,7 +2105,7 @@ dependencies = [
|
||||
"tar",
|
||||
"tera",
|
||||
"timeout-readwrite",
|
||||
"tokio 1.5.0",
|
||||
"tokio 1.7.0",
|
||||
"tracing",
|
||||
"tracing-subscriber",
|
||||
"trust-dns-resolver",
|
||||
@@ -2092,7 +2133,7 @@ version = "1.0.8"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "991431c3519a3f36861882da93630ce66b52918dcf1b8e2fd66b397fc96f28df"
|
||||
dependencies = [
|
||||
"proc-macro2 1.0.24",
|
||||
"proc-macro2 1.0.27",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -2470,6 +2511,41 @@ dependencies = [
|
||||
"winreg 0.7.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "reqwest"
|
||||
version = "0.11.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2296f2fac53979e8ccbc4a1136b25dcefd37be9ed7e4a1f6b05a6029c84ff124"
|
||||
dependencies = [
|
||||
"base64 0.13.0",
|
||||
"bytes 1.0.1",
|
||||
"encoding_rs",
|
||||
"futures-core",
|
||||
"futures-util",
|
||||
"http 0.2.1",
|
||||
"http-body 0.4.1",
|
||||
"hyper 0.14.7",
|
||||
"hyper-tls 0.5.0",
|
||||
"ipnet",
|
||||
"js-sys",
|
||||
"lazy_static",
|
||||
"log",
|
||||
"mime",
|
||||
"native-tls",
|
||||
"percent-encoding 2.1.0",
|
||||
"pin-project-lite 0.2.6",
|
||||
"serde",
|
||||
"serde_json",
|
||||
"serde_urlencoded 0.7.0",
|
||||
"tokio 1.7.0",
|
||||
"tokio-native-tls",
|
||||
"url 2.2.0",
|
||||
"wasm-bindgen",
|
||||
"wasm-bindgen-futures",
|
||||
"web-sys",
|
||||
"winreg 0.7.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "resolv-conf"
|
||||
version = "0.7.0"
|
||||
@@ -2499,7 +2575,7 @@ dependencies = [
|
||||
"base64 0.13.0",
|
||||
"bytes 1.0.1",
|
||||
"crc32fast",
|
||||
"futures 0.3.8",
|
||||
"futures 0.3.15",
|
||||
"http 0.2.1",
|
||||
"hyper 0.14.7",
|
||||
"hyper-tls 0.5.0",
|
||||
@@ -2510,7 +2586,7 @@ dependencies = [
|
||||
"rustc_version",
|
||||
"serde",
|
||||
"serde_json",
|
||||
"tokio 1.5.0",
|
||||
"tokio 1.7.0",
|
||||
"xml-rs",
|
||||
]
|
||||
|
||||
@@ -2523,12 +2599,12 @@ dependencies = [
|
||||
"async-trait",
|
||||
"chrono",
|
||||
"dirs-next",
|
||||
"futures 0.3.8",
|
||||
"futures 0.3.15",
|
||||
"hyper 0.14.7",
|
||||
"serde",
|
||||
"serde_json",
|
||||
"shlex",
|
||||
"tokio 1.5.0",
|
||||
"tokio 1.7.0",
|
||||
"zeroize",
|
||||
]
|
||||
|
||||
@@ -2540,7 +2616,7 @@ checksum = "0f26af40f36409cb8fae3069690f78f638f747b55c7b90f338d5ed36016b0cda"
|
||||
dependencies = [
|
||||
"async-trait",
|
||||
"bytes 1.0.1",
|
||||
"futures 0.3.8",
|
||||
"futures 0.3.15",
|
||||
"rusoto_core",
|
||||
"serde",
|
||||
"serde_json",
|
||||
@@ -2554,7 +2630,7 @@ checksum = "3ab222491e156f033926d40c663d57a6b60a5c5ec94e696e66f52a0c64d20dbf"
|
||||
dependencies = [
|
||||
"async-trait",
|
||||
"bytes 1.0.1",
|
||||
"futures 0.3.8",
|
||||
"futures 0.3.15",
|
||||
"rusoto_core",
|
||||
"serde",
|
||||
"serde_json",
|
||||
@@ -2568,7 +2644,7 @@ checksum = "91d7e1e577d4102a9d80d5eafc0547064d3e8817d094f00e95ae45d03ae3accb"
|
||||
dependencies = [
|
||||
"async-trait",
|
||||
"bytes 1.0.1",
|
||||
"futures 0.3.8",
|
||||
"futures 0.3.15",
|
||||
"rusoto_core",
|
||||
"serde",
|
||||
"serde_derive",
|
||||
@@ -2583,7 +2659,7 @@ checksum = "0268b898abed79c59f8468c4991d0f97ed0925049db228cff623ecac44c5b3a6"
|
||||
dependencies = [
|
||||
"async-trait",
|
||||
"bytes 1.0.1",
|
||||
"futures 0.3.8",
|
||||
"futures 0.3.15",
|
||||
"rusoto_core",
|
||||
"serde_urlencoded 0.6.1",
|
||||
"xml-rs",
|
||||
@@ -2597,7 +2673,7 @@ checksum = "abc3f56f14ccf91f880b9a9c2d0556d8523e8c155041c54db155b384a1dd1119"
|
||||
dependencies = [
|
||||
"async-trait",
|
||||
"bytes 1.0.1",
|
||||
"futures 0.3.8",
|
||||
"futures 0.3.15",
|
||||
"rusoto_core",
|
||||
"xml-rs",
|
||||
]
|
||||
@@ -2610,7 +2686,7 @@ checksum = "5486e6b1673ab3e0ba1ded284fb444845fe1b7f41d13989a54dd60f62a7b2baa"
|
||||
dependencies = [
|
||||
"base64 0.13.0",
|
||||
"bytes 1.0.1",
|
||||
"futures 0.3.8",
|
||||
"futures 0.3.15",
|
||||
"hex",
|
||||
"hmac",
|
||||
"http 0.2.1",
|
||||
@@ -2618,13 +2694,13 @@ dependencies = [
|
||||
"log",
|
||||
"md5",
|
||||
"percent-encoding 2.1.0",
|
||||
"pin-project-lite 0.2.0",
|
||||
"pin-project-lite 0.2.6",
|
||||
"rusoto_credential",
|
||||
"rustc_version",
|
||||
"serde",
|
||||
"sha2",
|
||||
"time 0.2.24",
|
||||
"tokio 1.5.0",
|
||||
"tokio 1.7.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -2636,7 +2712,7 @@ dependencies = [
|
||||
"async-trait",
|
||||
"bytes 1.0.1",
|
||||
"chrono",
|
||||
"futures 0.3.8",
|
||||
"futures 0.3.15",
|
||||
"rusoto_core",
|
||||
"serde_urlencoded 0.6.1",
|
||||
"xml-rs",
|
||||
@@ -2753,29 +2829,29 @@ checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3"
|
||||
|
||||
[[package]]
|
||||
name = "serde"
|
||||
version = "1.0.118"
|
||||
version = "1.0.126"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "06c64263859d87aa2eb554587e2d23183398d617427327cf2b3d0ed8c69e4800"
|
||||
checksum = "ec7505abeacaec74ae4778d9d9328fe5a5d04253220a85c4ee022239fc996d03"
|
||||
dependencies = [
|
||||
"serde_derive",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "serde_derive"
|
||||
version = "1.0.118"
|
||||
version = "1.0.126"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c84d3526699cd55261af4b941e4e725444df67aa4f9e6a3564f18030d12672df"
|
||||
checksum = "963a7dbc9895aeac7ac90e74f34a5d5261828f79df35cbed41e10189d3804d43"
|
||||
dependencies = [
|
||||
"proc-macro2 1.0.24",
|
||||
"proc-macro2 1.0.27",
|
||||
"quote 1.0.8",
|
||||
"syn 1.0.56",
|
||||
"syn 1.0.73",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "serde_json"
|
||||
version = "1.0.61"
|
||||
version = "1.0.64"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "4fceb2595057b6891a4ee808f70054bd2d12f0e97f1cbb78689b59f676df325a"
|
||||
checksum = "799e97dc9fdae36a5c8b8f2cae9ce2ee9fdce2058c57a93e6099d919fd982f79"
|
||||
dependencies = [
|
||||
"itoa",
|
||||
"ryu",
|
||||
@@ -2806,6 +2882,18 @@ dependencies = [
|
||||
"url 2.2.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "serde_urlencoded"
|
||||
version = "0.7.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "edfa57a7f8d9c1d260a549e7224100f6c43d43f9103e06dd8b4095a9b2b43ce9"
|
||||
dependencies = [
|
||||
"form_urlencoded",
|
||||
"itoa",
|
||||
"ryu",
|
||||
"serde",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "sha-1"
|
||||
version = "0.8.2"
|
||||
@@ -2942,11 +3030,11 @@ version = "0.5.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c87a60a40fccc84bef0652345bbbbbe20a605bf5d0ce81719fc476f5c03b50ef"
|
||||
dependencies = [
|
||||
"proc-macro2 1.0.24",
|
||||
"proc-macro2 1.0.27",
|
||||
"quote 1.0.8",
|
||||
"serde",
|
||||
"serde_derive",
|
||||
"syn 1.0.56",
|
||||
"syn 1.0.73",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -2956,13 +3044,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "58fa5ff6ad0d98d1ffa8cb115892b6e69d67799f6763e162a1c9db421dc22e11"
|
||||
dependencies = [
|
||||
"base-x",
|
||||
"proc-macro2 1.0.24",
|
||||
"proc-macro2 1.0.27",
|
||||
"quote 1.0.8",
|
||||
"serde",
|
||||
"serde_derive",
|
||||
"serde_json",
|
||||
"sha1",
|
||||
"syn 1.0.56",
|
||||
"syn 1.0.73",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -2999,11 +3087,11 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "syn"
|
||||
version = "1.0.56"
|
||||
version = "1.0.73"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a9802ddde94170d186eeee5005b798d9c159fa970403f1be19976d0cfb939b72"
|
||||
checksum = "f71489ff30030d2ae598524f61326b902466f72a0fb1a8564c001cc63425bcc7"
|
||||
dependencies = [
|
||||
"proc-macro2 1.0.24",
|
||||
"proc-macro2 1.0.27",
|
||||
"quote 1.0.8",
|
||||
"unicode-xid 0.2.1",
|
||||
]
|
||||
@@ -3014,17 +3102,17 @@ version = "0.12.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b834f2d66f734cb897113e34aaff2f1ab4719ca946f9a7358dba8f8064148701"
|
||||
dependencies = [
|
||||
"proc-macro2 1.0.24",
|
||||
"proc-macro2 1.0.27",
|
||||
"quote 1.0.8",
|
||||
"syn 1.0.56",
|
||||
"syn 1.0.73",
|
||||
"unicode-xid 0.2.1",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "sysinfo"
|
||||
version = "0.16.4"
|
||||
version = "0.18.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "6c280c91abd1aed2e36be1bc8f56fbc7a2acbb2b58fbcac9641510179cc72dd9"
|
||||
checksum = "d404aefa651a24a7f2a1190fec9fb6380ba84ac511a6fefad79eb0e63d39a97d"
|
||||
dependencies = [
|
||||
"cfg-if 1.0.0",
|
||||
"core-foundation-sys",
|
||||
@@ -3119,9 +3207,9 @@ version = "1.0.23"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9be73a2caec27583d0046ef3796c3794f868a5bc813db689eed00c7631275cd1"
|
||||
dependencies = [
|
||||
"proc-macro2 1.0.24",
|
||||
"proc-macro2 1.0.27",
|
||||
"quote 1.0.8",
|
||||
"syn 1.0.56",
|
||||
"syn 1.0.73",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -3176,10 +3264,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e5c3be1edfad6027c69f5491cf4cb310d1a71ecd6af742788c6ff8bced86b8fa"
|
||||
dependencies = [
|
||||
"proc-macro-hack",
|
||||
"proc-macro2 1.0.24",
|
||||
"proc-macro2 1.0.27",
|
||||
"quote 1.0.8",
|
||||
"standback",
|
||||
"syn 1.0.56",
|
||||
"syn 1.0.73",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -3193,9 +3281,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "tinyvec"
|
||||
version = "1.1.0"
|
||||
version = "1.2.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ccf8dbc19eb42fba10e8feaaec282fb50e2c14b2726d6301dbfeed0f73306a6f"
|
||||
checksum = "5b5220f05bb7de7f3f53c7c065e1199b3172696fe2db9f9c4d8ad9b4ee74c342"
|
||||
dependencies = [
|
||||
"tinyvec_macros",
|
||||
]
|
||||
@@ -3245,9 +3333,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "tokio"
|
||||
version = "1.5.0"
|
||||
version = "1.7.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "83f0c8e7c0addab50b663055baf787d0af7f413a46e6e7fb9559a4e4db7137a5"
|
||||
checksum = "c79ba603c337335df6ba6dd6afc38c38a7d5e1b0c871678439ea973cd62a118e"
|
||||
dependencies = [
|
||||
"autocfg 1.0.1",
|
||||
"bytes 1.0.1",
|
||||
@@ -3257,7 +3345,7 @@ dependencies = [
|
||||
"num_cpus",
|
||||
"once_cell",
|
||||
"parking_lot 0.11.1",
|
||||
"pin-project-lite 0.2.0",
|
||||
"pin-project-lite 0.2.6",
|
||||
"signal-hook-registry",
|
||||
"tokio-macros",
|
||||
"winapi 0.3.9",
|
||||
@@ -3311,9 +3399,9 @@ version = "1.1.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "caf7b11a536f46a809a8a9f0bb4237020f70ecbf115b842360afb127ea2fda57"
|
||||
dependencies = [
|
||||
"proc-macro2 1.0.24",
|
||||
"proc-macro2 1.0.27",
|
||||
"quote 1.0.8",
|
||||
"syn 1.0.56",
|
||||
"syn 1.0.73",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -3323,7 +3411,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f7d995660bd2b7f8c1568414c1126076c13fbb725c40112dc0120b78eb9b717b"
|
||||
dependencies = [
|
||||
"native-tls",
|
||||
"tokio 1.5.0",
|
||||
"tokio 1.7.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -3422,6 +3510,20 @@ dependencies = [
|
||||
"tokio 0.2.24",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "tokio-util"
|
||||
version = "0.6.7"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1caa0b0c8d94a049db56b5acf8cba99dc0623aab1b26d5b5f5e2d945846b3592"
|
||||
dependencies = [
|
||||
"bytes 1.0.1",
|
||||
"futures-core",
|
||||
"futures-sink",
|
||||
"log",
|
||||
"pin-project-lite 0.2.6",
|
||||
"tokio 1.7.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "tower-service"
|
||||
version = "0.3.0"
|
||||
@@ -3430,33 +3532,33 @@ checksum = "e987b6bf443f4b5b3b6f38704195592cca41c5bb7aedd3c3693c7081f8289860"
|
||||
|
||||
[[package]]
|
||||
name = "tracing"
|
||||
version = "0.1.22"
|
||||
version = "0.1.26"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9f47026cdc4080c07e49b37087de021820269d996f581aac150ef9e5583eefe3"
|
||||
checksum = "09adeb8c97449311ccd28a427f96fb563e7fd31aabf994189879d9da2394b89d"
|
||||
dependencies = [
|
||||
"cfg-if 1.0.0",
|
||||
"log",
|
||||
"pin-project-lite 0.2.0",
|
||||
"pin-project-lite 0.2.6",
|
||||
"tracing-attributes",
|
||||
"tracing-core",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "tracing-attributes"
|
||||
version = "0.1.11"
|
||||
version = "0.1.15"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "80e0ccfc3378da0cce270c946b676a376943f5cd16aeba64568e7939806f4ada"
|
||||
checksum = "c42e6fa53307c8a17e4ccd4dc81cf5ec38db9209f59b222210375b54ee40d1e2"
|
||||
dependencies = [
|
||||
"proc-macro2 1.0.24",
|
||||
"proc-macro2 1.0.27",
|
||||
"quote 1.0.8",
|
||||
"syn 1.0.56",
|
||||
"syn 1.0.73",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "tracing-core"
|
||||
version = "0.1.17"
|
||||
version = "0.1.18"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f50de3927f93d202783f4513cda820ab47ef17f624b03c096e86ef00c67e6b5f"
|
||||
checksum = "a9ff14f98b1a4b289c6248a023c1c2fa1491062964e9fed67ab29c4e4da4a052"
|
||||
dependencies = [
|
||||
"lazy_static",
|
||||
]
|
||||
@@ -3473,9 +3575,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "tracing-log"
|
||||
version = "0.1.1"
|
||||
version = "0.1.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5e0f8c7178e13481ff6765bd169b33e8d554c5d2bbede5e32c356194be02b9b9"
|
||||
checksum = "a6923477a48e41c1951f1999ef8bb5a3023eb723ceadafe78ffb65dc366761e3"
|
||||
dependencies = [
|
||||
"lazy_static",
|
||||
"log",
|
||||
@@ -3494,9 +3596,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "tracing-subscriber"
|
||||
version = "0.2.15"
|
||||
version = "0.2.18"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a1fa8f0c8f4c594e4fc9debc1990deab13238077271ba84dd853d54902ee3401"
|
||||
checksum = "aa5553bf0883ba7c9cbe493b085c29926bd41b66afc31ff72cf17ff4fb60dcd5"
|
||||
dependencies = [
|
||||
"ansi_term",
|
||||
"chrono",
|
||||
@@ -3516,41 +3618,46 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "trust-dns-proto"
|
||||
version = "0.19.6"
|
||||
version = "0.20.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "53861fcb288a166aae4c508ae558ed18b53838db728d4d310aad08270a7d4c2b"
|
||||
checksum = "ad0d7f5db438199a6e2609debe3f69f808d074e0a2888ee0bccb45fe234d03f4"
|
||||
dependencies = [
|
||||
"async-trait",
|
||||
"backtrace",
|
||||
"cfg-if 1.0.0",
|
||||
"data-encoding",
|
||||
"enum-as-inner",
|
||||
"futures 0.3.8",
|
||||
"futures-channel",
|
||||
"futures-io",
|
||||
"futures-util",
|
||||
"idna 0.2.0",
|
||||
"ipnet",
|
||||
"lazy_static",
|
||||
"log",
|
||||
"rand 0.7.3",
|
||||
"rand 0.8.3",
|
||||
"smallvec 1.6.1",
|
||||
"thiserror",
|
||||
"tokio 0.2.24",
|
||||
"tinyvec",
|
||||
"tokio 1.7.0",
|
||||
"url 2.2.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "trust-dns-resolver"
|
||||
version = "0.19.6"
|
||||
version = "0.20.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "6759e8efc40465547b0dfce9500d733c65f969a4cbbfbe3ccf68daaa46ef179e"
|
||||
checksum = "f6ad17b608a64bd0735e67bde16b0636f8aa8591f831a25d18443ed00a699770"
|
||||
dependencies = [
|
||||
"backtrace",
|
||||
"cfg-if 0.1.10",
|
||||
"futures 0.3.8",
|
||||
"cfg-if 1.0.0",
|
||||
"futures-util",
|
||||
"ipconfig",
|
||||
"lazy_static",
|
||||
"log",
|
||||
"lru-cache",
|
||||
"parking_lot 0.11.1",
|
||||
"resolv-conf",
|
||||
"smallvec 1.6.1",
|
||||
"thiserror",
|
||||
"tokio 0.2.24",
|
||||
"tokio 1.7.0",
|
||||
"trust-dns-proto",
|
||||
]
|
||||
|
||||
@@ -3801,9 +3908,9 @@ dependencies = [
|
||||
"bumpalo",
|
||||
"lazy_static",
|
||||
"log",
|
||||
"proc-macro2 1.0.24",
|
||||
"proc-macro2 1.0.27",
|
||||
"quote 1.0.8",
|
||||
"syn 1.0.56",
|
||||
"syn 1.0.73",
|
||||
"wasm-bindgen-shared",
|
||||
]
|
||||
|
||||
@@ -3835,9 +3942,9 @@ version = "0.2.69"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b5a48c72f299d80557c7c62e37e7225369ecc0c963964059509fbafe917c7549"
|
||||
dependencies = [
|
||||
"proc-macro2 1.0.24",
|
||||
"proc-macro2 1.0.27",
|
||||
"quote 1.0.8",
|
||||
"syn 1.0.56",
|
||||
"syn 1.0.73",
|
||||
"wasm-bindgen-backend",
|
||||
"wasm-bindgen-shared",
|
||||
]
|
||||
|
||||
@@ -8,25 +8,6 @@ use test_utilities::utilities::context;
|
||||
use test_utilities::utilities::init;
|
||||
use tracing::{span, Level};
|
||||
|
||||
// insert how many actions you will use in tests
|
||||
// args are function you want to use and how many context you want to have
|
||||
// it permit you to create several different workspaces for each steps
|
||||
// TODO implement it well
|
||||
// pub fn generate_contexts_and_environments(
|
||||
// number: u8,
|
||||
// func: fn(&Context) -> Environment,
|
||||
// ) -> (Vec<Context>, Vec<Environment>) {
|
||||
// let mut context_vec: Vec<Context> = Vec::new();
|
||||
// let mut env_vec: Vec<Environment> = Vec::new();
|
||||
// let context = context();
|
||||
// for _ in std::iter::repeat(number) {
|
||||
// context_vec.push(context.clone_not_same_execution_id());
|
||||
// let environment = func(&context);
|
||||
// env_vec.push(environment);
|
||||
// }
|
||||
// (context_vec, env_vec)
|
||||
// }
|
||||
|
||||
// TODO:
|
||||
// - Tests that applications are always restarted when recieving a CREATE action
|
||||
// see: https://github.com/Qovery/engine/pull/269
|
||||
|
||||
Reference in New Issue
Block a user