fix
This commit is contained in:
@@ -21,6 +21,10 @@ locals {
|
||||
nodeExporter = { for k, v in var.node-exporter : k => v if k!="enable" }
|
||||
kubeStateMetrics = merge({"cluster-admin" = true}, { for k, v in var.kube-state-metrics : k => v if k!="enable" })
|
||||
monitorControlPlan = merge({"cluster-admin" = true}, { for k, v in var.monitor-control-plan : k => v if k!="enable" })
|
||||
dashboards-cluster = { for k, v in var.dashboards-cluster : k => v if k!="enable" }
|
||||
dashboards-minimal = { for k, v in var.dashboards-minimal : k => v if k!="enable" }
|
||||
dashboards-namespace = { for k, v in var.dashboards-namespace : k => v if k!="enable" }
|
||||
dashboards-workload = { for k, v in var.dashboards-workload : k => v if k!="enable" }
|
||||
}
|
||||
|
||||
resource "kubernetes_namespace_v1" "monitor-ns" {
|
||||
@@ -154,3 +158,68 @@ resource "kubectl_manifest" "alerts-containers" {
|
||||
options: ${jsonencode(merge(local.global, local.alerts-containers))}
|
||||
EOF
|
||||
}
|
||||
|
||||
resource "kubectl_manifest" "dashboards-cluster" {
|
||||
count = var.dashboards-cluster.enable ? 1 : 0
|
||||
yaml_body = <<-EOF
|
||||
apiVersion: "vynil.solidite.fr/v1"
|
||||
kind: "Install"
|
||||
metadata:
|
||||
name: "dashboards-cluster"
|
||||
namespace: "${kubernetes_namespace_v1.monitor-ns[0].metadata[0].name}"
|
||||
labels: ${jsonencode(local.common-labels)}
|
||||
spec:
|
||||
distrib: "${var.distributions.domain}"
|
||||
category: "monitor"
|
||||
component: "dashboards-cluster"
|
||||
options: ${jsonencode(merge(local.global, local.dashboards-cluster))}
|
||||
EOF
|
||||
}
|
||||
resource "kubectl_manifest" "dashboards-minimal" {
|
||||
count = var.dashboards-minimal.enable ? 1 : 0
|
||||
yaml_body = <<-EOF
|
||||
apiVersion: "vynil.solidite.fr/v1"
|
||||
kind: "Install"
|
||||
metadata:
|
||||
name: "dashboards-minimal"
|
||||
namespace: "${kubernetes_namespace_v1.monitor-ns[0].metadata[0].name}"
|
||||
labels: ${jsonencode(local.common-labels)}
|
||||
spec:
|
||||
distrib: "${var.distributions.domain}"
|
||||
category: "monitor"
|
||||
component: "dashboards-minimal"
|
||||
options: ${jsonencode(merge(local.global, local.dashboards-minimal))}
|
||||
EOF
|
||||
}
|
||||
resource "kubectl_manifest" "dashboards-namespace" {
|
||||
count = var.dashboards-namespace.enable ? 1 : 0
|
||||
yaml_body = <<-EOF
|
||||
apiVersion: "vynil.solidite.fr/v1"
|
||||
kind: "Install"
|
||||
metadata:
|
||||
name: "dashboards-namespace"
|
||||
namespace: "${kubernetes_namespace_v1.monitor-ns[0].metadata[0].name}"
|
||||
labels: ${jsonencode(local.common-labels)}
|
||||
spec:
|
||||
distrib: "${var.distributions.domain}"
|
||||
category: "monitor"
|
||||
component: "dashboards-namespace"
|
||||
options: ${jsonencode(merge(local.global, local.dashboards-namespace))}
|
||||
EOF
|
||||
}
|
||||
resource "kubectl_manifest" "dashboards-workload" {
|
||||
count = var.dashboards-workload.enable ? 1 : 0
|
||||
yaml_body = <<-EOF
|
||||
apiVersion: "vynil.solidite.fr/v1"
|
||||
kind: "Install"
|
||||
metadata:
|
||||
name: "dashboards-workload"
|
||||
namespace: "${kubernetes_namespace_v1.monitor-ns[0].metadata[0].name}"
|
||||
labels: ${jsonencode(local.common-labels)}
|
||||
spec:
|
||||
distrib: "${var.distributions.domain}"
|
||||
category: "monitor"
|
||||
component: "dashboards-workload"
|
||||
options: ${jsonencode(merge(local.global, local.dashboards-workload))}
|
||||
EOF
|
||||
}
|
||||
|
||||
@@ -6,116 +6,6 @@ metadata:
|
||||
name: domain-monitor
|
||||
description: null
|
||||
options:
|
||||
domain-name:
|
||||
default: your_company.com
|
||||
examples:
|
||||
- your_company.com
|
||||
type: string
|
||||
issuer:
|
||||
default: letsencrypt-prod
|
||||
examples:
|
||||
- letsencrypt-prod
|
||||
type: string
|
||||
ingress-class:
|
||||
default: traefik
|
||||
examples:
|
||||
- traefik
|
||||
type: string
|
||||
app-group:
|
||||
default: monitor
|
||||
examples:
|
||||
- monitor
|
||||
type: string
|
||||
alertmanager:
|
||||
default:
|
||||
enable: true
|
||||
examples:
|
||||
- enable: true
|
||||
properties:
|
||||
enable:
|
||||
default: true
|
||||
type: boolean
|
||||
type: object
|
||||
x-vynil-category: monitor
|
||||
x-vynil-package: alertmanager
|
||||
alerts-core:
|
||||
default:
|
||||
enable: true
|
||||
examples:
|
||||
- enable: true
|
||||
properties:
|
||||
enable:
|
||||
default: true
|
||||
type: boolean
|
||||
type: object
|
||||
x-vynil-category: monitor
|
||||
x-vynil-package: alerts-core
|
||||
domain:
|
||||
default: your-company
|
||||
examples:
|
||||
- your-company
|
||||
type: string
|
||||
prometheus:
|
||||
default:
|
||||
enable: true
|
||||
examples:
|
||||
- enable: true
|
||||
properties:
|
||||
enable:
|
||||
default: true
|
||||
type: boolean
|
||||
type: object
|
||||
x-vynil-category: monitor
|
||||
x-vynil-package: prometheus
|
||||
monitor-control-plan:
|
||||
default:
|
||||
enable: false
|
||||
examples:
|
||||
- enable: false
|
||||
properties:
|
||||
enable:
|
||||
default: false
|
||||
type: boolean
|
||||
type: object
|
||||
x-vynil-category: monitor
|
||||
x-vynil-package: monitor-control-plan
|
||||
kube-state-metrics:
|
||||
default:
|
||||
enable: true
|
||||
examples:
|
||||
- enable: true
|
||||
properties:
|
||||
enable:
|
||||
default: true
|
||||
type: boolean
|
||||
type: object
|
||||
x-vynil-category: monitor
|
||||
x-vynil-package: kube-state-metrics
|
||||
storage-classes:
|
||||
default:
|
||||
BlockReadWriteMany: ''
|
||||
BlockReadWriteOnce: ''
|
||||
FilesystemReadWriteMany: ''
|
||||
FilesystemReadWriteOnce: ''
|
||||
examples:
|
||||
- BlockReadWriteMany: ''
|
||||
BlockReadWriteOnce: ''
|
||||
FilesystemReadWriteMany: ''
|
||||
FilesystemReadWriteOnce: ''
|
||||
properties:
|
||||
BlockReadWriteMany:
|
||||
default: ''
|
||||
type: string
|
||||
BlockReadWriteOnce:
|
||||
default: ''
|
||||
type: string
|
||||
FilesystemReadWriteMany:
|
||||
default: ''
|
||||
type: string
|
||||
FilesystemReadWriteOnce:
|
||||
default: ''
|
||||
type: string
|
||||
type: object
|
||||
alerts-containers:
|
||||
default:
|
||||
enable: true
|
||||
@@ -128,18 +18,6 @@ options:
|
||||
type: object
|
||||
x-vynil-category: monitor
|
||||
x-vynil-package: alerts-containers
|
||||
node-exporter:
|
||||
default:
|
||||
enable: true
|
||||
examples:
|
||||
- enable: true
|
||||
properties:
|
||||
enable:
|
||||
default: true
|
||||
type: boolean
|
||||
type: object
|
||||
x-vynil-category: monitor
|
||||
x-vynil-package: node-exporter
|
||||
backups:
|
||||
default:
|
||||
enable: false
|
||||
@@ -170,6 +48,93 @@ options:
|
||||
default: backup-settings
|
||||
type: string
|
||||
type: object
|
||||
monitor-control-plan:
|
||||
default:
|
||||
enable: false
|
||||
examples:
|
||||
- enable: false
|
||||
properties:
|
||||
enable:
|
||||
default: false
|
||||
type: boolean
|
||||
type: object
|
||||
x-vynil-category: monitor
|
||||
x-vynil-package: monitor-control-plan
|
||||
kube-state-metrics:
|
||||
default:
|
||||
enable: true
|
||||
examples:
|
||||
- enable: true
|
||||
properties:
|
||||
enable:
|
||||
default: true
|
||||
type: boolean
|
||||
type: object
|
||||
x-vynil-category: monitor
|
||||
x-vynil-package: kube-state-metrics
|
||||
ingress-class:
|
||||
default: traefik
|
||||
examples:
|
||||
- traefik
|
||||
type: string
|
||||
domain:
|
||||
default: your-company
|
||||
examples:
|
||||
- your-company
|
||||
type: string
|
||||
dashboards-namespace:
|
||||
default:
|
||||
enable: true
|
||||
examples:
|
||||
- enable: true
|
||||
properties:
|
||||
enable:
|
||||
default: true
|
||||
type: boolean
|
||||
type: object
|
||||
x-vynil-category: monitor
|
||||
x-vynil-package: dashboards-namespace
|
||||
domain-name:
|
||||
default: your_company.com
|
||||
examples:
|
||||
- your_company.com
|
||||
type: string
|
||||
dashboards-cluster:
|
||||
default:
|
||||
enable: true
|
||||
examples:
|
||||
- enable: true
|
||||
properties:
|
||||
enable:
|
||||
default: true
|
||||
type: boolean
|
||||
type: object
|
||||
x-vynil-category: monitor
|
||||
x-vynil-package: dashboards-cluster
|
||||
dashboards-workload:
|
||||
default:
|
||||
enable: true
|
||||
examples:
|
||||
- enable: true
|
||||
properties:
|
||||
enable:
|
||||
default: true
|
||||
type: boolean
|
||||
type: object
|
||||
x-vynil-category: monitor
|
||||
x-vynil-package: dashboards-workload
|
||||
prometheus:
|
||||
default:
|
||||
enable: true
|
||||
examples:
|
||||
- enable: true
|
||||
properties:
|
||||
enable:
|
||||
default: true
|
||||
type: boolean
|
||||
type: object
|
||||
x-vynil-category: monitor
|
||||
x-vynil-package: prometheus
|
||||
distributions:
|
||||
default:
|
||||
core: core
|
||||
@@ -185,6 +150,89 @@ options:
|
||||
default: domain
|
||||
type: string
|
||||
type: object
|
||||
alertmanager:
|
||||
default:
|
||||
enable: true
|
||||
examples:
|
||||
- enable: true
|
||||
properties:
|
||||
enable:
|
||||
default: true
|
||||
type: boolean
|
||||
type: object
|
||||
x-vynil-category: monitor
|
||||
x-vynil-package: alertmanager
|
||||
issuer:
|
||||
default: letsencrypt-prod
|
||||
examples:
|
||||
- letsencrypt-prod
|
||||
type: string
|
||||
app-group:
|
||||
default: monitor
|
||||
examples:
|
||||
- monitor
|
||||
type: string
|
||||
dashboards-minimal:
|
||||
default:
|
||||
enable: true
|
||||
examples:
|
||||
- enable: true
|
||||
properties:
|
||||
enable:
|
||||
default: true
|
||||
type: boolean
|
||||
type: object
|
||||
x-vynil-category: monitor
|
||||
x-vynil-package: dashboards-minimal
|
||||
node-exporter:
|
||||
default:
|
||||
enable: true
|
||||
examples:
|
||||
- enable: true
|
||||
properties:
|
||||
enable:
|
||||
default: true
|
||||
type: boolean
|
||||
type: object
|
||||
x-vynil-category: monitor
|
||||
x-vynil-package: node-exporter
|
||||
storage-classes:
|
||||
default:
|
||||
BlockReadWriteMany: ''
|
||||
BlockReadWriteOnce: ''
|
||||
FilesystemReadWriteMany: ''
|
||||
FilesystemReadWriteOnce: ''
|
||||
examples:
|
||||
- BlockReadWriteMany: ''
|
||||
BlockReadWriteOnce: ''
|
||||
FilesystemReadWriteMany: ''
|
||||
FilesystemReadWriteOnce: ''
|
||||
properties:
|
||||
BlockReadWriteMany:
|
||||
default: ''
|
||||
type: string
|
||||
BlockReadWriteOnce:
|
||||
default: ''
|
||||
type: string
|
||||
FilesystemReadWriteMany:
|
||||
default: ''
|
||||
type: string
|
||||
FilesystemReadWriteOnce:
|
||||
default: ''
|
||||
type: string
|
||||
type: object
|
||||
alerts-core:
|
||||
default:
|
||||
enable: true
|
||||
examples:
|
||||
- enable: true
|
||||
properties:
|
||||
enable:
|
||||
default: true
|
||||
type: boolean
|
||||
type: object
|
||||
x-vynil-category: monitor
|
||||
x-vynil-package: alerts-core
|
||||
dependencies: []
|
||||
providers:
|
||||
kubernetes: true
|
||||
|
||||
16
monitor/dashboards-cluster/datas.tf
Normal file
16
monitor/dashboards-cluster/datas.tf
Normal file
@@ -0,0 +1,16 @@
|
||||
locals {
|
||||
common-labels = {
|
||||
"vynil.solidite.fr/owner-name" = var.instance
|
||||
"vynil.solidite.fr/owner-namespace" = var.namespace
|
||||
"vynil.solidite.fr/owner-category" = var.category
|
||||
"vynil.solidite.fr/owner-component" = var.component
|
||||
"app.kubernetes.io/managed-by" = "vynil"
|
||||
"app.kubernetes.io/instance" = var.instance
|
||||
}
|
||||
}
|
||||
|
||||
data "kustomization_overlay" "data" {
|
||||
common_labels = local.common-labels
|
||||
namespace = var.namespace
|
||||
resources = [for file in fileset(path.module, "*.yaml"): file if file != "index.yaml"]
|
||||
}
|
||||
23
monitor/dashboards-cluster/index.yaml
Normal file
23
monitor/dashboards-cluster/index.yaml
Normal file
@@ -0,0 +1,23 @@
|
||||
---
|
||||
apiVersion: vinyl.solidite.fr/v1beta1
|
||||
kind: Component
|
||||
category: monitor
|
||||
metadata:
|
||||
name: dashboards-cluster
|
||||
description: null
|
||||
options:
|
||||
useless:
|
||||
default: true
|
||||
examples:
|
||||
- true
|
||||
type: boolean
|
||||
dependencies: []
|
||||
providers:
|
||||
kubernetes: true
|
||||
authentik: null
|
||||
kubectl: true
|
||||
postgresql: null
|
||||
restapi: null
|
||||
http: null
|
||||
gitea: null
|
||||
tfaddtype: null
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
16
monitor/dashboards-minimal/datas.tf
Normal file
16
monitor/dashboards-minimal/datas.tf
Normal file
@@ -0,0 +1,16 @@
|
||||
locals {
|
||||
common-labels = {
|
||||
"vynil.solidite.fr/owner-name" = var.instance
|
||||
"vynil.solidite.fr/owner-namespace" = var.namespace
|
||||
"vynil.solidite.fr/owner-category" = var.category
|
||||
"vynil.solidite.fr/owner-component" = var.component
|
||||
"app.kubernetes.io/managed-by" = "vynil"
|
||||
"app.kubernetes.io/instance" = var.instance
|
||||
}
|
||||
}
|
||||
|
||||
data "kustomization_overlay" "data" {
|
||||
common_labels = local.common-labels
|
||||
namespace = var.namespace
|
||||
resources = [for file in fileset(path.module, "*.yaml"): file if file != "index.yaml"]
|
||||
}
|
||||
23
monitor/dashboards-minimal/index.yaml
Normal file
23
monitor/dashboards-minimal/index.yaml
Normal file
@@ -0,0 +1,23 @@
|
||||
---
|
||||
apiVersion: vinyl.solidite.fr/v1beta1
|
||||
kind: Component
|
||||
category: monitor
|
||||
metadata:
|
||||
name: dashboards-minimal
|
||||
description: null
|
||||
options:
|
||||
useless:
|
||||
default: true
|
||||
examples:
|
||||
- true
|
||||
type: boolean
|
||||
dependencies: []
|
||||
providers:
|
||||
kubernetes: true
|
||||
authentik: null
|
||||
kubectl: true
|
||||
postgresql: null
|
||||
restapi: null
|
||||
http: null
|
||||
gitea: null
|
||||
tfaddtype: null
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
16
monitor/dashboards-namespace/datas.tf
Normal file
16
monitor/dashboards-namespace/datas.tf
Normal file
@@ -0,0 +1,16 @@
|
||||
locals {
|
||||
common-labels = {
|
||||
"vynil.solidite.fr/owner-name" = var.instance
|
||||
"vynil.solidite.fr/owner-namespace" = var.namespace
|
||||
"vynil.solidite.fr/owner-category" = var.category
|
||||
"vynil.solidite.fr/owner-component" = var.component
|
||||
"app.kubernetes.io/managed-by" = "vynil"
|
||||
"app.kubernetes.io/instance" = var.instance
|
||||
}
|
||||
}
|
||||
|
||||
data "kustomization_overlay" "data" {
|
||||
common_labels = local.common-labels
|
||||
namespace = var.namespace
|
||||
resources = [for file in fileset(path.module, "*.yaml"): file if file != "index.yaml"]
|
||||
}
|
||||
23
monitor/dashboards-namespace/index.yaml
Normal file
23
monitor/dashboards-namespace/index.yaml
Normal file
@@ -0,0 +1,23 @@
|
||||
---
|
||||
apiVersion: vinyl.solidite.fr/v1beta1
|
||||
kind: Component
|
||||
category: monitor
|
||||
metadata:
|
||||
name: dashboards-namespace
|
||||
description: null
|
||||
options:
|
||||
useless:
|
||||
default: true
|
||||
examples:
|
||||
- true
|
||||
type: boolean
|
||||
dependencies: []
|
||||
providers:
|
||||
kubernetes: true
|
||||
authentik: null
|
||||
kubectl: true
|
||||
postgresql: null
|
||||
restapi: null
|
||||
http: null
|
||||
gitea: null
|
||||
tfaddtype: null
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
16
monitor/dashboards-workload/datas.tf
Normal file
16
monitor/dashboards-workload/datas.tf
Normal file
@@ -0,0 +1,16 @@
|
||||
locals {
|
||||
common-labels = {
|
||||
"vynil.solidite.fr/owner-name" = var.instance
|
||||
"vynil.solidite.fr/owner-namespace" = var.namespace
|
||||
"vynil.solidite.fr/owner-category" = var.category
|
||||
"vynil.solidite.fr/owner-component" = var.component
|
||||
"app.kubernetes.io/managed-by" = "vynil"
|
||||
"app.kubernetes.io/instance" = var.instance
|
||||
}
|
||||
}
|
||||
|
||||
data "kustomization_overlay" "data" {
|
||||
common_labels = local.common-labels
|
||||
namespace = var.namespace
|
||||
resources = [for file in fileset(path.module, "*.yaml"): file if file != "index.yaml"]
|
||||
}
|
||||
23
monitor/dashboards-workload/index.yaml
Normal file
23
monitor/dashboards-workload/index.yaml
Normal file
@@ -0,0 +1,23 @@
|
||||
---
|
||||
apiVersion: vinyl.solidite.fr/v1beta1
|
||||
kind: Component
|
||||
category: monitor
|
||||
metadata:
|
||||
name: dashboards-workload
|
||||
description: null
|
||||
options:
|
||||
useless:
|
||||
default: true
|
||||
examples:
|
||||
- true
|
||||
type: boolean
|
||||
dependencies: []
|
||||
providers:
|
||||
kubernetes: true
|
||||
authentik: null
|
||||
kubectl: true
|
||||
postgresql: null
|
||||
restapi: null
|
||||
http: null
|
||||
gitea: null
|
||||
tfaddtype: null
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user