Compare commits
1 Commits
2d3c32469c
...
fix/add_ro
| Author | SHA1 | Date | |
|---|---|---|---|
| 09457b89d8 |
BIN
demos/cncf-k8s-quebec-meetup-september-2025/lego_bloc.png
Normal file
BIN
demos/cncf-k8s-quebec-meetup-september-2025/lego_bloc.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 537 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 6.5 KiB |
File diff suppressed because one or more lines are too long
@@ -2,6 +2,12 @@
|
|||||||
theme: uncover
|
theme: uncover
|
||||||
---
|
---
|
||||||
|
|
||||||
|
# Disclaimer :
|
||||||
|
|
||||||
|
<img src="./lego_bloc.png" width="400"/>
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
# Voici l'histoire de Petit Poisson
|
# Voici l'histoire de Petit Poisson
|
||||||
|
|
||||||
---
|
---
|
||||||
@@ -228,7 +234,7 @@ Demo time
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
# 🎼
|
### 🎼
|
||||||
|
|
||||||
Harmony : [https://git.nationtech.io/nationtech/harmony](https://git.nationtech.io/nationtech/harmony)
|
Harmony : [https://git.nationtech.io/nationtech/harmony](https://git.nationtech.io/nationtech/harmony)
|
||||||
|
|
||||||
@@ -238,4 +244,5 @@ Harmony : [https://git.nationtech.io/nationtech/harmony](https://git.nationtech.
|
|||||||
|
|
||||||
LinkedIn : [https://www.linkedin.com/in/jean-gabriel-gill-couture/](https://www.linkedin.com/in/jean-gabriel-gill-couture/)
|
LinkedIn : [https://www.linkedin.com/in/jean-gabriel-gill-couture/](https://www.linkedin.com/in/jean-gabriel-gill-couture/)
|
||||||
|
|
||||||
Courriel : [jg@nationtech.io](mailto:jg@nationtech.io)
|
Discord : [https://discord.gg/DNR5sbSm4X](https://discord.gg/DNR5sbSm4X)
|
||||||
|
<img src="./qrcode_discord_nationtech.png" width="120"/>
|
||||||
|
|||||||
@@ -2,10 +2,9 @@ use derive_new::new;
|
|||||||
use k8s_openapi::{
|
use k8s_openapi::{
|
||||||
ClusterResourceScope, NamespaceResourceScope,
|
ClusterResourceScope, NamespaceResourceScope,
|
||||||
api::{apps::v1::Deployment, core::v1::Pod},
|
api::{apps::v1::Deployment, core::v1::Pod},
|
||||||
apimachinery::pkg::version::Info,
|
|
||||||
};
|
};
|
||||||
use kube::{
|
use kube::{
|
||||||
Client, Config, Discovery, Error, Resource,
|
Client, Config, Error, Resource,
|
||||||
api::{Api, AttachParams, DeleteParams, ListParams, Patch, PatchParams, ResourceExt},
|
api::{Api, AttachParams, DeleteParams, ListParams, Patch, PatchParams, ResourceExt},
|
||||||
config::{KubeConfigOptions, Kubeconfig},
|
config::{KubeConfigOptions, Kubeconfig},
|
||||||
core::ErrorResponse,
|
core::ErrorResponse,
|
||||||
@@ -54,17 +53,6 @@ impl K8sClient {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
pub async fn get_apiserver_version(&self) -> Result<Info, Error> {
|
|
||||||
let client: Client = self.client.clone();
|
|
||||||
let version_info: Info = client.apiserver_version().await?;
|
|
||||||
Ok(version_info)
|
|
||||||
}
|
|
||||||
|
|
||||||
pub async fn discovery(&self) -> Result<Discovery, Error> {
|
|
||||||
let discovery: Discovery = Discovery::new(self.client.clone()).run().await?;
|
|
||||||
Ok(discovery)
|
|
||||||
}
|
|
||||||
|
|
||||||
pub async fn get_resource_json_value(
|
pub async fn get_resource_json_value(
|
||||||
&self,
|
&self,
|
||||||
name: &str,
|
name: &str,
|
||||||
|
|||||||
@@ -47,13 +47,6 @@ struct K8sState {
|
|||||||
message: String,
|
message: String,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, Clone)]
|
|
||||||
pub enum KubernetesDistribution {
|
|
||||||
OpenshiftFamily,
|
|
||||||
K3sFamily,
|
|
||||||
Default,
|
|
||||||
}
|
|
||||||
|
|
||||||
#[derive(Debug, Clone)]
|
#[derive(Debug, Clone)]
|
||||||
enum K8sSource {
|
enum K8sSource {
|
||||||
LocalK3d,
|
LocalK3d,
|
||||||
@@ -64,7 +57,6 @@ enum K8sSource {
|
|||||||
pub struct K8sAnywhereTopology {
|
pub struct K8sAnywhereTopology {
|
||||||
k8s_state: Arc<OnceCell<Option<K8sState>>>,
|
k8s_state: Arc<OnceCell<Option<K8sState>>>,
|
||||||
tenant_manager: Arc<OnceCell<K8sTenantManager>>,
|
tenant_manager: Arc<OnceCell<K8sTenantManager>>,
|
||||||
flavour: Arc<OnceCell<KubernetesDistribution>>,
|
|
||||||
config: Arc<K8sAnywhereConfig>,
|
config: Arc<K8sAnywhereConfig>,
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -170,7 +162,6 @@ impl K8sAnywhereTopology {
|
|||||||
Self {
|
Self {
|
||||||
k8s_state: Arc::new(OnceCell::new()),
|
k8s_state: Arc::new(OnceCell::new()),
|
||||||
tenant_manager: Arc::new(OnceCell::new()),
|
tenant_manager: Arc::new(OnceCell::new()),
|
||||||
flavour: Arc::new(OnceCell::new()),
|
|
||||||
config: Arc::new(K8sAnywhereConfig::from_env()),
|
config: Arc::new(K8sAnywhereConfig::from_env()),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -179,42 +170,10 @@ impl K8sAnywhereTopology {
|
|||||||
Self {
|
Self {
|
||||||
k8s_state: Arc::new(OnceCell::new()),
|
k8s_state: Arc::new(OnceCell::new()),
|
||||||
tenant_manager: Arc::new(OnceCell::new()),
|
tenant_manager: Arc::new(OnceCell::new()),
|
||||||
flavour: Arc::new(OnceCell::new()),
|
|
||||||
config: Arc::new(config),
|
config: Arc::new(config),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub async fn get_k8s_distribution(&self) -> Result<&KubernetesDistribution, PreparationError> {
|
|
||||||
self.flavour
|
|
||||||
.get_or_try_init(async || {
|
|
||||||
let client = self.k8s_client().await.unwrap();
|
|
||||||
|
|
||||||
let discovery = client.discovery().await.map_err(|e| {
|
|
||||||
PreparationError::new(format!("Could not discover API groups: {}", e))
|
|
||||||
})?;
|
|
||||||
|
|
||||||
let version = client.get_apiserver_version().await.map_err(|e| {
|
|
||||||
PreparationError::new(format!("Could not get server version: {}", e))
|
|
||||||
})?;
|
|
||||||
|
|
||||||
// OpenShift / OKD
|
|
||||||
if discovery
|
|
||||||
.groups()
|
|
||||||
.any(|g| g.name() == "project.openshift.io")
|
|
||||||
{
|
|
||||||
return Ok(KubernetesDistribution::OpenshiftFamily);
|
|
||||||
}
|
|
||||||
|
|
||||||
// K3d / K3s
|
|
||||||
if version.git_version.contains("k3s") {
|
|
||||||
return Ok(KubernetesDistribution::K3sFamily);
|
|
||||||
}
|
|
||||||
|
|
||||||
return Ok(KubernetesDistribution::Default);
|
|
||||||
})
|
|
||||||
.await
|
|
||||||
}
|
|
||||||
|
|
||||||
async fn get_cluster_observability_operator_prometheus_application_score(
|
async fn get_cluster_observability_operator_prometheus_application_score(
|
||||||
&self,
|
&self,
|
||||||
sender: RHOBObservability,
|
sender: RHOBObservability,
|
||||||
|
|||||||
@@ -160,9 +160,6 @@ global:
|
|||||||
## Used for ingresses, certificates, SSO, notifications, etc.
|
## Used for ingresses, certificates, SSO, notifications, etc.
|
||||||
domain: {domain}
|
domain: {domain}
|
||||||
|
|
||||||
securityContext:
|
|
||||||
runAsUser: null
|
|
||||||
|
|
||||||
# -- Runtime class name for all components
|
# -- Runtime class name for all components
|
||||||
runtimeClassName: ""
|
runtimeClassName: ""
|
||||||
|
|
||||||
@@ -474,13 +471,6 @@ redis:
|
|||||||
# -- Redis name
|
# -- Redis name
|
||||||
name: redis
|
name: redis
|
||||||
|
|
||||||
serviceAccount:
|
|
||||||
create: true
|
|
||||||
|
|
||||||
securityContext:
|
|
||||||
runAsUser: null
|
|
||||||
|
|
||||||
|
|
||||||
## Redis image
|
## Redis image
|
||||||
image:
|
image:
|
||||||
# -- Redis repository
|
# -- Redis repository
|
||||||
|
|||||||
@@ -12,6 +12,9 @@ use std::process::Command;
|
|||||||
use crate::modules::k8s::ingress::{K8sIngressScore, PathType};
|
use crate::modules::k8s::ingress::{K8sIngressScore, PathType};
|
||||||
use crate::modules::monitoring::kube_prometheus::crd::grafana_default_dashboard::build_default_dashboard;
|
use crate::modules::monitoring::kube_prometheus::crd::grafana_default_dashboard::build_default_dashboard;
|
||||||
use crate::modules::monitoring::kube_prometheus::crd::rhob_alertmanager_config::RHOBObservability;
|
use crate::modules::monitoring::kube_prometheus::crd::rhob_alertmanager_config::RHOBObservability;
|
||||||
|
use crate::modules::monitoring::kube_prometheus::crd::rhob_alertmanagers::{
|
||||||
|
Alertmanager, AlertmanagerSpec,
|
||||||
|
};
|
||||||
use crate::modules::monitoring::kube_prometheus::crd::rhob_grafana::{
|
use crate::modules::monitoring::kube_prometheus::crd::rhob_grafana::{
|
||||||
Grafana, GrafanaDashboard, GrafanaDashboardSpec, GrafanaDatasource, GrafanaDatasourceConfig,
|
Grafana, GrafanaDashboard, GrafanaDashboardSpec, GrafanaDatasource, GrafanaDatasourceConfig,
|
||||||
GrafanaDatasourceSpec, GrafanaSpec,
|
GrafanaDatasourceSpec, GrafanaSpec,
|
||||||
@@ -22,8 +25,13 @@ use crate::modules::monitoring::kube_prometheus::crd::rhob_monitoring_stack::{
|
|||||||
use crate::modules::monitoring::kube_prometheus::crd::rhob_prometheus_rules::{
|
use crate::modules::monitoring::kube_prometheus::crd::rhob_prometheus_rules::{
|
||||||
PrometheusRule, PrometheusRuleSpec, RuleGroup,
|
PrometheusRule, PrometheusRuleSpec, RuleGroup,
|
||||||
};
|
};
|
||||||
use crate::modules::monitoring::kube_prometheus::crd::rhob_prometheuses::LabelSelector;
|
use crate::modules::monitoring::kube_prometheus::crd::rhob_prometheuses::{
|
||||||
|
AlertmanagerEndpoints, LabelSelector, PrometheusSpec, PrometheusSpecAlerting,
|
||||||
|
};
|
||||||
|
|
||||||
|
use crate::modules::monitoring::kube_prometheus::crd::rhob_role::{
|
||||||
|
build_prom_role, build_prom_rolebinding, build_prom_service_account,
|
||||||
|
};
|
||||||
use crate::modules::monitoring::kube_prometheus::crd::rhob_service_monitor::{
|
use crate::modules::monitoring::kube_prometheus::crd::rhob_service_monitor::{
|
||||||
ServiceMonitor, ServiceMonitorSpec,
|
ServiceMonitor, ServiceMonitorSpec,
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user