Skip to content

Commit

Permalink
feat: deploy silence-operator
Browse files Browse the repository at this point in the history
Signed-off-by: Devin Buhl <[email protected]>
  • Loading branch information
onedr0p committed Dec 30, 2024
1 parent aa05fd6 commit db7168b
Show file tree
Hide file tree
Showing 14 changed files with 182 additions and 26 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ spec:
strategy: rollback
retries: 3
dependsOn:
- name: prometheus-operator-crds
- name: kube-prometheus-stack-crds
namespace: observability
- name: rook-ceph-cluster
namespace: rook-ceph
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
apiVersion: helm.toolkit.fluxcd.io/v2
kind: HelmRelease
metadata:
name: prometheus-operator-crds
name: kube-prometheus-stack-crds
spec:
interval: 30m
chart:
Expand Down
20 changes: 20 additions & 0 deletions kubernetes/main/apps/observability/kube-prometheus-stack/ks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,23 @@ spec:
substitute:
APP: *app
GATUS_SUBDOMAIN: prometheus
---
# yaml-language-server: $schema=https://kubernetes-schemas.pages.dev/kustomize.toolkit.fluxcd.io/kustomization_v1.json
apiVersion: kustomize.toolkit.fluxcd.io/v1
kind: Kustomization
metadata:
name: &app kube-prometheus-stack-crds
namespace: flux-system
spec:
targetNamespace: observability
commonMetadata:
labels:
app.kubernetes.io/name: *app
path: ./kubernetes/main/apps/observability/kube-prometheus-stack/crds
prune: false # never should be deleted
sourceRef:
kind: GitRepository
name: home-kubernetes
wait: false
interval: 30m
timeout: 5m
2 changes: 1 addition & 1 deletion kubernetes/main/apps/observability/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ resources:
- ./kromgo/ks.yaml
- ./kube-prometheus-stack/ks.yaml
- ./loki/ks.yaml
- ./prometheus-operator-crds/ks.yaml
- ./promtail/ks.yaml
- ./silence-operator/ks.yaml
- ./smartctl-exporter/ks.yaml
- ./snmp-exporter/ks.yaml
- ./unpoller/ks.yaml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
---
# yaml-language-server: $schema=https://kubernetes-schemas.pages.dev/helm.toolkit.fluxcd.io/helmrelease_v2.json
apiVersion: helm.toolkit.fluxcd.io/v2
kind: HelmRelease
metadata:
name: silence-operator
spec:
interval: 30m
chart:
spec:
chart: silence-operator
version: 0.0.7
sourceRef:
kind: HelmRepository
name: wiremind
namespace: flux-system
install:
remediation:
retries: 3
upgrade:
cleanupOnFail: true
remediation:
strategy: rollback
retries: 3
dependsOn:
- name: silence-operator-crds
namespace: observability
values:
image:
name: quay.io/giantswarm/silence-operator
extraDeply:
- apiVersion: monitoring.giantswarm.io/v1alpha1
kind: Silence
metadata:
name: ceph-node-nfsmount-diskspace-warning
spec:
matchers:
- name: alertname
value: CephNodeDiskspaceWarning
isRegex: false
- name: mountpoint
value: /etc/nfsmount.conf
isRegex: false
- apiVersion: monitoring.giantswarm.io/v1alpha1
kind: Silence
metadata:
name: ceph-node-local-diskspace-warning
spec:
matchers:
- name: alertname
value: CephNodeDiskspaceWarning
isRegex: false
- name: device
value: /dev/sd.*
isRegex: true
- apiVersion: monitoring.giantswarm.io/v1alpha1
kind: Silence
metadata:
name: expanse-memory-high-utilization
spec:
matchers:
- name: alertname
value: NodeMemoryHighUtilization
isRegex: false
- name: instance
value: expanse.internal:9100
isRegex: false
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
# yaml-language-server: $schema=https://json.schemastore.org/kustomization
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ./helmrelease.yaml
- ./probes.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
# yaml-language-server: $schema=https://kubernetes-schemas.pages.dev/helm.toolkit.fluxcd.io/helmrelease_v2.json
apiVersion: helm.toolkit.fluxcd.io/v2
kind: HelmRelease
metadata:
name: silence-operator-crds
spec:
interval: 30m
chart:
spec:
chart: silence-operator-crds
version: 0.0.2
sourceRef:
kind: HelmRepository
name: wiremind
namespace: flux-system
install:
remediation:
retries: 3
upgrade:
cleanupOnFail: true
remediation:
strategy: rollback
retries: 3
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
# yaml-language-server: $schema=https://json.schemastore.org/kustomization
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ./helmrelease.yaml
- ./probes.yaml
40 changes: 40 additions & 0 deletions kubernetes/main/apps/observability/silence-operator/ks.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
---
# yaml-language-server: $schema=https://kubernetes-schemas.pages.dev/kustomize.toolkit.fluxcd.io/kustomization_v1.json
apiVersion: kustomize.toolkit.fluxcd.io/v1
kind: Kustomization
metadata:
name: &app silence-operator
namespace: flux-system
spec:
targetNamespace: observability
commonMetadata:
labels:
app.kubernetes.io/name: *app
path: ./kubernetes/main/apps/observability/silence-operator/app
prune: true
sourceRef:
kind: GitRepository
name: home-kubernetes
wait: false
interval: 30m
timeout: 15m
---
# yaml-language-server: $schema=https://kubernetes-schemas.pages.dev/kustomize.toolkit.fluxcd.io/kustomization_v1.json
apiVersion: kustomize.toolkit.fluxcd.io/v1
kind: Kustomization
metadata:
name: &app silence-operator-crds
namespace: flux-system
spec:
targetNamespace: observability
commonMetadata:
labels:
app.kubernetes.io/name: *app
path: ./kubernetes/main/apps/observability/silence-operator/crds
prune: false # never should be deleted
sourceRef:
kind: GitRepository
name: home-kubernetes
wait: false
interval: 30m
timeout: 5m
4 changes: 2 additions & 2 deletions kubernetes/main/bootstrap/apps/helmfile.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ repositories:
url: https://postfinance.github.io/kubelet-csr-approver

releases:
- name: prometheus-operator-crds
- name: kube-prometheus-stack-crds
namespace: observability
chart: oci://ghcr.io/prometheus-community/charts/prometheus-operator-crds
version: 17.0.2
Expand All @@ -32,7 +32,7 @@ releases:
chart: cilium/cilium
version: 1.16.5
values: ["../../apps/kube-system/cilium/app/helm-values.yaml"]
needs: ["observability/prometheus-operator-crds"]
needs: ["observability/kube-prometheus-stack-crds"]

- name: coredns
namespace: kube-system
Expand Down
3 changes: 2 additions & 1 deletion kubernetes/shared/repos/helm/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,5 @@ resources:
- ./rook-ceph.yaml
- ./spegel.yaml
- ./stakater.yaml
- ./stevehipwell.yaml
# - ./stevehipwell.yaml
- ./wiremind.yaml
10 changes: 10 additions & 0 deletions kubernetes/shared/repos/helm/wiremind.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
# yaml-language-server: $schema=https://kubernetes-schemas.pages.dev/source.toolkit.fluxcd.io/helmrepository_v1.json
apiVersion: source.toolkit.fluxcd.io/v1
kind: HelmRepository
metadata:
name: wiremind
namespace: flux-system
spec:
interval: 2h
url: https://wiremind.github.io/wiremind-helm-charts/

0 comments on commit db7168b

Please sign in to comment.