Skip to content

Commit

Permalink
migrate alertmanager back to chart
Browse files Browse the repository at this point in the history
  • Loading branch information
joryirving committed Feb 8, 2024
1 parent 2e70446 commit 4548a2f
Show file tree
Hide file tree
Showing 7 changed files with 67 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ alertmanager:
interval: 60s
servers:
- name: home
uri: http://alertmanager.observability.svc.cluster.local:9093
uri: http://alertmanager-operated.observability.svc.cluster.local:9093
timeout: 10s
healthcheck:
visible: false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ spec:
uninstall:
keepHistory: false
dependsOn:
- name: alertmanager
- name: kube-prometheus-stack
namespace: observability
values:
controllers:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,34 @@ spec:
remoteRef:
key: 5a98804c-6c54-4e09-817e-afd8012c70ad
property: endpoint
---
apiVersion: external-secrets.io/v1beta1
kind: ExternalSecret
metadata:
name: alertmanager-secret
spec:
target:
deletionPolicy: Delete
template:
templateFrom:
- configMap:
name: alertmanager-configmap
items:
- key: alertmanager.yml
data:
- secretKey: DISCORD_URL
sourceRef:
storeRef:
name: bitwarden-fields
kind: ClusterSecretStore
remoteRef:
key: 77e30fff-fad7-4812-a635-b034002b5b17
property: discord_webhook
- secretKey: ALERTMANAGER_HEARTBEAT_URL
sourceRef:
storeRef:
name: bitwarden-fields
kind: ClusterSecretStore
remoteRef:
key: 6893b595-8cc3-47a2-84fa-b0f4016f41bc
property: alertmanager_heartbeat
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
apiVersion: helm.toolkit.fluxcd.io/v2beta2
kind: HelmRelease
metadata:
name: kube-prometheus-stack
name: &app kube-prometheus-stack
spec:
interval: 30m
timeout: 15m
Expand Down Expand Up @@ -35,9 +35,34 @@ spec:
valuesKey: kube-state-metrics.yaml
values:
crds:
enabled: true
alertmanager:
enabled: false
ingress:
enabled: true
pathType: Prefix
ingressClassName: internal
hosts:
- &host alertmanager.${SECRET_DOMAIN}
tls:
- hosts:
- *host
alertmanagerSpec:
replicas: 2
useExistingSecret: true
configSecret: alertmanager-secret
storage:
volumeClaimTemplate:
spec:
storageClassName: ceph-block
resources:
requests:
storage: 1Gi
affinity: &affinity
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: node-role.kubernetes.io/control-plane
operator: Exists
grafana:
enabled: false
forceDeployDashboards: true
Expand Down Expand Up @@ -123,13 +148,7 @@ spec:
- __meta_kubernetes_pod_node_name
targetLabel: kubernetes_node
prometheusOperator:
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: node-role.kubernetes.io/control-plane
operator: Exists
affinity: *affinity
prometheus:
thanosService:
enabled: true
Expand Down Expand Up @@ -157,11 +176,6 @@ spec:
- auto-gomaxprocs
- memory-snapshot-on-shutdown
- new-service-discovery-manager
alertingEndpoints:
- namespace: observability
name: alertmanager
port: 9093
apiVersion: v2
externalLabels:
cluster: ${CLUSTER_NAME}
replicaExternalLabelName: __replica__
Expand All @@ -173,13 +187,7 @@ spec:
retention: 2d
retentionSize: 15GB
replicas: 2
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: node-role.kubernetes.io/control-plane
operator: Exists
affinity: *affinity
storageSpec:
volumeClaimTemplate:
spec:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,4 @@ spec:
interval: 30m
retryInterval: 1m
timeout: 5m

2 changes: 1 addition & 1 deletion kubernetes/teyvat/apps/observability/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ resources:
# Pre Flux-Kustomizations
- ./namespace.yaml
# Flux-Kustomizations
- ./alertmanager/ks.yaml
#- ./alertmanager/ks.yaml
- ./gatus/ks.yaml
- ./grafana/ks.yaml
- ./karma/ks.yaml
Expand Down
2 changes: 2 additions & 0 deletions kubernetes/teyvat/templates/volsync/claim.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: "${CLAIM:-${APP}}"
labels:
app.kubernetes.io/name: "${APP}"
spec:
accessModes: ["${VOLSYNC_ACCESSMODES:-ReadWriteOnce}"]
dataSourceRef:
Expand Down

0 comments on commit 4548a2f

Please sign in to comment.