diff --git a/flux/clusters/default/kustomization.yml b/flux/clusters/default/kustomization.yml index 42e85979..44bae8b8 100644 --- a/flux/clusters/default/kustomization.yml +++ b/flux/clusters/default/kustomization.yml @@ -4,3 +4,4 @@ resources: - ../../core/local-path-provisioner - ../../core/metrics-server - ../../core/kubelet-serving-cert-approver + - ../../components/monitoring diff --git a/flux/components/monitoring/configs/kustomization.yml b/flux/components/monitoring/configs/kustomization.yml index 88ed8b03..99bda9a6 100644 --- a/flux/components/monitoring/configs/kustomization.yml +++ b/flux/components/monitoring/configs/kustomization.yml @@ -5,3 +5,4 @@ resources: - system - kubernetes - kubevirt.yml + - lightmare.yml diff --git a/flux/components/monitoring/configs/lightmare.yml b/flux/components/monitoring/configs/lightmare.yml new file mode 100644 index 00000000..2e49e81b --- /dev/null +++ b/flux/components/monitoring/configs/lightmare.yml @@ -0,0 +1,16 @@ +apiVersion: kustomize.toolkit.fluxcd.io/v1 +kind: Kustomization +metadata: + name: lightmare-monitoring + namespace: flux-system +spec: + interval: 1m0s + path: ./flux/components/monitoring/configs/lightmare + prune: true + sourceRef: + kind: GitRepository + name: spectrum + namespace: flux-system + dependsOn: + - name: lightmare + namespace: flux-system diff --git a/flux/components/monitoring/configs/lightmare/kustomization.yml b/flux/components/monitoring/configs/lightmare/kustomization.yml new file mode 100644 index 00000000..b9dec980 --- /dev/null +++ b/flux/components/monitoring/configs/lightmare/kustomization.yml @@ -0,0 +1,19 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +namespace: monitoring +resources: + - service-monitor.yml +generatorOptions: + disableNameSuffixHash: true + labels: + grafana_dashboard: "1" + app.kubernetes.io/part-of: spectrum-monitoring + app.kubernetes.io/component: lightmare +commonAnnotations: + grafana_folder: "lightmare" + +# tbd +# configMapGenerator: +# - name: dashboards-k8s-lightmare +# files: +# - *.json diff --git a/flux/components/monitoring/configs/lightmare/service-monitor.yml b/flux/components/monitoring/configs/lightmare/service-monitor.yml new file mode 100644 index 00000000..f6f4e10a --- /dev/null +++ b/flux/components/monitoring/configs/lightmare/service-monitor.yml @@ -0,0 +1,17 @@ +apiVersion: monitoring.coreos.com/v1 +kind: ServiceMonitor +metadata: + name: lightmare + labels: + app.kubernetes.io/part-of: spectrum-monitoring + app.kubernetes.io/component: lightmare +spec: + selector: + matchLabels: + app: lightmare + namespaceSelector: + matchNames: + - lightmare + endpoints: + - port: metrics + scheme: http diff --git a/flux/components/monitoring/controllers/kube-prometheus-stack/release.yaml b/flux/components/monitoring/controllers/kube-prometheus-stack/release.yaml index 2a5c2be8..352a684d 100644 --- a/flux/components/monitoring/controllers/kube-prometheus-stack/release.yaml +++ b/flux/components/monitoring/controllers/kube-prometheus-stack/release.yaml @@ -32,7 +32,7 @@ spec: enabled: false prometheus: prometheusSpec: - retention: 24h + retention: 168h resources: requests: cpu: 200m @@ -48,6 +48,7 @@ spec: - "kube-state-metrics" - "prometheus-node-exporter" - "spectrum-monitoring" + - "lightmare" podMonitorNamespaceSelector: {} podMonitorSelector: diff --git a/flux/components/monitoring/controllers/loki-stack/release.yaml b/flux/components/monitoring/controllers/loki-stack/release.yaml index a28d396a..c63673e1 100644 --- a/flux/components/monitoring/controllers/loki-stack/release.yaml +++ b/flux/components/monitoring/controllers/loki-stack/release.yaml @@ -37,4 +37,4 @@ spec: max_look_back_period: 0s table_manager: retention_deletes_enabled: true - retention_period: 72h + retention_period: 168h diff --git a/flux/core/lightmare/app/release.yml b/flux/core/lightmare/app/release.yml index c2c17405..edcd3802 100644 --- a/flux/core/lightmare/app/release.yml +++ b/flux/core/lightmare/app/release.yml @@ -17,7 +17,7 @@ spec: operator: image: repository: "fluencelabs/lightmare" - tag: "0.2.2@sha256:c388db52bd9e7533862c011864819bf1253e7633d13fed618597a34a54f8427f" + tag: "0.2.3@sha256:42ab72c54c359aca3219d774eeeac98de3f588c36505ceba0b4c787916d9e236" config: ccp: image: