Our own Helm Command/Resource/Executor #13
@ -135,6 +135,7 @@ impl<T: Topology + K8sclient + HelmCommand> Interpret<T> for LAMPInterpret {
|
||||
|
||||
info!("LAMP deployment_score {deployment_score:?}");
|
||||
|
||||
<<<<<<< HEAD
|
||||
<<<<<<< HEAD
|
||||
let lamp_ingress = K8sIngressScore {
|
||||
name: fqdn!("lamp-ingress"),
|
||||
@ -163,6 +164,32 @@ impl<T: Topology + K8sclient + HelmCommand> Interpret<T> for LAMPInterpret {
|
||||
Ok(Outcome::success("Successfully deployed LAMP Stack!".to_string()))
|
||||
=======
|
||||
>>>>>>> f7f32d4 (Still WIP but pretty much done)
|
||||
||||||| parent of ad7ca39 (reset)
|
||||
=======
|
||||
let lamp_ingress = K8sIngressScore {
|
||||
name: fqdn!("lamp-ingress"),
|
||||
host: fqdn!("test"),
|
||||
backend_service: fqdn!(
|
||||
<LAMPScore as Score<T>>::name(&self.score)
|
||||
.to_case(Case::Kebab)
|
||||
.as_str()
|
||||
),
|
||||
port: 8080,
|
||||
path: Some(ingress_path!("/")),
|
||||
path_type: None,
|
||||
namespace: self
|
||||
.get_namespace()
|
||||
.map(|nbs| fqdn!(nbs.to_string().as_str())),
|
||||
};
|
||||
|
||||
lamp_ingress
|
||||
.create_interpret()
|
||||
.execute(inventory, topology)
|
||||
.await?;
|
||||
|
||||
info!("LAMP lamp_ingress {lamp_ingress:?}");
|
||||
|
||||
>>>>>>> ad7ca39 (reset)
|
||||
Ok(Outcome::success(
|
||||
"Successfully deployed LAMP Stack!".to_string(),
|
||||
))
|
||||
@ -215,7 +242,7 @@ impl LAMPInterpret {
|
||||
create_namespace: true,
|
||||
install_only: false,
|
||||
values_yaml: None,
|
||||
repo_url: None,
|
||||
repository: None,
|
||||
};
|
||||
|
||||
score.create_interpret().execute(inventory, topology).await
|
||||
|
||||
@ -16,14 +16,14 @@ additionalPrometheusRulesMap:
|
||||
- alert: 'PVC Fill Over 95 Percent In 2 Days'
|
||||
expr: |
|
||||
(
|
||||
kubelet_volume_stats_used_bytes
|
||||
/
|
||||
kubelet_volume_stats_used_bytes
|
||||
/
|
||||
kubelet_volume_stats_capacity_bytes
|
||||
) > 0.95
|
||||
AND
|
||||
predict_linear(kubelet_volume_stats_used_bytes[2d], 2 * 24 * 60 * 60)
|
||||
/
|
||||
kubelet_volume_stats_capacity_bytes
|
||||
/
|
||||
kubelet_volume_stats_capacity_bytes
|
||||
> 0.95
|
||||
for: 1m
|
||||
labels:
|
||||
@ -36,8 +36,8 @@ additionalPrometheusRulesMap:
|
||||
namespace: Some(NonBlankString::from_str(ns).unwrap()),
|
||||
release_name: NonBlankString::from_str("kube-prometheus").unwrap(),
|
||||
chart_name: NonBlankString::from_str(
|
||||
"kube-prometheus-stack", //use kube prometheus chart which includes grafana, prometheus, alert
|
||||
//manager, etc
|
||||
"oci://ghcr.io/prometheus-community/charts/kube-prometheus-stack", //use kube prometheus chart which includes grafana, prometheus, alert
|
||||
//manager, etc
|
||||
)
|
||||
.unwrap(),
|
||||
chart_version: None,
|
||||
@ -45,8 +45,6 @@ additionalPrometheusRulesMap:
|
||||
values_yaml: Some(values.to_string()),
|
||||
create_namespace: true,
|
||||
install_only: true,
|
||||
repo_url: Some(
|
||||
NonBlankString::from_str("oci://ghcr.io/prometheus-community/charts/").unwrap(),
|
||||
),
|
||||
repository: None,
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user