Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 0 additions & 15 deletions contexts/local/blueprint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -98,18 +98,3 @@ kustomize:
force: true
components:
- ingress
- name: telemetry-base
path: telemetry/base
source: core
components:
- prometheus
- prometheus/flux
- name: telemetry-resources
path: telemetry/resources
source: core
dependsOn:
- telemetry-base
components:
- metrics-server
- prometheus
- prometheus/flux
4 changes: 2 additions & 2 deletions contexts/local/terraform/cluster/talos.tfvars
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Managed by Windsor CLI: This file is partially managed by the windsor CLI. Your changes will not be overwritten.
// Module source: github.com/windsorcli/core//terraform/cluster/talos?ref=main
// Module source: github.com/windsorcli/core//terraform/cluster/talos?ref=v0.2.0

// The external controlplane API endpoint of the kubernetes API
cluster_endpoint = "https://127.0.0.1:6443"
Expand All @@ -25,4 +25,4 @@ workers = [{
endpoint = "127.0.0.1:50001"
hostname = "worker-1.test"
node = "127.0.0.1"
}]
}]
11 changes: 11 additions & 0 deletions kustomize/observability/grafana/flux/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
apiVersion: kustomize.config.k8s.io/v1alpha1
kind: Component
patches:
- path: patches/helm-release.yaml
- target:
group: helm.toolkit.fluxcd.io
version: v2
kind: HelmRelease
name: grafana
namespace: system-observability
path: patches/patch.json
15 changes: 15 additions & 0 deletions kustomize/observability/grafana/flux/patches/helm-release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
apiVersion: helm.toolkit.fluxcd.io/v2
kind: HelmRelease
metadata:
name: grafana
namespace: system-observability
spec:
values:
dashboards:
grafana-dashboards-flux:
control-plane:
url: https://raw.githubusercontent.com/fluxcd/flux2-monitoring-example/b99583d3614af7f69ec04214e813eb0364244cc3/monitoring/configs/dashboards/control-plane.json
token: ''
cluster:
url: https://raw.githubusercontent.com/fluxcd/flux2-monitoring-example/b99583d3614af7f69ec04214e813eb0364244cc3/monitoring/configs/dashboards/cluster.json
token: ''
17 changes: 17 additions & 0 deletions kustomize/observability/grafana/flux/patches/patch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
[
{
"op": "add",
"path": "/spec/values/dashboardProviders/dashboardproviders.yaml/providers/-",
"value": {
"name": "grafana-dashboards-flux",
"orgId": 1,
"folder": "Flux",
"type": "file",
"disableDeletion": true,
"editable": false,
"options": {
"path": "/var/lib/grafana/dashboards/grafana-dashboards-flux"
}
}
}
]
29 changes: 29 additions & 0 deletions kustomize/observability/grafana/helm-release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
apiVersion: helm.toolkit.fluxcd.io/v2
kind: HelmRelease
metadata:
name: grafana
namespace: system-observability
spec:
interval: 5m
timeout: 10m
dependsOn: []
chart:
spec:
chart: grafana
# renovate: datasource=helm depName=grafana package=grafana helmRepo=https://grafana.github.io/helm-charts
version: 8.5.11
sourceRef:
kind: HelmRepository
name: grafana
namespace: system-gitops
values:
dashboardProviders:
dashboardproviders.yaml:
apiVersion: 1
providers: []
dashboards: {}
plugins: []
datasources:
datasources.yaml:
apiVersion: 1
datasources: []
9 changes: 9 additions & 0 deletions kustomize/observability/grafana/helm-repository.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
apiVersion: source.toolkit.fluxcd.io/v1beta1
kind: HelmRepository
metadata:
name: grafana
namespace: system-gitops
spec:
interval: 10m
timeout: 5m
url: https://grafana.github.io/helm-charts
17 changes: 17 additions & 0 deletions kustomize/observability/grafana/ingress/ingress.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: grafana
namespace: system-observability
spec:
rules:
- host: grafana.${DOMAIN}
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: grafana
port:
number: 80
4 changes: 4 additions & 0 deletions kustomize/observability/grafana/ingress/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
apiVersion: kustomize.config.k8s.io/v1alpha1
kind: Component
resources:
- ingress.yaml
11 changes: 11 additions & 0 deletions kustomize/observability/grafana/kubernetes/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
apiVersion: kustomize.config.k8s.io/v1alpha1
kind: Component
patches:
- path: patches/helm-release.yaml
- target:
group: helm.toolkit.fluxcd.io
version: v2
kind: HelmRelease
name: grafana
namespace: system-observability
path: patches/patch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
apiVersion: helm.toolkit.fluxcd.io/v2
kind: HelmRelease
metadata:
name: grafana
namespace: system-observability
spec:
values:
dashboards:
grafana-dashboards-kubernetes:
k8s-system-api-server:
url: https://raw.githubusercontent.com/dotdc/grafana-dashboards-kubernetes/master/dashboards/k8s-system-api-server.json
token: ''
k8s-system-coredns:
url: https://raw.githubusercontent.com/dotdc/grafana-dashboards-kubernetes/master/dashboards/k8s-system-coredns.json
token: ''
k8s-views-global:
url: https://raw.githubusercontent.com/dotdc/grafana-dashboards-kubernetes/master/dashboards/k8s-views-global.json
token: ''
k8s-views-namespaces:
url: https://raw.githubusercontent.com/dotdc/grafana-dashboards-kubernetes/master/dashboards/k8s-views-namespaces.json
token: ''
k8s-views-nodes:
url: https://raw.githubusercontent.com/dotdc/grafana-dashboards-kubernetes/master/dashboards/k8s-views-nodes.json
token: ''
k8s-views-pods:
url: https://raw.githubusercontent.com/dotdc/grafana-dashboards-kubernetes/master/dashboards/k8s-views-pods.json
token: ''
17 changes: 17 additions & 0 deletions kustomize/observability/grafana/kubernetes/patches/patch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
[
{
"op": "add",
"path": "/spec/values/dashboardProviders/dashboardproviders.yaml/providers/-",
"value": {
"name": "grafana-dashboards-kubernetes",
"orgId": 1,
"folder": "Kubernetes",
"type": "file",
"disableDeletion": true,
"editable": false,
"options": {
"path": "/var/lib/grafana/dashboards/grafana-dashboards-kubernetes"
}
}
}
]
5 changes: 5 additions & 0 deletions kustomize/observability/grafana/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
apiVersion: kustomize.config.k8s.io/v1alpha1
kind: Component
resources:
- helm-repository.yaml
- helm-release.yaml
11 changes: 11 additions & 0 deletions kustomize/observability/grafana/node/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
apiVersion: kustomize.config.k8s.io/v1alpha1
kind: Component
patches:
- path: patches/helm-release.yaml
- target:
group: helm.toolkit.fluxcd.io
version: v2
kind: HelmRelease
name: grafana
namespace: system-observability
path: patches/patch.json
12 changes: 12 additions & 0 deletions kustomize/observability/grafana/node/patches/helm-release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
apiVersion: helm.toolkit.fluxcd.io/v2
kind: HelmRelease
metadata:
name: grafana
namespace: system-observability
spec:
values:
dashboards:
grafana-dashboards-node:
node-exporter-full:
url: https://raw.githubusercontent.com/rfmoz/grafana-dashboards/d33a10c268e5081aa5de33ec8ffdfb2741109498/prometheus/node-exporter-full.json
token: ''
17 changes: 17 additions & 0 deletions kustomize/observability/grafana/node/patches/patch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
[
{
"op": "add",
"path": "/spec/values/dashboardProviders/dashboardproviders.yaml/providers/-",
"value": {
"name": "grafana-dashboards-node",
"orgId": 1,
"folder": "Nodes",
"type": "file",
"disableDeletion": true,
"editable": false,
"options": {
"path": "/var/lib/grafana/dashboards/grafana-dashboards-node"
}
}
}
]
11 changes: 11 additions & 0 deletions kustomize/observability/grafana/prometheus/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
apiVersion: kustomize.config.k8s.io/v1alpha1
kind: Component
patches:
- path: patches/helm-release.yaml
- target:
group: helm.toolkit.fluxcd.io
version: v2
kind: HelmRelease
name: grafana
namespace: system-observability
path: patches/patch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
apiVersion: helm.toolkit.fluxcd.io/v2
kind: HelmRelease
metadata:
name: grafana
namespace: system-observability
spec:
dependsOn:
- name: kube-prometheus-stack
namespace: system-telemetry
values:
serviceMonitor:
enabled: true
dashboards:
grafana-dashboards-prometheus:
k8s-addons-prometheus:
url: https://raw.githubusercontent.com/dotdc/grafana-dashboards-kubernetes/2333e8f4fa5277b0afc806b24641e221a659bfe9/dashboards/k8s-addons-prometheus.json
token: ''
28 changes: 28 additions & 0 deletions kustomize/observability/grafana/prometheus/patches/patch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
[
{
"op": "add",
"path": "/spec/values/dashboardProviders/dashboardproviders.yaml/providers/-",
"value": {
"name": "grafana-dashboards-prometheus",
"orgId": 1,
"folder": "Prometheus",
"type": "file",
"disableDeletion": true,
"editable": false,
"options": {
"path": "/var/lib/grafana/dashboards/grafana-dashboards-prometheus"
}
}
},
{
"op": "add",
"path": "/spec/values/datasources/datasources.yaml/datasources/-",
"value": {
"name": "Prometheus",
"type": "prometheus",
"url": "http://kube-prometheus-stack-prometheus.system-telemetry.svc.cluster.local:9090",
"access": "proxy",
"isDefault": true
}
}
]
2 changes: 2 additions & 0 deletions kustomize/observability/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
resources:
- namespace.yaml
9 changes: 9 additions & 0 deletions kustomize/observability/namespace.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
apiVersion: v1
kind: Namespace
metadata:
name: system-observability
labels:
pod-security.kubernetes.io/enforce: baseline
pod-security.kubernetes.io/audit: baseline
pod-security.kubernetes.io/warn: baseline
use-custom-ca: "true"
33 changes: 16 additions & 17 deletions terraform/gitops/flux/.terraform.lock.hcl

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion windsor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,4 @@ contexts:
cidr_block: 10.5.0.0/16
dns:
enabled: false
domain: test
domain: test
Loading