diff --git a/exp/capacity.yaml.tmpl b/capacity-experiments/capacity-experiments.yaml.tmpl similarity index 98% rename from exp/capacity.yaml.tmpl rename to capacity-experiments/capacity-experiments.yaml.tmpl index 15c2f0f..1f667a6 100644 --- a/exp/capacity.yaml.tmpl +++ b/capacity-experiments/capacity-experiments.yaml.tmpl @@ -2,7 +2,7 @@ # DO NOT REMOVE line above, used in `pre-commit` hook groups: - - name: capacity + - name: capacity-experiments rules: - alert: AvailabilityZoneRunningOutOfMemory95 expr: avg(node_memory_working_set_bytes/on(node)(kube_node_status_capacity{resource="memory"} - on (node) node_eviction_threshold) * on(node) group_left(zone) kube_node_labels{role="worker"}) by (zone) > 0.95 diff --git a/exp/kustomization.yaml b/capacity-experiments/kustomization.yaml similarity index 59% rename from exp/kustomization.yaml rename to capacity-experiments/kustomization.yaml index a450d75..3af1772 100644 --- a/exp/kustomization.yaml +++ b/capacity-experiments/kustomization.yaml @@ -3,8 +3,8 @@ kind: Component configMapGenerator: - files: - - capacity.yaml.tmpl - name: alert-templates-exp + - capacity-experiments.yaml.tmpl + name: alert-templates-capacity-experiments patches: - path: volume.yaml diff --git a/capacity-experiments/volume.yaml b/capacity-experiments/volume.yaml new file mode 100644 index 0000000..29af231 --- /dev/null +++ b/capacity-experiments/volume.yaml @@ -0,0 +1,16 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: thanos-rule +spec: + template: + spec: + initContainers: + - name: render-alerts + volumeMounts: + - name: rule-templates-capacity-experiments + mountPath: /var/thanos/rule-templates/capacity-experiments + volumes: + - name: rule-templates-capacity-experiments + configMap: + name: rule-templates-capacity-experiments diff --git a/exp/volume.yaml b/exp/volume.yaml deleted file mode 100644 index 563ed78..0000000 --- a/exp/volume.yaml +++ /dev/null @@ -1,16 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: thanos-rule -spec: - template: - spec: - initContainers: - - name: render-alerts - volumeMounts: - - name: rule-templates-exp - mountPath: /var/thanos/rule-templates/exp - volumes: - - name: rule-templates-exp - configMap: - name: alert-templates-exp