Skip to content
This repository has been archived by the owner on Jun 28, 2023. It is now read-only.

Fix alertmanager config as secret instead of ConfigMap. Modify defaults for Grafana #835

Merged
merged 1 commit into from
Jun 23, 2021
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
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ spec:
#@overlay/replace
accessModes:
- #@ data.values.grafana.pvc.accessMode
#@ if/end data.values.grafana.pvc.storage_class:
#@ if/end data.values.grafana.pvc.storageClassName:
#@overlay/match missing_ok=True
storageClassName: #@ data.values.grafana.pvc.storage_class
storageClassName: #@ data.values.grafana.pvc.storageClassName
resources:
requests:
storage: #@ data.values.grafana.pvc.storage
29 changes: 7 additions & 22 deletions addons/packages/grafana/bundle/config/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,34 +9,19 @@ grafana:
deployment:
replicas: 1
containers:
resources:
limits:
cpu: 100m
memory: 128Mi
requests:
cpu: 100m
memory: 128Mi
podAnnotations:
annotation: grafana
env: prod
podLabels:
app: grafana
env: prod
resources: {}
podAnnotations: {}
podLabels: {}
k8sSidecar:
containers:
resources:
limits:
cpu: 100m
memory: 128Mi
resources: {}
#! Grafana service configuration
service:
type: LoadBalancer
port: 9090
targetPort: 3000
labels:
lable: grafana
annotations:
annotation: grafana
labels: {}
annotations: {}
#! The grafana configuration.
config:
grafana_ini: |
Expand Down Expand Up @@ -78,7 +63,7 @@ grafana:
#! Grafana pvc configuration
pvc:
annotations: {}
storage_class: null
storageClassName: null
accessMode: ReadWriteOnce
storage: "2Gi"
secret:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#@ load("@ytt:overlay", "overlay")
#@ load("@ytt:data", "data")

#@overlay/match by=overlay.subset({"kind":"ConfigMap", "metadata":{"name":"alertmanager"}})
#@overlay/match by=overlay.subset({"kind":"Secret", "metadata":{"name":"alertmanager"}})
---
data:
stringData:
#@overlay/match missing_ok=True
alertmanager.yml: #@ data.values.alertmanager.config.alertmanager_yml

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ spec:
runAsUser: 65534
volumes:
- name: config-volume
configMap:
name: alertmanager
secret:
secretName: alertmanager
- name: storage-volume
persistentVolumeClaim:
claimName: alertmanager
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
---
apiVersion: v1
kind: ConfigMap
kind: Secret
metadata:
labels:
component: "alertmanager"
app: prometheus
name: alertmanager
namespace: default
data:
stringData:
alertmanager.yml: |
{}
4 changes: 2 additions & 2 deletions addons/packages/prometheus/bundle/config/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ prometheus:
configmapReload:
containers:
args:
- --volume-dir=/etc/config/new
- --volume-dir=/etc/config
- --webhook-url=http://127.0.0.1:9090/-/reload
resources: {}
#! Prometheus service configuration
Expand Down Expand Up @@ -177,7 +177,7 @@ alertmanager:
accessMode: ReadWriteOnce
storage: "2Gi"

#! The alertmanager configuration
#! The alertmanager configuration. Note that alertmanager config is a kubernetes secret.
config:
alertmanager_yml: |
global: {}
Expand Down